Skip Navigation

ISoapApiService

Sabre SOAP API client for USG

Acquiring Sabre SOAP API client

In order to obtain Sabre SOAP API client and use it you need to import it:

import {ISoapApiService} from "sabre-ngv-communication/interfaces/ISoapApiService";

Then obtain the service inside your source as below:

const soapApi: ISoapApiService = getService(ISoapApiService);

Available methods

Currently available methods:

callSws
callSws(request: SoapRq): Promise<SoapRs>;

Type Parameteres:
* request - SoapRq object

SoapRq {
    action: string;
    payload: string;
    authTokenType?: AuthTokenType;
    timeout?: number;
    redAppApplicationID?: string;
}
  • action - Service Action Code

  • payload - SOAP Request Body

  • AuthTokenType - 'SESSION' (default) or 'SESSIONLESS' (supported only on Sabre Red Web)

  • timeout - timeout value in ms (optional, defaults to 5000)

  • redAppApplicationID - Red App Application ID (optional)

Returns:
Promise<SoapRs>

SoapRs {
    value: string;
    errorCode?: string;
    getParsedValue(): XMLDocument;
}
  • value - raw response value (the value can be empty in case of errors)

  • errorCode - optional, error code (see SRWRuntime Error Codes for more information on error codes)

  • getParsedValue - function, returns response parsed to XMLDocument (if the parsing process fails returns an error document)

Authorization in redapp.xml

In order to be able to use specific services, your Red App needs authorization for these services in it’s redapp.xml file.

For example, to be able to connect to The Air Availability (OTA_AirAvailLLSRQ) API, the redapp.xml file should contain:

<Authorization name="com.sabre.edge.cf.sws.SWS">
	<Action name="OTA_AirAvailLLSRQ" threshold="1" />
</Authorization>