Ping Request
OTA Message Pair: OTA_PingRQ / OTA_PingRS
Description
OTA_PingRQ message is used to test the API connection. It is usually the first message to be completed in the development process since it is the most simple to implement compared to the other messages.
In order to use this service, a live connection to Levart. along with a valid username and password are required (HTTP Basic Authentication)
When a client application sends a correctly-formatted OTA_PingRQ message Levart will respond with an OTA_PingRS message.
The EchoData element is required to be set with some data to be returned in the response.
We have provided a PHP sample below to assist with the development of this message.
This message is provided for development and is not required for production usage.
Request
<OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" EchoToken="sdfdsfg8sc" TimeStamp="2016-01-28T15:15:00+08:00">
<EchoData>Test123</EchoData>
</OTA_PingRQ>
Specification OTA_PingRQ
Element | Num | Description |
---|---|---|
OTA_PingRQ | 1 | Root element |
@Version | 1 | Current Version 1.0 |
@EchoToken | 0..1 | Echo Token (Random String) |
@TimeStamp | 1 | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
EchoData | 1 | EchoData element, contains the contents of the string in the EchoData request |
Response (Success)
<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" EchoToken="sdfdsfg8sc" TimeStamp="2016-01-28T15:15:00+08:00">
<Success/>
<EchoData>Test123</EchoData>
</OTA_PingRS>
Response (Error)
<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" EchoToken="sdfdsfg8sc" TimeStamp="2016-01-28T15:15:00+08:00">
<Errors>
<Error>No EchoData provided</Error>
</Errors>
</OTA_PingRS>
Specification OTA_PingRS
Element | Num | Description |
---|---|---|
OTA_PingRS | 1 | Root element |
@Version | 1 | Current Version 1.0 |
@EchoToken | 0..1 | Echo Token Response (Same string as in request) |
@TimeStamp | 1 | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
Success | 0..1 | Element exists if request read and validated successfully. |
Errors / Error | 0..n | Errors in the request |
EchoData | 1 | The echo reply data. |
Sample PHP SOAP Client
Below is a sample PHP 5+ implementation using the inbuilt SoapClient class.
$options = array(
'login' => 'USERNAME-HERE',
'password' => 'PASSWORD-HERE'
);
$client = new SoapClient("https://secure.levartdistributionsystems.com.au/servers/quest.html?WSDL", $options);
$pingRq = new stdClass();
$pingRq->EchoData = 'abc234234324';
$response = $client->PingRQ($pingRq);
var_dump($response);