Ping Request to Confirm Application Connectivity
Before sending requests to Universal API, a ping request is recommended to ensure that there is proper network connectivity and application operability.
The ping request has a single payload of a string and can be used to make sure the method you have chosen for generating SOAP requests is fully compatible with our system. This request is more than a network ping in that it is handled by the application to ensure that it is running and responding properly. The ping request can also be used to test infrastructure and network components because the length of the request and response message can be easily controlled. Upon approval, it can also be used to perform load testing of these components.
XML Ping Request and Response
The ping port’s only method is service
. The structure of the PingReq
and PingRsp
object are specified to XML inside the XSD file src/wsdl/system_vX_X/System.xsd
. The XSD files define various types used in the WSDL files, and the WSDL then references these XSD to “import” the definitions.
See the PingReq and PingRsp transactions.
Request
Requests include an HTTP header and a SOAP envelope and that contains the SOAP endpoint (including the requested service), gzip status, Travelport credentials, and XML request. All requests must be TLS encrypted.
HTTP Header
The HTTP header includes:
- SOAP endpoints, which vary by:
- Geographical region.
- Requested service. In the preceding example, the HotelService is used for the endpoint; however, the service name is modified based on the request transaction.
-
gzip compression, which is optional, but strongly recommended. To accept gzip compression in the response, specify “Accept-Encoding: gzip,deflate” in the header.
- Authorization, which follows the standard basic authorization pattern.
- The text that follows “Authorization: Basic” can be encoded using Base 64. This functionality is supported by most programming languages.
- The syntax of the authorization credentials must include the prefix "Universal API/" before the User Name and Password assigned by Travelport.
- See HTTP Header Best Practices document in Travelport's Knowledge Base.
POST https://americas.universal-api.pp.travelport.com/
B2BGateway/connect/uAPI/SystemService HTTP/2.0
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Authorization: Basic Universal API/UserName:Password
Content-Length: length
SOAP Envelope
The SOAP envelope contains the payload data for the request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<sys:PingReq TraceId="test" xmlns:sys="http://www.travelport.com/schema/system_v32_0">
<sys:Payload>this is a test for testing</sys:Payload>
</sys:PingReq>
</soapenv:Body>
</soapenv:Envelope>
Response
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<sys:PingRsp TraceId="test" TransactionId="C06426750A0771BD000C8BE67215BEDF" ResponseTime="4" xmlns:sys="http://www.travelport.com/schema/system_v32_0" xmlns:common_v37_0="http://www.travelport.com/schema/common_v37_0">
<sys:Payload>this is a test for testing</sys:Payload>
</sys:PingRsp>
</SOAP:Body>
</SOAP:Envelope>
Schema Nodes: PingReq and PingRsp
Request
The PingReq node in the System Service is used to ping.
A single payload string with a maximum of 32768 character can be included in the request.
Response
The PingRsp node returns the payload.
Attributes in the response indicate TraceId, TransactionId, ResponseTime, and CommandHistory.
Understand the High-Level Workflows.
Understand the Universal Record.
Review the Sample Transactions.