Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
945 views
in Technique[技术] by (71.8m points)

soap - Sabre Hotel Rate Description Request

I am trying to get Hotel Rate Description using Sabre SOAP API. But I am getting error which I am unable to debug.

My request payload is

<?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>{{CPAID}}</eb:CPAId>
            <eb:ConversationId>pricedrop</eb:ConversationId>
            <eb:Service eb:type="sabreXML"></eb:Service>
            <eb:Action>HotelRateDescriptionLLSRQ</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  -->
            Shared/IDL:IceSess/SessMgr:1.0.IDL/Common/!ICESMS/CERTG!ICESMSLB/CRT.LB!-3460256494356271327!1683974!0
            </wsse:BinarySecurityToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <HotelRateDescriptionRQ 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.3.0">
        <AvailRequestSegment>
        <GuestCounts Count="1"/>
        <HotelSearchCriteria>
        <Criterion>
        <HotelRef HotelCode="0017804"/>
        </Criterion>
        </HotelSearchCriteria>
        <RatePlanCandidates>
        <RatePlanCandidate CurrencyCode="USD" DCA_ProductCode="A1B2C3D"/>
        </RatePlanCandidates>
        <TimeSpan End="12-28" Start="12-25"/>
        </AvailRequestSegment>
        </HotelRateDescriptionRQ>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

But I got 1VERIFY FORMAT error. The response is given below.

<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="BusinessLogic" timeStamp="2015-12-11T03:01:21-06:00">
                    <stl:SystemSpecificResults>
                        <stl:Message>1VERIFY FORMAT                                                 </stl:Message>
                        <stl:ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</stl:ShortText>
                    </stl:SystemSpecificResults>
                </stl:Error>
            </stl:ApplicationResults>
        </HotelRateDescriptionRS>
    </soap-env:Body>

All my Value in request payload seems correct except for DCA_ProductCode which I didn't understand. Sabre documentation also doesn't explain much about DCA_ProductCode.

What might possibly go wrong in my request payload?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I'm not sure about the value {{CPAID}} of the CPAId element in the soap header being valid (unless that's a reference to a variable or you masked it somehow) - normally you would submit your IPCC there.

Anyway, from the description of the Hotel Rate Description service:

https://developer.sabre.com/docs/read/soap_apis/hotel/search/hotel_rate_description

"Please note that independent HRD, i-HRD, functionality contained within HotelRateDescriptionLLSRQ is not available to users by default. i-HRD negates the need for basing the rate query from a HotelPropertyDescriptionLLSRQ response. In order to utilize this functionality authorization is required. Please contact your sales representative for further details."

It seems that the functionality needs to be activated first. You can contact the Sabre Web Services support team at webservices.support@sabre.com - and ask for iHRD activation.

You'll need to provide your IPCC, and Sabre Web Services environment you're using (CERT / PROD).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...