Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] :1:602: cvc-complex-type.4: Attribute 'Key' must appear on element 'AirPricingSolution' #223

Open
salmanelahi93 opened this issue May 6, 2021 · 2 comments

Comments

@salmanelahi93
Copy link

Im receiving following exception while booking a flight.

Attribute 'Key' must appear on element 'AirPricingSolution'

Please find the req xml below:

<AirCreateReservationReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TargetBranch="PXXXXXXX" RetainReservation="Both">
  <BillingPointOfSaleInfo OriginApplication="UAPI" xmlns="http://www.travelport.com/schema/common_v49_0" />
  <BookingTraveler Key="42201-5464346-4" TravelerType="ADT" DOB="2020-08-11" xmlns="http://www.travelport.com/schema/common_v49_0">
    <BookingTravelerName Prefix="Mr" First="SARFARAZ" Last="KHAN" />
    <PhoneNumber CountryCode="" Number="03432244666" />
    <Email EmailID="[email protected]" />
  </BookingTraveler>
  <AirPricingSolution xmlns="http://www.travelport.com/schema/air_v49_0">
    <AirSegment Key="eb1oOkAqWDKAp8kDFAAAAA==" Group="0" Carrier="PK" FlightNumber="310" Origin="KHI" Destination="UET" DepartureTime="2021-08-01T11:00:00.000" ArrivalTime="2021-08-01T12:20:00.000" ClassOfService="H" />
    <AirSegment Key="eb1oOkAqWDKAs8kDFAAAAA==" Group="0" Carrier="PK" FlightNumber="323" Origin="UET" Destination="LHE" DepartureTime="2021-08-01T18:45:00.000" ArrivalTime="2021-08-01T20:05:00.000" ClassOfService="H" />
    <AirSegment Key="eb1oOkAqWDKAv8kDFAAAAA==" Group="0" Carrier="PK" FlightNumber="757" Origin="LHE" Destination="LHR" DepartureTime="2021-08-02T12:50:00.000" ArrivalTime="2021-08-02T16:00:00.000" ClassOfService="V" />
    <AirPricingInfo PricingMethod="Auto" PlatingCarrier="PK" Key="eb1oOkAqWDKAj8kDFAAAAA==">
      <FareInfo EffectiveDate="2021-05-06T14:27:00.000+05:00" Destination="LHR" Origin="KHI" PassengerTypeCode="ADT" FareBasis="VLOWPK" Key="eb1oOkAqWDKAi8kDFAAAAA==" />
      <BookingInfo BookingCode="H" FareInfoRef="eb1oOkAqWDKAi8kDFAAAAA==" />
      <BookingInfo BookingCode="H" FareInfoRef="eb1oOkAqWDKAi8kDFAAAAA==" />
      <BookingInfo BookingCode="V" FareInfoRef="eb1oOkAqWDKAi8kDFAAAAA==" />
      <PassengerType Code="ADT" BookingTravelerRef="42201-5464346-4" />
    </AirPricingInfo>
  </AirPricingSolution>
  <ActionStatus Type="TAW" TicketDate="2021-05-06T14:29:04.915+05:00" ProviderCode="1G" xmlns="http://www.travelport.com/schema/common_v49_0" />
</AirCreateReservationReq> 
@RicOsiro
Copy link

RicOsiro commented Jun 8, 2021

hi,

it's schema validation error. You should check all required data and content type.
the element AirPricingSolution you just open it, if you compare to AirPriceRsp there are more xml attributes there, the "Key" it not in your request

a sample of this element
<air:AirPricingSolution xmlns:air="http://www.travelport.com/schema/air_v50_0" Key="uNZrEiOynDKAzDM6MBAAAA==" TotalPrice="BRL10079.00" BasePrice="USD1571.00" ApproximateTotalPrice="BRL10079.00" ApproximateBasePrice="BRL9055.54" EquivalentBasePrice="BRL9055.54" Taxes="BRL1023.46" Fees="BRL0.00" ApproximateTaxes="BRL1023.46" QuoteDate="2021-03-31">

but check all the elements, not only the attributes.

@AlbinaAziz
Copy link

Travelport recommends pass all the attributes and elements to the next request without any change. It means if u get key, flightid,duration etc. Then pass all those attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants