Sabre SOAP - OTA_VehAvailRateLLSRQ - CarAvaiability 2.4.2 - soap

I am trying to make a call to this SABRE API for testing. The problem is that it is giving me "Invalid Token" even if I get the token from their website. Looks like it is some kind of exception swallowing.
Can anybody help?
URL:"https://webservices.havail.sabre.com/websvc
Request:
<?xml version="1.0" encoding="UTF-8"?>
<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:From>
<eb:PartyId />
</eb:From>
<eb:To>
<eb:PartyId />
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>OTA_VehAvailRateLLSRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>mid:20001209-133003-2333#clientofsabre.com</eb:MessageId>
<eb:Timestamp>2001-02-15T11:15:12Z</eb:Timestamp>
<eb:TimeToLive>2001-02-15T11:15:12Z</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"><TOKEN></wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:Reference xlink:href="cid:rootelement" xlink:type="simple" />
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader
xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="URI"/>
</eb:From>
<eb:To>
<eb:PartyId eb:type="URI"/>
</eb:To>
<eb:CPAId>DCG</eb:CPAId>
<eb:ConversationId>1234</eb:ConversationId>
<eb:Service>OTA_VehAvailRateLLSRQ</eb:Service>
<eb:Action>ErrorRS</eb:Action>
<eb:MessageData>
<eb:MessageId>1268526483006710967</eb:MessageId>
<eb:Timestamp>2020-04-20T13:25:00</eb:Timestamp>
<eb:RefToMessageId>mid:20001209-133003-2333#clientofsabre.com</eb:RefToMessageId>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<soap-env:Fault>
<faultcode>soap-env:Client.InvalidSecurityToken</faultcode>
<faultstring>Invalid or Expired binary security token: T1RLAQLKsWdy2rgwff0GLkvtNyOA/+VwuhCcnUQkuIUsGd4M5EzMI4iNAADAIhXoZ1cmf0lgWDyy+xBWtgEO07wA+JcuqIqxP9p4K6ZvtDo8yc1UfsmFgCejOpb4m0kBI/VJbfz6TDf9yzgA0bFmcS/Hq9FWXRMEf2fq3AkRETyZpTQe+vFODBp5Qstn90ox5lSDs4wv8RoYKZdN9HRo982LLwCtcAwMx6EoBd3C7MlJlkjl/mpwCxC54+teR5bJVuk6AYVS/</faultstring>
<detail>
<StackTrace>com.sabre.universalservices.base.session.SessionException: errors.session.USG_INVALID_SECURITY_TOKEN</StackTrace>
</detail>
</soap-env:Fault>
</soap-env:Body>
</soap-env:Envelope>
I have the impression that I am doing something wrong, I really have no idea what is going on, I can't see much documentation about it.
Thanks.

First of all you should investigate "How to" guides from Sabre.
https://developer.sabre.com/guides/travel-agency/how-to/get-token.
A token is created after SessionCreate call.
So you can use BinarySecurityToken value under SessionCreate response.
https://developer.sabre.com/docs/soap_apis/session_management/create_session

Related

Split the child records of xml into individual messages in activeMQ in jboss fuse

This is a jboss fuse project
i have this scenario where a file has 1 XML with multiple child records. i need to Split the child records and use XSLT to convert it to multiple XML
.
SAMPLE XML ORDER (INPUT):
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
i have this XSLT :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<!-- TODO: Auto-generated template -->
<xsl:for-each select="catalog/cd">
<xsl:result-document href="file{position()}.xml">
<document>
<xsl:copy-of select="current()"/>
</document>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
BLUEPRINT.xml(CAMEL ROUTE)
<route id="_route1">
<from id="_from1" uri="file:work/in"/>
<log id="_log1" message="${body}"/>
<loop id="_loop1">
<xpath>count(/catalog/cd)</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</loop>
</route>
when i run this route it says error AS BELOW :
[xt) thread #2 - file://work/in] _route1 INFO <?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
[xt) thread #2 - file://work/in] XPathBuilder INFO Created default XPathFactory com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl#4b4289ed
[xt) thread #2 - file://work/in] DefaultErrorHandler ERROR Failed delivery for (MessageId: ID-MC0WKB0C-60902-1513777570783-0-1 on ExchangeId: ID-MC0WKB0C-60902-1513777570783-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: count(/catalog/cd). Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[_route1 ] [_route1 ] [file://work/in ] [ 270]
[_route1 ] [_log1 ] [log ] [ 7]
[_route1 ] [_loop1 ] [loop[xpath{XPath: count(/catalog/cd)}] ] [ 224]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: count(/catalog/cd). Reason: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:916)
at org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:780)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:750)
at org.apache.camel.builder.xml.XPathBuilder.evaluate(XPathBuilder.java:165)
at org.apache.camel.processor.LoopProcessor.process(LoopProcessor.java:64)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:196)
at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:454)
at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:226)
at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:190)
at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:204)
at org.apache.camel.builder.xml.XPathBuilder.doInEvaluateAs(XPathBuilder.java:898)
... 22 more
Caused by: com.sun.org.apache.xpath.internal.XPathException: Can not convert #NUMBER to a NodeList!
at com.sun.org.apache.xpath.internal.objects.XObject.error(XObject.java:711)
at com.sun.org.apache.xpath.internal.objects.XObject.nodelist(XObject.java:457)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:364)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:110)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:191)
... 23 more
IN THIS IT FIRSE LOGS THE XML FILE WHICH I PROVIDE THE INPUT AND THEN IT GIVES ERROR FOR THE XPATH EXPRESSION IN THE LOOP ROUTE.
SO can you help me with this or is there some other approach for this scenario ?
Scenario: i have this scenario where a file has 1 XML with multiple child records. i need to Split the child records and use XSLT to convert it to multiple XML (in JBOSS FUSE )
Thankyou for your help # noMad17 .
(BLUEPRINT.XML)Route with ActiveMQ :
<route id="_route1">
<from id="_from1" uri="file:work/in"/>
<log id="_log1" message="${body}"/>
<split id="_split1">
<xpath>/catalog/cd</xpath>
<log id="_log3" message="split data : ${body}"/>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\Scenario5\data\order.xsl"/>
<log id="_log2" message="After XSLT : ${body}"/>
<to id="_to2" pattern="InOnly" uri="activemq:queue:OrderDetails"/>
</split>
</route>
XML INPUT:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd >
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:element name="catalog">
<xsl:element name="cd">
<xsl:copy-of select="/*[local-name()='cd']/*"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Output MSG IN ACTIVEMQ :
Message 1 :
<?xml version="1.0" encoding="UTF-8"?><catalog><cd><title>Empire Burlesque</title><artist>Bob Dylan</artist><country>USA</country><company>Columbia</company><price>10.90</price><year>1985</year></cd></catalog>
Message 2:
<?xml version="1.0" encoding="UTF-8"?><catalog><cd><title>Hide your heart</title><artist>Bonnie Tyler</artist><country>UK</country><company>CBS Records</company><price>9.90</price><year>1988</year></cd></catalog>
You should change this:
<loop id="_loop1">
<xpath>count(/catalog/cd)</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</loop>
Into this:
<split id="_split1">
<xpath>/catalog/cd</xpath>
<to id="_to1" uri="xslt:file:C:\Users\a638030\workspace\splitxml\data\order1.xsl"/>
<log id="_log2" message="${body}"/>
</split>
When doing this you will get one exchange per cd-element and as such you'll have to change your XSLT accordingly.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="CamelSplitIndex" />
<xsl:template match="/">
<xsl:result-document href="file$CamelSplitIndex.xml">
<document>
<xsl:value-of select="."/>
</document>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
I suggest you take a look at the Splitter EIP

Sabre get hotels availability by just address SOAP API

i'm trying to request hotel availability (OTA_HotelAvailRQ) by just address
for example :
<OTA_HotelAvailRQ Version="2.3.0" 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">
<AvailRequestSegment>
<Customer>
<Corporate>
<ID>ABC123</ID>
</Corporate>
</Customer>
<GuestCounts Count="2"/>
<HotelSearchCriteria>
<Criterion>
<Address>
<CityName>SOUTHLAKE</CityName>
<CountryCode>US</CountryCode>
</Address>
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="10-24" Start="10-22" />
</AvailRequestSegment>
</OTA_HotelAvailRQ>
and there is no way i get results in the response, i keep receiving:
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header><eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1"><eb:From><eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId></eb:From><eb:To><eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId></eb:To><eb:CPAId>3IHI</eb:CPAId><eb:ConversationId>998</eb:ConversationId><eb:Service eb:type="sabreXML">256444039988570150</eb:Service><eb:Action>OTA_HotelAvailLLSRS</eb:Action><eb:MessageData><eb:MessageId>1090003241665830150</eb:MessageId><eb:Timestamp>2017-08-31T06:42:46</eb:Timestamp></eb:MessageData></eb:MessageHeader><wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"><wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3237679358254869625!1952915!0</wsse:BinarySecurityToken></wsse:Security></soap-env:Header><soap-env:Body><OTA_HotelAvailRS 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="BusinessLogic" timeStamp="2017-08-31T01:42:46-05:00">
<stl:SystemSpecificResults>
<stl:Message code="0">NO AVAIL</stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
i tried with the example in the sabre page by HotelCode and it worked, but i need to request it by just address, what should be the request design then? thank you
That fake corporate ID is not helping. You'd also need the city code.
Try with something like this:
<OTA_HotelAvailRQ Version="2.3.0" 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" ReturnHostCommand="true">
<AvailRequestSegment>
<GuestCounts Count="2"/>
<HotelSearchCriteria>
<Criterion>
<Address>
<CityName>SOUTH LAKE</CityName>
<CountryCode>US</CountryCode>
</Address>
<HotelRef HotelCityCode="TVL"/>
</Criterion>
</HotelSearchCriteria>
<TimeSpan End="10-24" Start="10-22" />
</AvailRequestSegment>
</OTA_HotelAvailRQ>
Note the space in South Lake
If you need to get the city code from the city name, you can use EncodeDecodeLLSRQ:
<EncodeDecodeRQ 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" Version="2.0.0">
<Encode>
<Address>
<CityName>south lake</CityName>
</Address>
</Encode>
</EncodeDecodeRQ>
<EncodeDecodeRS 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.0.0">
<stl:ApplicationResults status="Complete">
<stl:Success timeStamp="2017-09-05T11:35:59-05:00"/>
</stl:ApplicationResults>
<Text>TVL SOUTH LAKE TAHOE, CALIFORNIA,USA</Text>
</EncodeDecodeRS>

The 'Traversal' attribute is not declared. In GetItem EWS request

I have EWS soap request:
<?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://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>room1#exch2010.local</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:GetItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Start"></t:FieldURI>
<t:FieldURI FieldURI="calendar:End"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Location"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Organizer"></t:FieldURI>
<t:FieldURI FieldURI="item:Body"></t:FieldURI>
<t:FieldURI FieldURI="item:TextBody"></t:FieldURI>
</t:AdditionalProperties>
</m:ItemShape>
<m:ItemIds>
<t:ItemId Id="AAAUAHJvb20xQGV4Y2gyMDEwLmxvY2FsAEYAAAAAALp73pDts6BGkBAHp2xunxIHAOLiLPCbqYNEl0bu9R23VJMAAAAW2OQAAOLiLPCbqYNEl0bu9R23VJMAAAAXKY8AAA==" ChangeKey="DwAAAA=="></t:ItemId>
</m:ItemIds>
</m:GetItem>
</soap:Body>
</soap:Envelope>
Response error is:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: The 'Traversal' attribute is not declared.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.</e:Message>
<t:MessageXml xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>16</t:LineNumber>
<t:LinePosition>20</t:LinePosition>
<t:Violation>The 'Traversal' attribute is not declared.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Why would it fail?
Similar request
<?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://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:PrincipalName>room1#exch2010.local</t:PrincipalName>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
<soap:Body>
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Subject"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Start"></t:FieldURI>
<t:FieldURI FieldURI="calendar:End"></t:FieldURI>
<t:FieldURI FieldURI="calendar:Location"></t:FieldURI>
</t:AdditionalProperties>
</m:ItemShape>
<m:CalendarView StartDate="2016-05-30T11:08:48" EndDate="2016-12-31T11:08:48"></m:CalendarView>
<m:ParentFolderIds>
<t:FolderId Id="AAAUAHJvb20xQGV4Y2gyMDEwLmxvY2FsAC4AAAAAALp73pDts6BGkBAHp2xunxIBAOLiLPCbqYNEl0bu9R23VJMAAAAW2OQAAA==" ChangeKey="AgAAABYAAADi4izwm6mDRJdG7vUdt1STAAAAFtkD"></t:FolderId>
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>
works perfectly
EDIT 1:
I have removed traversal attribute and than got error:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode
xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorSchemaValidation
</faultcode>
<faultstring xml:lang="en-US">The request failed schema validation: The 'FieldURI' attribute is invalid - The value 'item:TextBody' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:UnindexedFieldURIType' - The Enumeration constraint failed.</faultstring>
<detail>
<e:ResponseCode
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorSchemaValidation
</e:ResponseCode>
<e:Message
xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">The request failed schema validation.
</e:Message>
<t:MessageXml
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:LineNumber>3</t:LineNumber>
<t:LinePosition>649</t:LinePosition>
<t:Violation>The 'FieldURI' attribute is invalid - The value 'item:TextBody' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:UnindexedFieldURIType' - The Enumeration constraint failed.</t:Violation>
</t:MessageXml>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Then I removed last Additional property
<t:FieldURI FieldURI="item:TextBody"></t:FieldURI>
and finally got this error.
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="3" MajorBuildNumber="123" MinorBuildNumber="3" Version="Exchange2010_SP2"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</s:Header>
<s:Body
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:GetItemResponse
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:GetItemResponseMessage ResponseClass="Error">
<m:MessageText>The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert from EwsLegacyId to EwsId format.</m:MessageText>
<m:ResponseCode>ErrorInvalidIdMalformedEwsLegacyIdFormat</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
<m:Items/>
</m:GetItemResponseMessage>
</m:ResponseMessages>
</m:GetItemResponse>
</s:Body>
</s:Envelope>
Please advise.
There is no traversal attribute in the GetItem element you can check the reference documentation https://msdn.microsoft.com/en-us/library/aa563775(v=exchg.150).aspx
Traversals are only valid in FindItem and FindFolder operations (its specifies what scope of Folders you are searching). GetItem is just getting a particular Item you have the Id for (The Id contains the information to locate the Item so any folder/mailbox context isn't needed). That said if you don't have rights to the particular Item and you try to use GetItem the error reported will be that the Item doesn't exist in the store (which is a little deceiving).
Edit 1
You need to start versioning all the EWS Requests you make eg in the Header
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP2" />
</soap:Header>
You need to put the schema version https://msdn.microsoft.com/en-us/library/office/dn741586(v=exchg.150).aspx you working with (or at least put Exchange2007_SP1) . That will address the EWSId error (you won't be able to use the Id your trying to use but you should get the correct ID from the other request you got that from).

VERIFY RATE LEVEL error in Sabre hotel booking SOAP api

I am trying to use Sabre SOAP api for hotel reservation. But not able to get pass this VERIFY RATE LEVEL error. My request payload for hotel booking is given below:
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader">
<SOAP-ENV:Header>
<eb: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>H65H</eb:CPAId>
<eb:ConversationId>app_name</eb:ConversationId>
<eb:Service eb:type="sabreXML"></eb:Service>
<eb:Action>OTA_HotelResLLSRQ</eb:Action>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">
<!-- Use Security token from Authentication Request -->
<<-- sabre auth token -->>
</wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<OTA_HotelResRQ 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" Version="2.2.0">
<Hotel>
<BasicPropertyInfo ChainCode="HY" HotelCode="1"/>
<Guarantee Type="GDPST">
<CC_Info>
<PaymentCard Code="cc-cvc" ExpireDate="cc-date" Number="cc-number"/>
<PersonName>
<Surname>TEST</Surname>
</PersonName>
</CC_Info>
</Guarantee>
<GuestCounts Count="2">
<ExtraGuest>1</ExtraGuest>
</GuestCounts>
<RoomType NumberOfUnits="1" RoomTypeCode="A2DRAC"/>
<TimeSpan End="12-24T13:00" Start="12-22T12:00"/>
</Hotel>
</OTA_HotelResRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But I got the response back with 1VERIFY RATE LEVEL error as shown below
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<eb:MessageHeader xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" eb:version="1.0" soap-env:mustUnderstand="1">
<eb:From>
<eb:PartyId eb:type="urn:x12.org:IO5:01">ws</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId eb:type="urn:x12.org:IO5:01">from</eb:PartyId>
</eb:To>
<eb:CPAId>H65H</eb:CPAId>
<eb:ConversationId>app_name</eb:ConversationId>
<eb:Service eb:type="sabreXML"/>
<eb:Action>OTA_HotelResLLSRS</eb:Action>
<eb:MessageData>
<eb:MessageId>8860ceca-d624-4fc6-b3a6-c1f7a7da5f43#61</eb:MessageId>
<eb:Timestamp>2015-12-09T06:26:01</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
<wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTC!ICESMSLB\/CRT.LB!-3460990906663307648!220138!0</wsse:BinarySecurityToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<OTA_HotelResRS 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.2.0">
<stl:ApplicationResults status="NotProcessed">
<stl:Error type="BusinessLogic" timeStamp="2015-12-09T00:26:01-06:00">
<stl:SystemSpecificResults>
<stl:Message>1VERIFY RATE LEVEL </stl:Message>
<stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</OTA_HotelResRS>
</soap-env:Body>
</soap-env:Envelope>
I am unable to figure out what problem is, as I am unable to find anything related to 1VERIFY RATE LEVEL in Sabre documenatation.
What is the problem? Is my request payload invalid or some params are missing?
Thanks
I guess this is where you went wrong.
<eb:Action>OTA_HotelResLLSRQ</eb:Action>
the correct value is
<eb:Action>OTA_HotelAvailLLSRQ</eb:Action>
also pass value in the below tag.
<eb:Service eb:type="sabreXML">HotelAvailLLSRQ</eb:Service>
body request part
<ns:OTA_HotelAvailRQ Version="2.2.0">
<ns:AvailRequestSegment>
<ns:GuestCounts Count="2"/>
<ns:HotelSearchCriteria >
<ns:Criterion>
<ns:Address>
<ns:CityName></ns:CityName>
<ns:CountryCode>US</ns:CountryCode>
<ns:PostalCode></ns:PostalCode>
<ns:StreetNmbr></ns:StreetNmbr>
</ns:Address>
<ns:HotelRef HotelCityCode="DFW" />
</ns:Criterion>
</ns:HotelSearchCriteria>
<ns:TimeSpan End="02-12" Start="01-12"/>
</ns:AvailRequestSegment>
</ns:OTA_HotelAvailRQ>
I hope this solves your issue.
Thanks.

EWS SOAP get ChangeKey from ID?

using SOAP is it possible to get the ChangeKey of an item identified by Item ID ?
cheers
GetItem might be what you're looking for. The response will include ChangeKey.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2007_SP1" />
<t:TimeZoneContext>
<t:TimeZoneDefinition Id="GMT Standard Time" />
</t:TimeZoneContext>
</soap:Header>
<soap:Body>
<m:GetItem>
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
</m:ItemShape>
<m:ItemIds>
<t:ItemId Id="AAMkADY..." />
</m:ItemIds>
</m:GetItem>
</soap:Body>
</soap:Envelope>