Travelport-Ukraine / uapi-json

Best Travelport Universal API wrapper ever :airplane: :mountain_railway: :hotel:
https://travelport-ukraine.github.io/uapi-json/
MIT License
74 stars 61 forks source link

availability error #613

Open Shazad0304 opened 1 year ago

Shazad0304 commented 1 year ago

Service :

AirService.availability({ legs: [{ from: 'KHI', to: 'DXB', departureDate: '2023-01-10' }], passengers: { ADT: 1, INF: 0, CNN: 0, }, cabins: ['Business', 'Economy'], allowDirectAccess: false,

});

Response:

Response SOAP: <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

Server.Data Error unmarshalling message body: Expected "{http://www.travelport.com/schema/air_v52_0}PreferredCabins" end tag, found "{http://www.travelport.com/schema/common_v52_0}CabinClass" start tag (line 23, col 57, in UTF-8) 1005 WEBSVC Data Unable to parse XML stream 920C0E750A0D6A9270CC6884D25408DF err RequestRuntimeError.UAPIServiceError: UAPI Service responded with an error
MohammaedAlani commented 1 year ago

Same issue :(

Input params { "legs": [ { "from": "IEV", "to": "NYC", "departureDate": "2023-01-20" } ], "passengers": { "ADT": 1 }, "cabins": [ "Economy" ], "requestId": "4e2fd1f8-2221-4b6c-bb6e-cf05c367cf60", "maxJourneyTime": 300, "pricing": { "currency": "USD" } } Request URL: https://emea.universal-api.pp.travelport.com/B2BGateway/connect/uAPI/AirService Request XML:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

Response SOAP: Server.System Error From Host: No availability on chosen flights. 3037 AIRSEARCH_SERVICE System Error From Host: No availability on chosen flights. 9CF30F950A0D6A946E2AB71586D372F6 4e2fd1f8-2221-4b6c-bb6e-cf05c367cf60 AirRuntimeError.NoResultsFound: No results found at Parser.AirErrorHandler (/Users/mohammedyounis/Workable/nodejs/mo/travelport_api_services/node_modules/uapi-json/src/Services/Air/AirParser.js:540:13) at validateSOAP (/Users/mohammedyounis/Workable/nodejs/mo/travelport_api_services/node_modules/uapi-json/src/Request/uapi-request.js:164:29) at processTicksAndRejections (node:internal/process/task_queues:96:5) { source: 'uapi-json', data: { faultcode: 'Server.System', faultstring: 'Error From Host: No availability on chosen flights.', detail: { 'common_v52_0:ErrorInfo': [Object] } }, statusCode: 598 }
MohammaedAlani commented 1 year ago

any update on this issue?

kommandant-topp commented 1 year ago

Hello @MohammaedAlani, thank you for your request!

I've checked the documentation, and it still states, PreferredCabins requests availability for the selected cabin classes. Only one cabin can be requested. If that class is not available, an alternate cabin may be returned. Depending on availability and processing, either a cabin downgrade or upgrade may be offered So, we're still waiting for the multiple cabins to be allowed for the availability request.

Write me back if you have any other questions. Thank you, and have a nice day!

Shazad0304 commented 1 year ago

payload :

HotelService.search({ code: 'DXB', location : 'DXB', startDate: '2023-03-01', endDate: '2023-03-20', currency: 'USD', MaxWait: 30000, MaxProperties: 9999, rooms: [{ adults: 1, }, { adults: 2, }], rating: [3, 5], }).then( resp => res.status(200).json(resp), err => console.log(err) )

Response SOAP: <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

Server.Data Error unmarshalling message body: Expected "{http://www.travelport.com/schema/hotel_v47_0}HotelSearchAvailabilityReq" end tag, found "{http://www.travelport.com/schema/common_v52_0}BillingPointOfSaleInfo" start tag (line 6, col 61, in UTF-8) 1005 WEBSVC Data Unable to parse XML stream D3CB77250A0D6A9311212696E753685D UnhandledError [RequestRuntimeError.UnhandledError]: Error during request. Please try again later at Parser.errorHandler (E:\projects\travelPortNodeTest\node_modules\uapi-json\src\Services\Hotels\HotelsParser.js:251:13) RuntimeError.HotelsRuntimeError: Hotels service runtime error at Parser.errorHandler (E:\projects\travelPortNodeTest\node_modules\uapi-json\src\Services\Hotels\HotelsParser.js:251:58) at validateSOAP (E:\projects\travelPortNodeTest\node_modules\uapi-json\src\Request\uapi-request.js:164:29) at processTicksAndRejections (internal/process/task_queues.js:93:5) { source: 'uapi-json', data: null, statusCode: undefined, causedBy: HotelsRuntimeError [RuntimeError.HotelsRuntimeError]: Hotels service runtime error at Parser.errorHandler (E:\projects\travelPortNodeTest\node_modules\uapi-json\src\Services\Hotels\HotelsParser.js:251:58) at validateSOAP (E:\projects\travelPortNodeTest\node_modules\uapi-json\src\Request\uapi-request.js:164:29) at processTicksAndRejections (internal/process/task_queues.js:93:5) { source: 'uapi-json', data: { faultcode: 'Server.Data', faultstring: 'Error unmarshalling message body: Expected "{http://www.travelport.com/schema/hotel_v47_0}HotelSearchAvailabilityReq" end tag, found "{http://www.travelport.com/schema/common_v52_0}BillingPointOfSaleInfo" start tag (line 6, col 61, in UTF-8)', detail: [Object] }, statusCode: undefined } }
AtiqulHaque commented 2 hours ago

Actually in PreferredCabins tags only support one child tag (CabinClass) Like

Support you will get your result But if you call it by You will not get any result