I have retrieved the session token using SessionCreateRQ
, I know the session token expires after 15 minutes, how do i use OTA_PingRQ
to update my session, there is no proper payload for that action, so please if any can give the SOAP payload.
No need to have a payload other than what you have below
<OTA_PingRQ TimeStamp="2018-04-28T15:15:00-06:00" Version="1.0.0">
<EchoData>FREE TEXT</EchoData>
</OTA_PingRQ>
Complete request with envelope:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:ConversationId/>
<eb:From>
<eb:PartyId>{FROM}</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId>{TO}</eb:PartyId>
</eb:To>
<eb:CPAId>{IPCC}</eb:CPAId>
<eb:Service eb:type="sabreXML">OTA_PingRQ</eb:Service>
<eb:Action>OTA_PingRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>{MESSAGEID}</eb:MessageId>
<eb:Timestamp>{TIMESTAMP}</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
<wsse:BinarySecurityToken>{TOKEN}</wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0.0">
<EchoData> Are you there </EchoData>
</OTA_PingRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
When you use SessionCreateRQ request the first time you store the returned BinarySecurityToken from the SessionCreateRS response. Use this BinarySecurityToken in the OTA_PingRQ request. Here is an example of OTA_PingRQ request with Soap Envelope:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<soap-env:header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" soap-env:mustUnderstand="0">
<eb:From>
<eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
</eb:To>
<eb:CPAId>[CPA_ID]</eb:CPAId>
<eb:ConversationId>[CONVERSATION_ID]</eb:ConversationId>
<eb:Service>OTA_PingRQ</eb:Service>
<eb:Action>OTA_PingRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>[MESSAGE_ID]</eb:MessageId>
<eb:Timestamp>[TIMESTAMP]</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<eb:Security xmlns:eb="http://schemas.xmlsoap.org/ws/2002/12/secext" soap-env:mustUnderstand="0">
<eb:BinarySecurityToken>[BINARY_SECURITY_TOKEN]</eb:BinarySecurityToken>
</eb:Security>
</soap-env:header>
<soap-env:Body>
<OTA_PingRQ xmlns="http://www.opentravel.org/OTA/2003/05" TimeStamp="2011-02-28T15:15:00-06:00" Version="1.0.0">
<EchoData>Are you there</EchoData>
</OTA_PingRQ>
</soap-env:Body>
</soap-env:Envelope>