cvc-elt.1.a: Cannot find the declaration of element 'OTA_AirLowFareSearchRQ'

感情迁移 提交于 2019-12-25 05:46:09

问题


I am using the Sabre GDS API. Every request on GDS needs Session so that i have developed the session but when i call the Bargain Finder Max Alternate Date API then i am getting the following error. I am badly stuck on it and things are going over to my head. Please help me on this and i am really grateful to you guys.

Following is the request :

<?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.somesite.org/schemas Schema.xsd">
    <SOAP-ENV:Header>
        <m:MessageHeader xmlns:m="http://www.ebxml.org/namespaces/messageHeader">
            <m:From>
                <m:PartyId type="urn:x12.org:IO5:01">webservices.sabre.com</m:PartyId>
            </m:From>
            <m:To>
                <m:PartyId type="urn:x12.org:IO5:01">SWSSession</m:PartyId>
            </m:To>
            <m:CPAId>X2TH</m:CPAId>
            <m:ConversationId>MyConversationID</m:ConversationId>
            <m:Service m:type="sabreXML" />
            <m:Action>BargainFinderMax_ADRQ</m:Action>
            <m:MessageData>
                <m:MessageId>2afbf3e7-8de6-4397-9fcb-8c9b01624131@61</m:MessageId>
                <m:Timestamp>2015-10-13T12:18:05</m:Timestamp>
                <m:TimeToLive>2015-10-14T12:18:05</m:TimeToLive>
            </m:MessageData>
        </m:MessageHeader>
        <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext">
            <wsse:BinarySecurityToken EncodingType="wsse:Base64Binary" valueType="String">Token Here</wsse:BinarySecurityToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <OTA_AirLowFareSearchRQ Version="1.9.0" ResponseType="OTA" ResponseVersion="1.9.0">
            <POS>
                <Source PseudoCityCode="XXXX">
                    <RequestorID ID="1" Type="1">
                        <CompanyName Code="TN">TN</CompanyName>
                    </RequestorID>
                </Source>
            </POS>
            <OriginDestinationInformation>
                <DepartureDateTime>2015-10-25T20:06:25</DepartureDateTime>
                <OriginLocation LocationCode="LHE" />
                <DestinationLocation LocationCode="LHR" />
                <TPA_Extensions>
                    <ConnectionTime Max="0" />
                </TPA_Extensions>
            </OriginDestinationInformation>
            <OriginDestinationInformation>
                <DepartureDateTime>2015-10-25T20:06:25</DepartureDateTime>
                <OriginLocation LocationCode="LHR" />
                <DestinationLocation LocationCode="LHE" />
                <TPA_Extensions>
                    <ConnectionTime Max="0" />
                </TPA_Extensions>
            </OriginDestinationInformation>
            <TravelPreferences ValidInterlineTicket="true">
                <TPA_Extensions>
                    <InterlineIndicator Ind="true" />
                </TPA_Extensions>
            </TravelPreferences>
            <TravelerInfoSummary>
                <AirTravelerAvail>
                    <PassengerTypeQuantity Code="ADT" Quantity="1" /></AirTravelerAvail>
                <PriceRequestInformation CurrencyCode="PKR">
                    <TPA_Extensions>
                        <Priority>
                            <Price Priority="1" />
                            <DirectFlights Priority="2" />
                            <Time Priority="3" />
                            <Vendor Priority="4" />
                        </Priority>
                    </TPA_Extensions>
                </PriceRequestInformation>
            </TravelerInfoSummary>
            <TPA_Extensions>
                <IntelliSellTransaction>
                    <RequestType Name="AD3" />
                </IntelliSellTransaction>
            </TPA_Extensions>
        </OTA_AirLowFareSearchRQ>
    </SOAP-ENV:Body> </SOAP-ENV:Envelope>

And here is the response which i am getting from the API. Please Help me where i am going wrong. I am using the PHP with SOAP.

<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" SOAP-ENV:mustUnderstand="1" eb:version="2.0">
            <eb:From>
                <eb:PartyId>SWSSession</eb:PartyId>
            </eb:From>
            <eb:To>
                <eb:PartyId>webservices.sabre.com</eb:PartyId>
            </eb:To>
            <eb:CPAId>X2TH</eb:CPAId>
            <eb:ConversationId>MyConversationID</eb:ConversationId>
            <eb:Service/>
            <eb:Action>BargainFinderMax_ADRS</eb:Action>
            <eb:MessageData>
                <eb:MessageId>mid:20151013-181754456-4812.BargainFinderMax_ADRS@webservices.sabre.com</eb:MessageId>
                <eb:Timestamp>2015-10-13T18:17:54Z</eb:Timestamp>
            </eb:MessageData>
            <eb:RefToMessageId>2afbf3e7-8de6-4397-9fcb-8c9b01624131@61</eb:RefToMessageId>
        </eb:MessageHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <OTA_AirLowFareSearchRS Version="1.9.0" xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <Errors>
                <Error Type="SERVER" Code="ttfhli700" ShortText="80">TOMCAT</Error>
                <Error Type="ERR" Code="INVALIDREQ" ShortText="Schema Validation Failed">cvc-elt.1.a: Cannot find the declaration of element 'OTA_AirLowFareSearchRQ'.</Error>
            </Errors>
        </OTA_AirLowFareSearchRS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Its giving me Schema Validation error and i am not immense familiar with XML/XSI. Thanks in advance


回答1:


It seems like you are missing this part.

xmlns="http://www.opentravel.org/OTA/2003/05"

in the tag

<OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.9.0" ResponseType="OTA" ResponseVersion="1.9.0">

hope this will solve your problem.

Thanks.



来源:https://stackoverflow.com/questions/33109904/cvc-elt-1-a-cannot-find-the-declaration-of-element-ota-airlowfaresearchrq

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!