Sabre HotelRateDescriptionLLSRQ error ERR.SWS.PROVIDER.REQUEST_HANDLER_ERROR - soap

I am getting error Unexpected request processing error when trying to get rates in sabre soap api. Here is my request xml:
<soapenv:Body>
<ns:HotelRateDescriptionRQ ReturnHostCommand="false" Version="2.3.0">
<ns:AvailRequestSegment>
<!--Optional:-->
<ns:GuestCounts Count="2"/>
<!--Optional:-->
<ns:HotelSearchCriteria>
<ns:Criterion>
<ns:HotelRef HotelCode="46333"/>
</ns:Criterion>
</ns:HotelSearchCriteria>
<!--Optional:-->
<!--Optional:-->
<ns:RatePlanCandidates>
<ns:RatePlanCandidate CurrencyCode="USD"/>
</ns:RatePlanCandidates>
<!--Optional:-->
<ns:TimeSpan End="12-28" Start="12-25"/>
</ns:AvailRequestSegment>
</ns:HotelRateDescriptionRQ>
</soapenv:Body>
But i got error response:
<soap-env:Body>
<HotelRateDescriptionRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stl="http://services.sabre.com/STL/v01" Version="2.3.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="Application" timeStamp="2018-02-15T01:50:26-06:00">
<stl:SystemSpecificResults>
<stl:Message>Unexpected request processing error</stl:Message>
<stl:ShortText>ERR.SWS.PROVIDER.REQUEST_HANDLER_ERROR</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</HotelRateDescriptionRS>
</soap-env:Body>
so what am i doing wrong here?

I have fixed this problem, the problem because i use token from service TokenCreateRQ, it should use service SessionCreateRS

Possible Solutions:
1) have you set the ns: arrcordingly ?
xmlns="http://webservices.sabre.com/sabreXML/2011/10"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2) Did you set the service type in the header accordingly?
<eb:Service eb:type="OTA">HotelPropertyDescriptionLLSRQ</eb:Service>
<eb:Action>HotelPropertyDescriptionLLSRQ</eb:Action>
Let me know if this works for you

Related

Twinfield every SOAP request failed

Before this project I never worked with SOAP. So I followed all of the instructions from: https://wktaaeu.force.com/nlcommunity/s/article/Setting-up-OAuth-2-0-Introduction?language=en_US and used the Postman templates on that page to make SOAP requests.
After a while I got the Access Token and company code, but I can't find out how to make other requests. With every request that I try to make from different sources on the internet I get the following error:
<?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:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request. ---> Object reference not set to an instance of an object.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
Im making a mistake why every request fails but I can't figure it out.
Examples of different requests I tried
This one I took from: Postman Twinfield API request deleted transactions
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:Authentication xmlns:h="http://www.twinfield.com/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AccessToken xmlns="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.Shared">ACCESS_TOKEN</AccessToken>
<CompanyCode xmlns="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.Shared">35f3248f-46cc-4a8e-b16c-69ac65118771</CompanyCode>
</h:Authentication>
</s:Header>
<s:Body>
<Query i:type="b:GetDeletedTransactions" xmlns="http://www.twinfield.com/" xmlns:a="http://schemas.datacontract.org/2004/07/Twinfield.WebServices" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:b="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.DeletedTransactionsService">
<b:CompanyCode>COMPANY_CODE</b:CompanyCode>
<b:DateFrom>2022-01-01T00:00:00</b:DateFrom>
<b:DateTo>2022-12-31T23:59:00</b:DateTo>
<b:Daybook></b:Daybook>
</Query>
</s:Body>
</s:Envelope>
Second try was by myself from the docs:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:twin="http://www.twinfield.com/">
<soapenv:Header>
<twin:Header>
<twin:AccessToken>ACCESS_TOKEN</twin:AccessToken>
</twin:Header>
</soapenv:Header>
<soapenv:Body>
<twin:ProcessXmlString>
<twin:xmlRequest><![CDATA[<list><type>offices</type></list>]]></twin:xmlRequest>
</twin:ProcessXmlString>
</soapenv:Body>
</soapenv:Envelope>
Last one also made by my reading the docs:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:twinfield="http://www.twinfield.com/">
<soap:Header>
<twinfield:Header>
<twinfield:AccessToken>ACCESS_TOKEN</twinfield:AccessToken>
<twinfield:CompanyCode>COMPANY_CODE</twinfield:CompanyCode>
</twinfield:Header>
</soap:Header>
<soap:Body>
<twinfield:ProcessXmlDocument>
<twinfield:xmlRequest>
<read>
<type>dimensions</type>
<office>COMPANY_CODE</office>
<dimtype>SALARIS</dimtype>
<code>1234</code>
</read>
</twinfield:xmlRequest>
</twinfield:ProcessXmlDocument>
</soap:Body>
</soap:Envelope>
I'v had the same struggle as you are going through, after a while I contacted Twinfield about this and they offered me a slightly different soap xml, this is no where explained nor noted down but it worked so maybe it will work for you as well:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:Authentication xmlns:h="http://www.twinfield.com/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AccessToken xmlns="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.Shared">{{Accescode}}</AccessToken>
<CompanyCode xmlns="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.Shared">{{Company}}</CompanyCode>
</h:Authentication>
</s:Header>
<s:Body>
<Query i:type="b:GetDeletedTransactions" xmlns="http://www.twinfield.com/" xmlns:a="http://schemas.datacontract.org/2004/07/Twinfield.WebServices" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:b="http://schemas.datacontract.org/2004/07/Twinfield.WebServices.DeletedTransactionsService">
<b:CompanyCode>{{Company}}</b:CompanyCode>
<b:DateFrom>2022-06-01T00:00:00</b:DateFrom>
<b:DateTo>2022-07-30T23:59:00</b:DateTo>
<b:Daybook></b:Daybook>
</Query>
</s:Body>
</s:Envelope>
As you can see there a few parameters that you need to set the "Company" and the "Access code"
for the company list I've been using this xml request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:twin="http://www.twinfield.com/">
<soapenv:Header>
<twin:Header>
<twin:AccessToken>{{Accescode}}</twin:AccessToken>
</twin:Header>
</soapenv:Header>
<soapenv:Body>
<twin:ProcessXmlString>
<twin:xmlRequest><![CDATA[<list><type>offices</type></list>]]></twin:xmlRequest>
</twin:ProcessXmlString>
</soapenv:Body>
</soapenv:Envelope>
if these dont work it might be that your licence within the twinfield environment needs to be adjusted so you've access to this.

SOAP fault "DecryptAndDeserializeUserToken" on GetMetaData for Loket

When I post the following to the web service of Loket:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:svc="http://Loket.Webservice/ServiceContracts/2008/06">
<soapenv:Body>
<svc:GetMetaData>
<svc:UserToken>TOKEN_RETRIEVED_WITH_LOGON</svc:UserToken>
</svc:GetMetaData>
</soapenv:Body>
</soapenv:Envelope>
I receive an error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="nl-NL">GetMetaData</faultstring>
<detail>
<DefaultFaultContract xmlns="http://Loket.Webservice/ServiceContracts/2008/06" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage>DecryptAndDeserializeUserToken</ErrorMessage>
</DefaultFaultContract>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
The error message is misleading. The user token is correct, which you can verify by calling the List method.
However, the as optional listed DataIdentity element is required. It must contain a hashed and encrypted value of the identity of a table, such as:
MqhIh6BdOHPRi1s16c+fNUmm4TO1p7HTwEKxxjgiAjB+o12lO5fq1poK4OZcfOE0yZyvwkDjCcm17foDi7V0uqp06vfgTTv5/y8WyTBz+tPoxVdSOMECHARREMOVEDS4NQz3K8zogL
With this one present, it works. Please note that if you change the DataIdentity value a little, you will still receive a DecryptAndDeserializeUserToken error message.

SOAP The root element for the request could not be determined

I'm getting the following error when I try and post some SOAP requests:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text>The root element for the request could not be determined. When RoutingStyle is set to RequestElement, SoapExtensions configured via an attribute on the method cannot modify the request stream before it is read. The extension must be configured via the SoapExtensionTypes element in web.config or the request must arrive at the server as clear text.</soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
I'm using
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://test.#######.co.uk/ws-b/>
<soapenv:Body>
<hs:logon>
<hs:username>USER</m:username>
<hs:password>pass123</m:password>
</hs:logon>
</soapenv:Body>
</soapenv:Envelope>
However, I can get some request to work using messages of a similar format. What does this mean?
"hs" namespace doesn't seem to be declared. Also you closing tags are with different namespace than openings. Can you try:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hs="http://test.#######.co.uk/ws-b/">
<soapenv:Body>
<hs:logon>
<hs:username>USER</hs:username>
<hs:password>pass123</hs:password>
</hs:logon>
</soapenv:Body>
</soapenv:Envelope>
This is what I finally got to work:
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>
<logon xmlns="http://tempuri.org/">
<username>user</username>
<password>password</password>
</logon>
</Body>
</Envelope>

Missing wsse:Security header in request

I try to add rampart security to my axis 2 project using this tutorial page 19- 22
SO everything seems fine but when I switch to soapUI perspective to try to test the service
the request which I'm proposed is :
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2wstest">
<soapenv:Header/>
<soapenv:Body>
<axis:testws>
<!--Optional:-->
<axis:x>5</axis:x>
</axis:testws>
</soapenv:Body>
</soapenv:Envelope>
and it gives me as a response:
faultstring>Missing wsse:Security header in request</fau
SO I add the security header and my request becomes the same as the one written in the tutorial
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://axis2wstest">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="123">
<wsse:Username>test</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-username-token-profile-1.0#PasswordText">pass</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<axis:testws>
<!--Optional:-->
<axis:x>5</axis:x>
</axis:testws>
</soapenv:Body>
</soapenv:Envelope>
but the response is the same
soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<faultcode>wsse:InvalidSecurity</faultcode>
<faultstring>Missing wsse:Security header in request</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Don't add the security header directly to your request!
Click on Aut at the bottom left. Then you can enter your username/password there.
For more information see: http://www.soapui.org/SOAP-and-WSDL/authenticating-soap-requests.html
As Authorisation type choose Preemptive. (Only in soapUI 4.5.1 as far as I know)

zend framework Soap

I have to generate following code and presume to do it with zend_soap_client, but I don't know ho to do it, as I have no wsdl file. Here the code:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<processOCIMessage soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arg0 xsi:type="soapenc:string"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<BroadsoftDocument protocol="OCI"
xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sessionId xmlns="">unique_sessionId </sessionId>
<command xsi:type="ServiceProviderDnGetSummaryListRequest" xmlns="">
<serviceProviderId>your_serviceProvider_Id
</serviceProviderId>
</command>
</BroadsoftDocument>
</arg0>
</processOCIMessage>
</soapenv:Body>
</soapenv:Envelope>
I guess I have to do it in non-wsdl mode...
Any help will be appreciated.
Regards Andrea
If you are requesting a Soap Service,then you will need WSDL URI.
If you are creating a SOAP Service,use the resource
http://bogdan-albei.blogspot.com/2009/05/quickstart-web-services-with-soap-and.html