2017-08-31 99 views
0

我试图要求酒店预订(OTA_HotelAvailRQ)由刚刚解决 例如:军刀获得酒店的可用性由刚刚解决SOAP API

<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> 

,有没有办法,我得到的结果在响应中,我保持收货:

<?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> 

我试图通过HotelCode军刀页面的例子,它的工作,但我需要的只是解决要求它,应该是什么要求设计呢?谢谢

回答

0

那个假公司ID并没有帮助。你还需要城市代码。

尝试这样的事:

<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> 

注意,在南湖的空间

如果你需要从城市的名字的城市代码,你可以使用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> 
+0

的事情是,我没有城市代码,我只有城市和国家代码 –

+0

我在我的网站进行搜索,它返回谷歌地图自动完成的方向,并从我有建立请求 –

+0

更新我的答案,以显示如何获取城市代码 – Bruno

相关问题