Ping Request

OTA Message Pair: OTA_PingRQ / OTA_PingRS

Modelviewer: RQ / RS

Schema: RQ / RS

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

ElementNumDescription
OTA_PingRQ1Root element
@Version1Current Version 1.0
@EchoToken0..1Echo Token (Random String)
@TimeStamp1Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
EchoData1EchoData 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

ElementNumDescription
OTA_PingRS1Root element
@Version1Current Version 1.0
@EchoToken0..1Echo Token Response (Same string as in request)
@TimeStamp1Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
Success0..1Element exists if request read and validated successfully.
Errors / Error0..nErrors in the request
EchoData1The 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);