2017-06-23 3 views
0

Ich erstelle Soap-Anfrage für die Luftverfügbarkeit Saber API. Ich verwende Soap-Parameter aus der API-Dokumentation. zuerst fordere ich an, Session-Token zu bekommen, und ich bekomme einen erfolgreich, aber wenn ich API-Anfrage feuere, bekomme ich Service-Fehler. es sagt, dass ich ungültigen Dienst oder Version und seine 500 Fehler verwende. Ich habe alles überprüft nicht sicher, was als nächstes zu tun ist. bitte hilfe.Saber Air Verfügbarkeit Soap Api v-2.4 löst eine Ausnahme ERR.SWS.CLIENT.INVALID_SERVICE

Säbel api Link: https://developer.sabre.com/docs/read/soap_apis/air/search/Air_Availability hier ist die Anfrage Snippet Postbote:

<?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" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> 
    <SOAP-ENV:Header> 
     <eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="2.0"> 
      <eb:ConversationId>[email protected]</eb:ConversationId> 
      <eb:From> 
       <eb:PartyId type="urn:x12.org:IO5:01">WebServiceClient</eb:PartyId> 
      </eb:From> 
      <eb:To> 
       <eb:PartyId type="urn:x12.org:IO5:01">WebServiceSupplier</eb:PartyId> 
      </eb:To> 
      <eb:CPAId>F9CE</eb:CPAId> 
      <eb:Service eb:type="sabreXML">OTA_AirAvailLLSRQ</eb:Service> 
      <eb:Action>OTA_AirAvailLLSRQ</eb:Action> 
      <eb:MessageData> 
       <eb:MessageId>mid:[email protected]</eb:MessageId> 
       <eb:Timestamp>2017-06-20T11:15:14Z</eb:Timestamp> 
       <eb:Timeout>50</eb:Timeout> 
      </eb:MessageData> 
     </eb:MessageHeader> 
     <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"> 
      <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">Shared/IDL:IceSess\/SessMgr:1\.0.IDL/Common/!ICESMS\/ACPCRTD!ICESMSLB\/CRT.LB!-3261887980644185979!896467!0 
      </wsse:BinarySecurityToken> 
     </wsse:Security> 
    </SOAP-ENV:Header> 
    <SOAP-ENV:Body> 
     <eb:Manifest SOAP-ENV:mustUnderstand="1" eb:version="2.0"> 
      <eb:Reference xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="cid:OTA_AirAvailRQ" xlink:type="simple"/> 
     </eb:Manifest> 
     <POS> 
      <Source PseudoCityCode="F9CE"/> 
     </POS> 
     <OTA_AirAvailRQ Version="2.4.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"> 
      <OriginDestinationInformation> 
       <FlightSegment DepartureDateTime="12-21"> 
        <DestinationLocation LocationCode="LHR" /> 
        <OriginLocation LocationCode="DFW" /> 
       </FlightSegment> 
      </OriginDestinationInformation> 
     </OTA_AirAvailRQ> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 

Antwort

0

Vergewissern Sie sich, dass der Körper enthält nur die OTA_AirAvailLLSRQ Nutzlast und Sie werden eine erfolgreiche Antwort erhalten.

<SOAP-ENV:Body> 
    <OTA_AirAvailRQ Version="2.4.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"> 
     <OriginDestinationInformation> 
      <FlightSegment DepartureDateTime="12-21"> 
       <DestinationLocation LocationCode="LHR" /> 
       <OriginLocation LocationCode="DFW" /> 
      </FlightSegment> 
     </OriginDestinationInformation> 
    </OTA_AirAvailRQ> 
</SOAP-ENV:Body> 
+0

Ja, ich versuche, dass früher, aber diesen Fehler dann Sendeanforderung an den Host fehlgeschlagen ERR .SWS.HOST.CONNECTOR_ERROR

+0

Dieses RQ funktionierte gut für mich. Wird immer noch der gleiche Fehler zurückgegeben? Oder war es nur einmal? – Bruno

+0

Hallo Bruno Danke für die Antwort. Ich probierte die Anfrage entsprechend, aber immer noch einen weiteren Fehler "Senden der Anfrage an den Host fehlgeschlagen", so dass ich verwirrt bin, wie das zu beheben ist. Ich denke, ich muss einige der Platzhalter wissen. Kannst du mir bitte sagen, wie man einen Wert von einigen Feldern wie CPAID, Service, Partyid und schließlich PseudoCityCode bekommt? Ich weiß nicht, woher ich sie bekommen soll. kannst du mir bitte auch den richtigen Endpunkt für diese Anfrage angeben. Danke –

0

zu Brunos Kommentaren Gebunden, die unten angefordert hat gut funktioniert:

<?xml version='1.0' encoding='UTF-8'?> 
<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="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>YOURPCC</eb:CPAId> 
      <eb:ConversationId>YourConversationId</eb:ConversationId> 
      <eb:Service eb:type="sabreXML"></eb:Service> 
      <eb:Action>OTA_AirAvailLLSRQ</eb:Action> 
     </eb:MessageHeader> 
     <eb:Security xmlns:eb="http://schemas.xmlsoap.org/ws/2002/12/secext" SOAP-ENV:mustUnderstand="0"> 
      <eb:BinarySecurityToken>YOUR SESSION TOKEN</eb:BinarySecurityToken> 
     </eb:Security> 
    </SOAP-ENV:Header> 
    <SOAP-ENV:Body> 
<OTA_AirAvailRQ Version="2.4.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"> 
    <OriginDestinationInformation> 
     <FlightSegment DepartureDateTime="12-21"> 
      <DestinationLocation LocationCode="LHR" /> 
      <OriginLocation LocationCode="DFW" /> 
     </FlightSegment> 
    </OriginDestinationInformation> 
</OTA_AirAvailRQ> 
    </SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
Verwandte Themen