2016-08-20 117 views
1

我正在工作的酒店预订工作流程。但我在Hotel Reservation API上挣扎。下面我提到了我所做的一步一步的活动。请帮我解决这个问题。什么是Sabre酒店预订API的SOAP请求体[OTA_HotelResLLSRQ]

  1. 我搜索了使用OTA_HotelAvailRQ API的纽约[“NYC”]城市酒店,并获得了成功的回应。

  2. 从该响应挑选的酒店代码[HotelCode =“0048286”]属性并提供给HotelPropertyDescriptionLLSRQ api,则成功响应。

  3. 从该响应中选择房价元素的第一个RPH属性[< RoomRates> < RoomRate RPH =“001”>]并提供给OTA_HotelResLLSRQ API。

  4. 但是发生了以下错误。工作流程在SoapUI中进行测试。

<stl:ApplicationResults status="NotProcessed"> 
       <stl:Error type="BusinessLogic" timeStamp="2016-08-20T03:19:25-05:00"> 
        <stl:SystemSpecificResults> 
         <stl:Message>FORMAT</stl:Message> 
         <stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText> 
        </stl:SystemSpecificResults> 
       </stl:Error> 
      </stl:ApplicationResults> 
  1. OTA_HotelAvailRQ API:

请求正文: <ns:OTA_HotelAvailRQ Version="2.2.1"> <ns:AvailRequestSegment> <ns:Customer> <ns:Corporate> <ns:ID>ABC1223</ns:ID> </ns:Corporate> </ns:Customer> <ns:GuestCounts Count="2" /> <ns:HotelSearchCriteria> <ns:Criterion> <ns:HotelRef HotelCityCode="NYC" /> </ns:Criterion> </ns:HotelSearchCriteria> <ns:TimeSpan End="09-24" Start="09-22" /> </ns:AvailRequestSegment> </ns:OTA_HotelAvailRQ>

响应体或SOAP体:

<OTA_HotelAvailRS Version="2.2.1" 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"> <stl:ApplicationResults status="Complete"> <stl:Success timeStamp="2016-08-20T03:07:02-05:00"/> </stl:ApplicationResults> <AdditionalAvail Ind="true"/> <AvailabilityOptions> <AvailabilityOption RPH="001"> <BasicPropertyInfo AreaID="000E" ChainCode="WV" Distance="M" GEO_ConfidenceLevel="1" HotelCityCode="JFK" HotelCode="0048286" HotelName="HOTEL ON RIVINGTON" Latitude="40.719970" Longitude="-73.987990"> <Address> <AddressLine>107 RIVINGTON STREET</AddressLine> <AddressLine>NEW YORK NY 10002</AddressLine> </Address> <ContactNumbers> <ContactNumber Fax="1-212-475 5959" Phone="1-212-475 2600"/> </ContactNumbers> <DirectConnect> <Alt_Avail Ind="false"/> <DC_AvailParticipant Ind="true"/> <DC_SellParticipant Ind="true"/> <RatesExceedMax Ind="false"/> <UnAvail Ind="false"/> </DirectConnect> <LocationDescription Code="G"> <Text>NEW YORK</Text> </LocationDescription> <Property Rating="NTM"> <Text>4 CROWN</Text> </Property> <PropertyOptionInfo> <!-- deleted --> </PropertyOptionInfo> <RoomRate RateLevelCode="RAC"> <AdditionalInfo> <CancelPolicy Numeric="00"/> </AdditionalInfo> <HotelRateCode>RAC</HotelRateCode> </RoomRate> <SpecialOffers Ind="false"/> </BasicPropertyInfo> </AvailabilityOption> <!-- 6 More Results are avilable below i skipped --> </AvailabilityOptions> </OTA_HotelAvailRS> </soap-env:Body>

  • HotelPropertyDescriptionLLSRQ
  • 请求体:

    <SOAP-ENV:Body> <ns4:HotelPropertyDescriptionRQ xmlns:ns2="http://services.sabre.com/STL_Header/v120" xmlns:ns3="http://services.sabre.com/STL/v01" xmlns:ns4="http://webservices.sabre.com/sabreXML/2011/10" Version="2.3.0"> <ns4:AvailRequestSegment> <ns4:GuestCounts Count="2" /> <ns4:HotelSearchCriteria> <ns4:Criterion> <ns4:HotelRef HotelCode="0048286" /> </ns4:Criterion> </ns4:HotelSearchCriteria> <ns4:TimeSpan End="09-24" Start="09-22" /> </ns4:AvailRequestSegment> </ns4:HotelPropertyDescriptionRQ> </SOAP-ENV:Body>

    响应体:

    <soap-env:Body> <HotelPropertyDescriptionRS 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" xmlns:stl="http://services.sabre.com/STL/v01"> <stl:ApplicationResults status="Complete"> <stl:Success timeStamp="2016-08-20T03:11:53-05:00"/> </stl:ApplicationResults> <RoomStay> <BasicPropertyInfo ChainCode="WV" GeoConfidenceLevel="1" HotelCityCode="JFK" HotelCode="0048286" HotelName="HOTEL ON RIVINGTON" Latitude="40.719970" Longitude="-73.987990" NumFloors="20" RPH="001"> <Address> <AddressLine>107 RIVINGTON STREET</AddressLine> <AddressLine>NEW YORK NY 10002</AddressLine> <CountryCode>US</CountryCode> </Address> <Awards> <AwardProvider>NTM4 CROWN</AwardProvider> </Awards> <CheckInTime>16:00</CheckInTime> <CheckOutTime>12:00</CheckOutTime> <ContactNumbers> <ContactNumber Fax="1-212-475 5959" Phone="1-212-475 2600"/> </ContactNumbers> <DirectConnect Ind="false"> <!--I deleted --> </DirectConnect> <IndexData> <!--I deleted --> </IndexData> <PropertyOptionInfo> <!--I deleted --> </PropertyOptionInfo> <PropertyTypeInfo> <!--I deleted --> </PropertyTypeInfo> <SpecialOffers Ind="false"/> <Taxes> <Text>8.5PCT ST</Text> <Text>6.25PCT CT</Text> <Text>3USD OCC</Text> </Taxes> <VendorMessages> <!--I deleted --> </VendorMessages> </BasicPropertyInfo> <Guarantee> <!-- I delete --> </Guarantee> <LongSellTimeIdentifier>D138CA674B4C40A4529719A000000000529719A016233031153</LongSellTimeIdentifier> <RoomRates> <RoomRate DirectConnect="false" GuaranteeSurchargeRequired="G" GuaranteedRateProgram="false" IATA_CharacteristicIdentification="C1KRAC" IATA_ProductIdentification="BEST AVAILABLE RATE" LowInventoryThreshold="false" RPH="001" RateChangeInd="false" RateConversionInd="false" SpecialOffer="false"> <AdditionalInfo> <!-- deleted --> </AdditionalInfo> <Rates> <Rate Amount="550.00" ChangeIndicator="false" CurrencyCode="USD" HRD_RequiredForSell="false" PackageIndicator="false" RateConversionInd="false" ReturnOfRateInd="false" RoomOnRequest="false"> <AdditionalGuestAmounts> <AdditionalGuestAmount MaxExtraPersonsAllowed="1"> <Charges ExtraPerson="50.00"/> </AdditionalGuestAmount> </AdditionalGuestAmounts> <HotelTotalPricing Amount="1269.25"> <Disclaimer>INCLUDES TAXES AND SURCHARGES</Disclaimer> <TotalTaxes Amount="169.25"> <TaxFieldOne>162.26</TaxFieldOne> <TaxFieldThree>3.00</TaxFieldThree> <TaxFieldTwo>3.99</TaxFieldTwo> <Text>STATETAX</Text> <Text>OTHER</Text> <Text>OTHER</Text> </TotalTaxes> </HotelTotalPricing> </Rate> </Rates> </RoomRate> <!-- I deleted Room Rate from RPH="002" to RPH="0025" --> </RoomRates> <TimeSpan Duration="0005" End="2016-09-24" Start="2016-09-22"/> </RoomStay> </HotelPropertyDescriptionRS> </soap-env:Body>

  • OTA_HotelResLLSRQ
  • 请求正文:

    <ns2:OTA_HotelResRQ xmlns:ns2="http://webservices.sabre.com/sabreXML/2011/10" xmlns:ns3="http://services.sabre.com/STL_Header/v120" xmlns:ns4="http://services.sabre.com/STL/v01" Version="2.2.0"> <ns2:Hotel> <ns2:BasicPropertyInfo RPH="001"> <ns2:ConfirmationNumber>ABC123</ns2:ConfirmationNumber> </ns2:BasicPropertyInfo> <ns2:Guarantee Type="GDPST"> <ns2:CC_Info> <ns2:PaymentCard Code="AX" ExpireDate="2020-12" Number="1234567890" /> <ns2:PersonName> <ns2:Surname>TEST</ns2:Surname> </ns2:PersonName> </ns2:CC_Info> </ns2:Guarantee> <ns2:GuestCounts Count="2" /> <ns2:RoomType NumberOfUnits="1"/> <ns2:TimeSpan End="09-24T10:00" Start="09-22T08:00" /> </ns2:Hotel> </ns2:OTA_HotelResRQ>

    响应体:

    <OTA_HotelResRS Version="2.2.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" xmlns:stl="http://services.sabre.com/STL/v01"> <stl:ApplicationResults status="NotProcessed"> <stl:Error type="BusinessLogic" timeStamp="2016-08-20T03:19:25-05:00"> <stl:SystemSpecificResults> <stl:Message>FORMAT</stl:Message> <stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText> </stl:SystemSpecificResults> </stl:Error> </stl:ApplicationResults> </OTA_HotelResRS>

    请提供有效的工作要求身体OTA_HotelResLLSRQ。

    回答

    0

    的信用卡号码“1234567890”很可能是问题的原因。如果这是在Sabre的生产API上完成的,那么这里需要一个真实的信用卡号码。你也应该输入卡所有者的真实姓氏而不是“测试”。

    我的建议是输入真实有效的信用卡号和有效日期。为了防止预订传递给酒店,您应在拨打“OTA_HotelResLLSRQ”后立即致电“IgnoreTransactionLLSRQ”。

    SOAP主体为“IgnoreTransactionLLSRQ”很简单:

    <soapenv:Body> 
        <IgnoreTransactionRQ 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"></IgnoreTransactionRQ> 
    </soapenv:Body> 
    

    这将允许你通过一个有效的信用卡,以“OTA_HotelResLLSRQ”来验证,如果这是你的错误的原因。一旦您的流程正常工作,您可以使用适当的“EndTransactionLLSRQ”将呼叫替换为“IgnoreTransactionLLSRQ”以生成实际预订。

    我希望有帮助!

    0

    信用卡号码太短且无效。房间内应该包含一张可以接受的卡片列表,也许AX不被接受。它也可能不会接受像TEST这样的名字。