Travelport / travelport-uapi-tutorial

The travelport-uapi-tutorial is a Java project for Universal API that will help you connect and code a standard workflow including Air and Hotel.
45 stars 34 forks source link

000002 INVALID INPUT #21

Closed yawnt closed 8 years ago

yawnt commented 8 years ago

Hi,

I'm trying to run some Java code for an AirPriceRQ and I'm getting 000002 INVALID INPUT This is the XML I'm sending

<soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:AirPriceReq
            xmlns="http://www.travelport.com/schema/common_v34_0"
            xmlns:ns2="http://www.travelport.com/schema/air_v34_0"
            xmlns:ns3="http://www.travelport.com/schema/rail_v34_0" TraceId="prova"  authorizedBy="user" TargetBranch="$TARGETBRANCH">
            <BillingPointOfSaleInfo OriginApplication="$ORIGINAPPLICATION"/>
            <ns2:AirItinerary>
                <ns2:AirSegment Group="0" Carrier="VY" FlightNumber="1813" ETicketability="Yes" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="false" AvailabilitySource="A" ProviderCode="1G" FlightTime="120" Distance="681" Origin="MUC" Destination="BCN" DepartureTime="2015-12-12T09:45:00.000+01:00" ArrivalTime="2015-12-12T11:45:00.000+01:00" ParticipantLevel="Secure Sell" PolledAvailabilityOption="No polled avail exists" AvailabilityDisplayType="Fare Shop/Optimal Shop" Key="d7MAaFV1T0Ci9guZHoyNwA=="/>
            </ns2:AirItinerary>
            <SearchPassenger Code="ADT" BookingTravelerRef="gr8AVWGCR064r57Jt0+8bA=="/>
            <ns2:AirPricingCommand/>
        </ns2:AirPriceReq>
    </soap:Body>
</soap:Envelope>

Any idea why is that? Also another question, when I first query LowFareSearch I can add a @BookingTravelerRef field to the passengers, how is that string chosen? Is it arbitrary? Thanks!

vivekjyotipramanik commented 8 years ago

Hi yawnt,

Thank you for your interest in Travelport Universal API. Could you please confirm which value you are sending in the OriginApplication attribute & TargetBranch attribute. In the XML provide it is showing as $ORIGINAPPLICATION and $TARGETBRANCH.

Regarding your question on @BookingTravelerRef, the Key can be anything like a alpha numeric number or any number like 1, 1T etc. The string in LowFareSearch is arbitary, in the subsequent steps, like AirPriceReq, AirCreateReservationReq etc, we need to use the same Key for that particular bookingTraveler. If there are more than one booking traveler present, then we have to use unique Key for each of them. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

yawnt commented 8 years ago

TARGETBRANCH = "P7004997"
ORIGINAPPLICATION = "C*0000538817" (We are using Galileo)

All clear for the @BookingTravelerRef, thanks a lot! Regards,

vivekjyotipramanik commented 8 years ago

Hi yawnt,

Could you please try with OriginApplicatiojn as UAPI. Please let me know if you are having the same error response. Please let me know how it goes. Thanks.

Thanks & Regards Vivekjyoti Pramanik

yawnt commented 8 years ago

Same error, here's the full error

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Body><SOAP:Fault><faultcode>Server.System</faultcode><faultstring>000002 INVALID INPUT </faultstring><detail><common_v34_0:ErrorInfo xmlns:common_v34_0="http://www.travelport.com/schema/common_v34_0"><common_v34_0:Code>3101</common_v34_0:Code><common_v34_0:Service>WEBSVC</common_v34_0:Service><common_v34_0:Type>System</common_v34_0:Type><common_v34_0:Description>Invalid input data. Generic data validation failure message.</common_v34_0:Description><common_v34_0:TransactionId>ED8DE89F0A076478D64BFD46D3FBABBB</common_v34_0:TransactionId><common_v34_0:TraceId>prova</common_v34_0:TraceId></common_v34_0:ErrorInfo></detail></SOAP:Fault></SOAP:Body></SOAP:Envelope>

Here's the amended request with UAPI as you suggested

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:AirPriceReq xmlns="http://www.travelport.com/schema/common_v34_0" xmlns:ns2="http://www.travelport.com/schema/air_v34_0" xmlns:ns3="http://www.travelport.com/schema/rail_v34_0" TraceId="prova" AuthorizedBy="user" TargetBranch="P7004997"><BillingPointOfSaleInfo OriginApplication="UAPI"/><ns2:AirItinerary><ns2:AirSegment Group="0" Carrier="VY" FlightNumber="1813" ETicketability="Yes" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="false" AvailabilitySource="A" ParticipantLevel="Secure Sell" PolledAvailabilityOption="No polled avail exists" AvailabilityDisplayType="Fare Shop/Optimal Shop" FlightTime="120" Distance="681" ProviderCode="1G" Origin="MUC" Destination="BCN" DepartureTime="2015-12-12T09:45:00.000+01:00" ArrivalTime="2015-12-12T11:45:00.000+01:00" Key="9n00ISTNRy+0UcjVFcaurg=="><ns2:AirAvailInfo ProviderCode="1G"/></ns2:AirSegment></ns2:AirItinerary><SearchPassenger Code="ADT" BookingTravelerRef="gr8AVWGCR064r57Jt0+8bA=="/><ns2:AirPricingCommand/></ns2:AirPriceReq></soap:Body></soap:Envelope>

Thanks and regards,

yawnt commented 8 years ago

any idea? Thanks & Regards,

yawnt commented 8 years ago

still having the same issue @vivekjyotipramanik , this is a bit frustrating because I can't move on without this :(

vivekjyotipramanik commented 8 years ago

Hi yawnt,

Apologies for the delay. I was out in a conference. I used the below xml and it worked just fine. I have added the AirPricingModifiers with PlatingCarrier. Some Airlines require PlatingCarrier to process the pricereq. Please find below the request and response. If the XML is not working for you, Please try a different Origin/Destination and a different carrier. Please let me know how it. goes. Thanks.

Request:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:AirPriceReq TraceId="prova" AuthorizedBy="user" TargetBranch="useYourTargetBranch" xmlns="http://www.travelport.com/schema/common_v34_0" xmlns:ns2="http://www.travelport.com/schema/air_v34_0" xmlns:ns3="http://www.travelport.com/schema/rail_v34_0">
         <BillingPointOfSaleInfo OriginApplication="UAPI"/>
         <ns2:AirItinerary>
            <ns2:AirSegment Group="0" Carrier="VY" FlightNumber="1813" ETicketability="Yes" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="false" AvailabilitySource="A" ParticipantLevel="Secure Sell" PolledAvailabilityOption="No polled avail exists" AvailabilityDisplayType="Fare Shop/Optimal Shop" FlightTime="120" Distance="681" ProviderCode="1G" Origin="MUC" Destination="BCN" DepartureTime="2015-12-12T09:45:00.000+01:00" ArrivalTime="2015-12-12T11:45:00.000+01:00" Key="9n00ISTNRy+0UcjVFcaurg==">
               <ns2:AirAvailInfo ProviderCode="1G"/>
            </ns2:AirSegment>
         </ns2:AirItinerary>
         <ns2:AirPricingModifiers PlatingCarrier="VY"></ns2:AirPricingModifiers>
         <SearchPassenger Code="ADT" BookingTravelerRef="gr8AVWGCR064r57Jt0+8bA=="/>
         <ns2:AirPricingCommand/>
      </ns2:AirPriceReq>
   </soap:Body>
</soap:Envelope>

Response:

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP:Body>
      <air:AirPriceRsp TraceId="prova" TransactionId="075444190A07761E968AF7F064EED8B1" ResponseTime="1145" xmlns:air="http://www.travelport.com/schema/air_v34_0" xmlns:common_v34_0="http://www.travelport.com/schema/common_v34_0">
         <common_v34_0:ResponseMessage Code="710401" Type="Warning" ProviderCode="1G">Taxes returned at the FareInfo level are for informational purposes only, and may differ from those returned at the Itinerary/Passenger Type levels.</common_v34_0:ResponseMessage>
         <common_v34_0:ResponseMessage Code="4400" Type="Warning">No Merchandising optional services returned for Flight(s) [VY][1813]</common_v34_0:ResponseMessage>
         <air:AirItinerary>
            <air:AirSegment Key="iXF+AFtrT+2LzWPRdCTbUQ==" Group="0" Carrier="VY" FlightNumber="1813" ProviderCode="1G" Origin="MUC" Destination="BCN" DepartureTime="2015-12-12T09:45:00.000+01:00" ArrivalTime="2015-12-12T11:45:00.000+01:00" FlightTime="120" TravelTime="120" Distance="681" ClassOfService="P" Equipment="320" ChangeOfPlane="false" OptionalServicesIndicator="false" AvailabilitySource="A" ParticipantLevel="Secure Sell" PolledAvailabilityOption="O and D cache or polled status used with different local status" AvailabilityDisplayType="Fare Specific Fare Quote Unbooked">
               <air:AirAvailInfo ProviderCode="1G"/>
               <air:FlightDetails Key="XschbPUkT+Ox4+PeFKQeNw==" Origin="MUC" Destination="BCN" DepartureTime="2015-12-12T09:45:00.000+01:00" ArrivalTime="2015-12-12T11:45:00.000+01:00" FlightTime="120" TravelTime="120" Distance="681"/>
            </air:AirSegment>
         </air:AirItinerary>
         <air:AirPriceResult>
            <air:AirPricingSolution Key="nwoilql0QEuEpMGAIPEVGg==" TotalPrice="USD46.00" BasePrice="EUR6.00" ApproximateTotalPrice="USD46.00" ApproximateBasePrice="USD7.00" EquivalentBasePrice="USD7.00" Taxes="USD39.00" ApproximateTaxes="USD39.00" QuoteDate="2015-11-14">
               <air:AirSegmentRef Key="iXF+AFtrT+2LzWPRdCTbUQ=="/>
               <air:AirPricingInfo Key="mNhBqS8cQuK0P5yugBvk5A==" TotalPrice="USD46.00" BasePrice="EUR6.00" ApproximateTotalPrice="USD46.00" ApproximateBasePrice="USD7.00" EquivalentBasePrice="USD7.00" ApproximateTaxes="USD39.00" Taxes="USD39.00" LatestTicketingTime="2015-11-15T23:59:00.000-05:00" PricingMethod="Guaranteed" IncludesVAT="false" ETicketability="Yes" ProviderCode="1G">
                  <air:FareInfo Key="cIRqpwmJS9Gto6yq/dyu6g==" FareBasis="POWVY" PassengerTypeCode="ADT" Origin="MUC" Destination="BCN" EffectiveDate="2015-11-14T13:49:00.000-05:00" DepartureDate="2015-12-12" Amount="USD7.00" NotValidBefore="2015-12-12" NotValidAfter="2015-12-12" TaxAmount="USD39.00">
                     <common_v34_0:Endorsement Value="NON END/NON REF/CHGS RESTR"/>
                     <common_v34_0:Endorsement Value="RESTRICTION APPLY"/>
                     <air:FareRuleKey FareInfoRef="cIRqpwmJS9Gto6yq/dyu6g==" ProviderCode="1G">6UUVoSldxwh6h9vbXpbbjsbKj3F8T9EyxsqPcXxP0TIjSPOlaHfQe5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA5cuasWd6i8Dly5qxZ3qLwOXLmrFneovA5EuDUtbG+96M3ExqSoG0523KcJwsul9grIRbpRNnPHQJHXyDAS6XXJw1vMNXxnwZL2EQ2X0xcGxgaFpYEizwAti4BZ9wfbD3UlPIHnH21hJzFOd+W7w/Uzbf9H6qI5IaFdD44JNDZl7KxTaudMNlTFDxXO2ZkIT/pqQR/cHoRjB6zDPr6s6tUWLhbABMTKFZb+F729rtUMfv4Xvb2u1Qx+/he9va7VDH7+F729rtUMfv4Xvb2u1Qx88sWrgLPr3gRN9PARV7He0DzanJpkuq+wdljeBI2GpKn3EX8H7aC7fZhXB8qqtdnzxVDm4kyLUOeRsBfJKkIog</air:FareRuleKey>
                  </air:FareInfo>
                  <air:BookingInfo BookingCode="P" CabinClass="Economy" FareInfoRef="cIRqpwmJS9Gto6yq/dyu6g==" SegmentRef="iXF+AFtrT+2LzWPRdCTbUQ=="/>
                  <air:TaxInfo Category="DE" Amount="USD6.50" Key="qbk6G7LHTueTN4QMDaX++w=="/>
                  <air:TaxInfo Category="OY" Amount="USD8.40" Key="X3TZWpDkTCmrfF4gutTLNA=="/>
                  <air:TaxInfo Category="RA" Amount="USD21.90" Key="wcZDwyymRdCmLjpWXyU3UA=="/>
                  <air:TaxInfo Category="YQ" Amount="USD2.20" Key="4+s0d/BSTDOfe5CYGo7ecg=="/>
                  <air:FareCalc>MUC VY BCN 6.69POWVY NUC6.69END ROE0.896229</air:FareCalc>
                  <air:PassengerType Code="ADT"/>
                  <air:ChangePenalty>
                     <air:Amount>USD50.00</air:Amount>
                  </air:ChangePenalty>
                  <air:BaggageAllowances>
                     <air:BaggageAllowanceInfo TravelerType="ADT" Origin="MUC" Destination="BCN" Carrier="VY">
                        <air:URLInfo>
                           <air:URL>MYTRIPANDMORE.COM/BAGGAGEDETAILSVY.BAGG</air:URL>
                        </air:URLInfo>
                        <air:TextInfo>
                           <air:Text>1P</air:Text>
                           <air:Text>BAGGAGE DISCOUNTS MAY APPLY BASED ON FREQUENT FLYER STATUS/ ONLINE CHECKIN/FORM OF PAYMENT/MILITARY/ETC.</air:Text>
                        </air:TextInfo>
                        <air:BagDetails ApplicableBags="1stChecked" BasePrice="EUR0.00" ApproximateBasePrice="USD0.00" TotalPrice="EUR0.00" ApproximateTotalPrice="USD0.00">
                           <air:BaggageRestriction>
                              <air:TextInfo>
                                 <air:Text>UPTO50LB/23KG AND UPTO62LI/158LCM</air:Text>
                              </air:TextInfo>
                           </air:BaggageRestriction>
                        </air:BagDetails>
                        <air:BagDetails ApplicableBags="2ndChecked">
                           <air:BaggageRestriction>
                              <air:TextInfo>
                                 <air:Text>BAGGAGE CHARGES DATA NOT AVAILABLE</air:Text>
                              </air:TextInfo>
                           </air:BaggageRestriction>
                        </air:BagDetails>
                     </air:BaggageAllowanceInfo>
                     <air:CarryOnAllowanceInfo Origin="MUC" Destination="BCN" Carrier="VY">
                        <air:TextInfo>
                           <air:Text>BAGGAGE ALLOWANCE DATA NOT AVAILABLE</air:Text>
                        </air:TextInfo>
                     </air:CarryOnAllowanceInfo>
                  </air:BaggageAllowances>
               </air:AirPricingInfo>
               <air:FareNote Key="PI2kAOEXRxa0SDqf1KDpzA==">RATE USED IN EQU TOTAL IS BSR 1EUR - 1.1215USD</air:FareNote>
               <air:FareNote Key="xyht4yFEQJCAP690okLMpA==">LAST DATE TO PURCHASE TICKET: 15NOV15</air:FareNote>
               <air:FareNote Key="e44+4JqJQ0O656TW1Tsw+g==">FARE HAS A PLATING CARRIER RESTRICTION</air:FareNote>
               <air:FareNote Key="1Dxc3pGIR9a58jmpJl/JiA==">E-TKT REQUIRED</air:FareNote>
               <air:FareNote Key="tSSzXZplSsWgLNbIJnoD2g==">TICKETING FEES MAY APPLY</air:FareNote>
            </air:AirPricingSolution>
         </air:AirPriceResult>
      </air:AirPriceRsp>
   </SOAP:Body>
</SOAP:Envelope>

Thanks & Regards Vivekjyoti Pramanik

yawnt commented 8 years ago

I asked for new credentials, and the problem disappeared, same request as before .. maybe it's an issue with the old account?

I hit another issue which said "INVALID CITY PAIR ON PSEUDO SEGMENT", I fixed that my making sure I reuse the same AirSegment from the Request.. is there a place where I can look up exactly what this errors mean? They can be very cryptic at times Also, is there a way to contact support which isn't here on GitHub? Skype or anything? Thanks!

vivekjyotipramanik commented 8 years ago

Hi yawnt,

Please find below the link where all the error codes are described.

https://support.travelport.com/webhelp/uapi/uAPI.htm#Error_Codes/Error_Codes_and_Messages.htm%3FTocPath%3DError%2520Codes%2520and%2520Messages%7C_____0

The best and quickest way to get support is to raise an ORS ticket. Please let me know your email address and other details like name,company name etc. and we will have someone contact you regarding the proceedings. Thanks.

Thanks & Regards Vivekjyoti Pramanik