'Any documentation for new Sabre Header type - GetVehAvailRQ SOAP Header error
We are trying to implement the GetVehAvailRQ SOAP API currently, but are getting the following error when calling the Sabre Webservice:
<stlh:ResultSummary>
<stlh:Error timeStamp="2019-12-17T06:31:44-06:00" status="NotProcessed" type="Validation">
<stlh:ReportingSystem instance="usg-prod3" host="p170">USG1</stlh:ReportingSystem>
<stlh:Message code="1142">cvc-complex-type.2.4.a: Invalid content was found starting with element 'SabreHeader'. One of '{"http://services.sabre.com/STL_Header/v120":SabreHeader, WC["http://www.ebxml.org/namespaces/messageHeader","http://schemas.xmlsoap.org/ws/2002/12/secext"]}' is expected.</stlh:Message>
<stlh:ShortText>ERR.SWS.CLIENT.VALIDATION_FAILED</stlh:ShortText>
</stlh:Error>
</stlh:ResultSummary>
We've tried using the wsdl from the documentation resources here, but the SOAP header appears completely different to any we have previously implemented before (including the GetHotelAvailRQ service).
In order to get the web reference working, we had to alter the WSDL (see below) provided as the STL_Header files were inconsistent:
downloaded wsdl:
<xsd:import namespace="http://services.sabre.com/STL_Header/v02_02" schemaLocation="api/built-ins/STL2_Header_v02_01.xsd"/>
updated to:
<xsd:import namespace="http://services.sabre.com/STL_Header/v02_02" schemaLocation="api/built-ins/STL2_Header_v02_02.xsd"/>
Full wsdl file:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:service="http://services.sabre.com/car/avail/v1" xmlns:sws="https://webservices.sabre.com/websvc" xmlns:stlh2="http://services.sabre.com/STL_Header/v02_02" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" targetNamespace="https://webservices.sabre.com/websvc">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://services.sabre.com/car/avail/v1" schemaLocation="api/v1/GetVehAvailRQ.xsd"/>
<xsd:import namespace="http://services.sabre.com/car/avail/v1" schemaLocation="api/v1/GetVehAvailRS.xsd"/>
<xsd:import namespace="http://services.sabre.com/STL_Header/v02_02" schemaLocation="api/built-ins/STL2_Header_v02_02.xsd"/>
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="api/built-ins/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="GetVehAvailRQInput">
<wsdl:part name="header" element="stlh2:SabreHeader"/>
<wsdl:part name="header2" element="wsse:Security"/>
<wsdl:part name="body" element="service:GetVehAvailRQ"/>
</wsdl:message>
<wsdl:message name="GetVehAvailRQOutput">
<wsdl:part name="header" element="stlh2:SabreHeader"/>
<wsdl:part name="header2" element="wsse:Security"/>
<wsdl:part name="body" element="service:GetVehAvailRS"/>
</wsdl:message>
<wsdl:portType name="GetVehAvailRQPortType">
<wsdl:operation name="GetVehAvailRQ">
<wsdl:input message="sws:GetVehAvailRQInput"/>
<wsdl:output message="sws:GetVehAvailRQOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="GetVehAvailRQSoapBinding" type="sws:GetVehAvailRQPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetVehAvailRQ">
<soap:operation soapAction="GetVehAvailRQ"/>
<wsdl:input>
<soap:header message="sws:GetVehAvailRQInput" part="header" use="literal"/>
<soap:header message="sws:GetVehAvailRQInput" part="header2" use="literal"/>
<soap:body parts="body" use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:header message="sws:GetVehAvailRQOutput" part="header" use="literal"/>
<soap:header message="sws:GetVehAvailRQOutput" part="header2" use="literal"/>
<soap:body parts="body" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="GetVehAvailRQService">
<wsdl:port name="GetVehAvailRQPortType" binding="sws:GetVehAvailRQSoapBinding">
<soap:address location="https://webservices.havail.sabre.com/websvc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The request object we are using looks as below:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<SabreHeader xmlns="http://services.sabre.com/STL_Header/v02_02">
<Service operation="GetVehAvailRQ" version="1.0.0" />
<Identification>
<ConversationID>iQServicesSession</ConversationID
<MessageID>**VALID SESSION ID**</MessageID>
</Identification>
</SabreHeader>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" />
</soap:Header>
<soap:Body>
<GetVehAvailRQ version="1.0.0" xmlns="http://services.sabre.com/car/avail/v1">
<SearchCriteria PickUpDate="2020-01-30" PickUpTime="08:00" ReturnDate="2020-01-31" ReturnTime="17:00">
<GeoRef>
<PickUpLocRef>
<GeoCode Latitude="51.8893852233887" Longitude="0.262348860502243" />
</PickUpLocRef>
<ReturnLocRef>
<GeoCode Latitude="51.8893852233887" Longitude="0.262348860502243" />
</ReturnLocRef>
</GeoRef>
<ImageRef>
<Image />
</ImageRef>
</SearchCriteria>
</GetVehAvailRQ>
</soap:Body>
</soap:Envelope>
Is there any documentation / POSTMAN API examples available for this new SOAP Header structure?
Thanks in advance!
Sam
Solution 1:[1]
you may use any header from another SOAP Service, thus this section is quite common. The only difference is the Action value, which you can replace with GetVehAvailRQ;
Another suggestion is to take a look at https://github.com/SabreDevStudio/postman-collections.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yitzhak B. Solórzano |
