Ping Request

OTA Message Pair: OTA_PingRQ / OTA_PingRS

Modelviewer: RQ / RS

Schema: RQ / RS

The OTA_PingRQ message may be used for testing application connectivity, sending some specific text and determining if the receiving application is able to echo back that same text.

The message 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.

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 is an ideal message to develop first as it enables fast confirmation whether the transport mechanism is functioning correctly.

Direction

  • 3rd Party can send request to Levart and expect a response.
  • Levart can send request to 3rd Party and expect a response.

Request OTA_PingRQ


<OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 https://secure.levartdistributionsystems.com.au/html/schema/OTA/2015B/OTA_PingRQ.xsd"
            TimeStamp="2020-06-19T22:21:23+08:00" Target="Production" Version="1.0" EchoToken="sdfdsfg8sc">
  <EchoData>796b8853-6143-e3e9-9be5-00004513e0fb</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"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 https://secure.levartdistributionsystems.com.au/html/schema/OTA/2015B/OTA_PingRS.xsd"
            TimeStamp="2020-06-19T22:21:23+08:00" Target="Production" Version="1.0" EchoToken="sdfdsfg8sc">
  <Success />
  <EchoData>796b8853-6143-e3e9-9be5-00004513e0fb</EchoData>
</OTA_PingRS>

Response (Error)

<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 https://secure.levartdistributionsystems.com.au/html/schema/OTA/2015B/OTA_PingRS.xsd"
            TimeStamp="2020-06-19T22:21:23+08:00" Target="Production" Version="1.0" EchoToken="sdfdsfg8sc">
  <Errors>
    <Error Type="1">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/changeme.html?WSDL", $options);
 
$pingRq = new stdClass();
$pingRq->EchoData = 'abc234234324';
 
$response = $client->PingRQ($pingRq);
 
var_dump($response);