SOAP Message Structure
Overview
All messages exchanged with HotelRunner are soap messages. They include a SOAP Security header for authentication purposes and contain the SOAP Body contains the OTA message. The following example is a complete SOAP message.
WSDL
https://am.hotelrunner.com/pms/ota2015b/wsdl
POST URL
https://am.hotelrunner.com/pms/ota2015b/action
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken> <wsse:Username>HR_ID</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TOKEN</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soap:Header> <soap:Body> <OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2016-04-01T12:31:47+03:00" Version="1.0" EchoToken="echo-1903"> <POS> <Source> <RequestorID Type="22" ID="PMS1"/> </Source> </POS> <ReadRequests> <HotelReadRequest HotelCode="ABC"> <SelectionCriteria SelectionType="Undelivered" ResStatus="Modify"/> </HotelReadRequest> </ReadRequests> </OTA_ReadRQ> </soap:Body> </soap:Envelope>
SOAP Security Header
The Security Header structure conveys authentication information. It is mandatory and both the /wsse:UsernameToken/wsse:Username and /wsse:UsernameToken/wsse:Password elements are mandatory.
Each connecting HotelRunner partner will be allocated a USERNAME* and PASSWORD* per property for use with this header.
*USERNAME: HR_ID
*PASSWORD: TOKEN
SOAP Faults
Generally OTA messages transmit "business logic" failures in the element structure. However a soap fault can be returned in case of an unexpected error caused by for example a soap message where the xml cannot be parsed. The SOAP Fault will identify the party at fault (CLIENT/SERVER).
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode> SOAP-ENV:Client </faultcode> <faultstring xml:lang="en" xmlns:xml="http://www.w3.org/XML/1998/namespace"> Authentication failed - invalid username </faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>