2016-12-21 68 views
0

我調用了Sabre SOAP API請求CreditVerificationLLSRQ來獲得信用卡審批響應,這裏我收到了響應中的一些錯誤。任何人都可以建議我解決這個錯誤。我的要求是以下幾點:在Sabre Soap API中獲得信用卡審批

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:mes="http://www.ebxml.org/namespaces/messageHeader" xmlns:v3="http://services.sabre.com/sp/eab/v3_2"> 
    <soapenv:Header> 
     <sec:Security> 

     <sec:BinarySecurityToken>XXXXXXXXXXXXXXXXXXXXX</sec:BinarySecurityToken> 
     </sec:Security> 
     <mes:MessageHeader> 
     <mes:From> 
      <!--1 or more repetitions:--> 
      <mes:PartyId mes:type="urn:x12.org:IO5:01">from</mes:PartyId> 
     </mes:From> 
     <mes:To> 
      <!--1 or more repetitions:--> 
      <mes:PartyId mes:type="urn:x12.org:IO5:01">ws</mes:PartyId> 
     </mes:To> 
     <mes:CPAId>XXXX</mes:CPAId> 
     <mes:ConversationId>XXXXXXXXXXXXX</mes:ConversationId> 
     <mes:Service mes:type="sabreXML">sabreXML</mes:Service> 
     <mes:Action>CreditVerificationLLSRQ</mes:Action> 
     <mes:MessageData> 
      <mes:MessageId>00000</mes:MessageId> 
      <mes:Timestamp>233</mes:Timestamp> 

     </mes:MessageData> 

     <!--Zero or more repetitions:--> 
     <mes:Description xml:lang="en-US">Testing</mes:Description> 
     <!--You may enter ANY elements at this point--> 
     </mes:MessageHeader> 
    </soapenv:Header> 
    <soapenv:Body> 

    <CreditVerificationRQ Version="2.2.0" > 
    <Credit> 
     <CC_Info> 
      <PaymentCard AirlineCode="F9" Code="123" ExpireDate="2017-04" Number="4111111111111111" /> 
     </CC_Info> 
     <ItinTotalFare> 
      <TotalFare Amount="565.36" CurrencyCode="USD" /> 
     </ItinTotalFare> 
    </Credit> 
</CreditVerificationRQ> 
    </soapenv:Body> 
</soapenv:Envelope> 

我得到的反應是錯誤的以下內容:

<soap-env:Fault> 
     <faultcode>soap-env:Client.Validation</faultcode> 
     <faultstring>ERR.SWS.CLIENT.VALIDATION_FAILED</faultstring> 
     <detail> 
      <stl:ApplicationResults status="NotProcessed" xmlns:stl="http://services.sabre.com/STL/v01"> 
       <stl:Error timeStamp="2016-12-21T06:58:35-06:00" type="Validation"> 
        <stl:SystemSpecificResults> 
        <stl:Message>cvc-elt.1: Cannot find the declaration of element 'CreditVerificationRQ'.</stl:Message> 
        <stl:ShortText>ERR.SWS.CLIENT.VALIDATION_FAILED</stl:ShortText> 
        </stl:SystemSpecificResults> 
       </stl:Error> 
      </stl:ApplicationResults> 
     </detail> 
     </soap-env:Fault> 

回答

1

你錯過了命名空間聲明。嘗試在RQ標題中添加xmlns =「http://webservices.sabre.com/sabreXML/2011/10」。

+0

非常感謝Bruno。這對我有好處。 –