Sabre搜索PNR

时间:2016-02-02 15:49:49

标签: c# web-services soapui sabre

我在开发时使用SoapUI项目进行了一些测试,但是当我尝试执行Trip_Search API时,我只能通过Name Criteria和View TripSearchTN获取PNR号码,如果我使用其他标准或视图,它不起作用。

此外,响应只是PNR号码,我没有收到行程信息,

你能帮我弄清楚我的错误吗?

由于

请求:

<Trip_SearchRQ Version="4.2.0" EchoToken="ECHO" xmlns="http://webservices.sabre.com/triprecord">
  <ReadRequests>
    <ReservationReadRequest>
        <NameCriteria>
        <Name>
          <FirstName MatchMode="EXACT">DLC</FirstName>
          <LastName MatchMode="SIMILAR">TEST</LastName>
        </Name>
      </NameCriteria>
      <PosCriteria AirlineCode="AA">
        <Pcc>ipcc</Pcc>
      </PosCriteria>
      <ReturnOptions MaxItemsReturned="200" ResponseFormat="STL" ViewName="TripSearchTN"/>
    </ReservationReadRequest>
  </ReadRequests>
</Trip_SearchRQ>

响应:

<Trip_SearchRS EchoToken="ECHO" TimeStamp="2016-01-29T17:50:48" Target="Test" Version="4.2.0" xmlns="http://webservices.sabre.com/triprecord" xmlns:ns9="http://www.sabre.com/ssg/des/v1" xmlns:ns5="http://tds.sabre.com/rules" xmlns:ns12="http://www.sabre.com/eps/schemas" xmlns:ns13="http://tds.sabre.com/distribution" xmlns:ns6="http://tds.sabre.com/itinerary" xmlns:ns7="http://services.sabre.com/STL_Header/v02_00" xmlns:ns10="http://www.OpenTravel.org/ns/OTA2/AppInfo_v01_00" xmlns:ns8="http://services.sabre.com/STL/v02" xmlns:ns11="http://opentravel.org/common/v02" xmlns:ns2="http://services.sabre.com/STL/v01" xmlns:ns4="http://webservices.sabre.com/sabreXML/2003/07" xmlns:ns3="http://webservices.sabre.com/pnrbuilder">
         <Success>Success</Success>
         <ReservationsList NumberResults="3" NumberPages="1" TotalResults="3">
            <Reservations>
               <Reservation Locator="OQGCOA">
                  <ns3:GetReservationRS>
                     <ns3:Reservation>
                        <ns3:BookingDetails>
                           <ns3:RecordLocator>OQGCOA</ns3:RecordLocator>
                           <ns3:CreationTimestamp>2016-01-29T09:40:00</ns3:CreationTimestamp>
                        </ns3:BookingDetails>
                        <ns3:POS>
                           <ns3:Source PseudoCityCode="ipcc" AirlineVendorID="AA"/>
                        </ns3:POS>
                        <ns3:PassengerReservation/>
                     </ns3:Reservation>
                  </ns3:GetReservationRS>
               </Reservation>
               <Reservation Locator="VVFMOE">
                  <ns3:GetReservationRS>
                     <ns3:Reservation>
                        <ns3:BookingDetails>
                           <ns3:RecordLocator>VVFMOE</ns3:RecordLocator>
                           <ns3:CreationTimestamp>2016-01-28T09:05:00</ns3:CreationTimestamp>
                        </ns3:BookingDetails>
                        <ns3:POS>
                           <ns3:Source PseudoCityCode="ipcc" AirlineVendorID="AA"/>
                        </ns3:POS>
                        <ns3:PassengerReservation/>
                     </ns3:Reservation>
                  </ns3:GetReservationRS>
               </Reservation>
               <Reservation Locator="VVGNID">
                  <ns3:GetReservationRS>
                     <ns3:Reservation>
                        <ns3:BookingDetails>
                           <ns3:RecordLocator>VVGNID</ns3:RecordLocator>
                           <ns3:CreationTimestamp>2016-01-28T09:07:00</ns3:CreationTimestamp>
                        </ns3:BookingDetails>
                        <ns3:POS>
                           <ns3:Source PseudoCityCode="ipcc" AirlineVendorID="AA"/>
                        </ns3:POS>
                        <ns3:PassengerReservation/>
                     </ns3:Reservation>
                  </ns3:GetReservationRS>
               </Reservation>
            </Reservations>
         </ReservationsList>
      </Trip_SearchRS>

2 个答案:

答案 0 :(得分:0)

尝试将ReturnOptions's ViewName属性更改为FULL

<ReturnOptions ViewName="FULL" ...

答案 1 :(得分:0)

IF you want see Itinerary Information From Booked PNR, Use Following web-service


TravelItineraryReadRQ
====================================



<TravelItineraryReadRQ Version="3.6.0" TimeStamp="2012-09-19T10:00:00-06:00" xmlns="http://services.sabre.com/res/tir/v3_6">
    <MessagingDetails>
        <SubjectAreas>
            <SubjectArea>FULL</SubjectArea>
        </SubjectAreas>
    </MessagingDetails>
    <UniqueID ID="NWJTGT" />
    <EchoToken/>
</TravelItineraryReadRQ>


Note: You can view your booked pnr only(your account mapped pnr)