我正在办理酒店预订工作流程。但我在Hotel Reservation API上苦苦挣扎。下面我提到了我所做的一步一步的活动。请帮我解决这个问题。
我使用OTA_HotelAvailRQ API搜索纽约[" NYC"]城市酒店并获得成功回复。
从回复中选择酒店代码[HotelCode =" 0048286" ]属性并提供给HotelPropertyDescriptionLLSRQ api然后成功回复。
从该响应中,从房价元素中选择房价元素的第一个RPH属性[<房间价格> < RoomRate RPH =" 001" > ]并提供给OTA_HotelResLLSRQ API。
但是发生了以下错误。工作流程在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>
申请机构:
<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>
反应体或肥皂体:
<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>
请求正文:
<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>
请求正文:
<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 :(得分:0)
您是否尝试过使用真正的测试信用卡申请?
https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
答案 1 :(得分:0)
信用卡号码“1234567890”可能是问题的原因。如果在Sabre的生产API上进行此操作,则需要一个真实的信用卡号。您还应输入卡所有者的真实姓氏,而不是“TEST”。
我的建议是输入真实有效的信用卡号和有效期。为防止预订被传递到酒店,您应在致电“OTA_HotelResLLSRQ”后立即拨打“IgnoreTransactionLLSRQ”。
“IgnoreTransactionLLSRQ”的SOAP主体非常简单:
<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”调用以生成实际预订。
我希望有所帮助!
答案 2 :(得分:0)
信用卡号码太短且无效。房价应包括已接受卡的列表,也许不接受AX。它也可能不接受像TEST这样的名字。