-
Notifications
You must be signed in to change notification settings - Fork 191
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
Hotel booking flow support #70
Comments
I'm currently stuck on a translation from PHP objects to XSD objects on the Criterion / HotelSearchCriterionType / ItemSearchCriterionType. The Criterion object seems to be recognized, but any properties that are defined in HotelSearchCriterionType or ItemSearchCriterionType do not seem to get translated into the XML message being sent out. You can test this yourself by doing the following use Amadeus\Client\RequestOptions\HotelMultiSingleAvailOptions;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Criteria;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Guest;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\HotelReference;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Rates;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Room;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Segment;
$availabilityResponse = $client->hotelMultiSingleAvailability(
new HotelMultiSingleAvailOptions([
'segments' => [
new Segment([
'infoSource' => Segment::SOURCE_DISTRIBUTION,
'criteria' => [
new Criteria([
'exactMatch' => true,
'stayStart' => \DateTime::createFromFormat('Y-m-d', '2017-12-28'),
'stayEnd' => \DateTime::createFromFormat('Y-m-d', '2017-12-29'),
'hotelReferences' => [
new HotelReference([
'chainCode' => 'RT',
'cityCode' => 'VIE',
'name' => 'SOFITEL VIENNA'
])
],
'rates' => [
new Rates([
'min' => 100.0,
'max' => 400.0,
'timeUnit' => Rates::TIMEUNIT_DAY
])
],
'rooms' => [
new Room([
'id' => 1,
'amount' => 1,
'guests' => [
new Guest([
'occupantCode' => Guest::OCCUPANT_ADULT,
'amount' => 1
])
]
])
]
])
]
])
]
])
); Currently this produces the following XML: <?xml version="1.0" encoding="UTF-8"?>
<!-- Soap headers & envelope omitted -->
<SOAP-ENV:Body>
<ns1:OTA_HotelAvailRQ SummaryOnly="true" RateRangeOnly="true" RateDetailsInd="true" EchoToken="MultiSingle" Version="4.000">
<ns1:AvailRequestSegments>
<ns1:AvailRequestSegment InfoSource="Distribution">
<ns1:HotelSearchCriteria AvailableOnlyIndicator="true">
<ns1:Criterion/>
</ns1:HotelSearchCriteria>
</ns1:AvailRequestSegment>
</ns1:AvailRequestSegments>
</ns1:OTA_HotelAvailRQ>
</SOAP-ENV:Body> Criterion is an element defined in an XSD imported in the WSDL (OTA_HotelCommonTypes.xsd) as an extension of the HotelSearchCriterionType complexType , which is an extension of the complexType ItemSearchCriterionType defined in an included OTA_CommonTypes.xsd For some reason, the SoapClient is not recognizing the link between XSD type To be investigated. |
Why getting this error [29-Oct-2018 17:44:12 UTC] PHP Fatal error: Uncaught Amadeus\Client\InvalidMessageException: Message "Hotel_MultiSingleAvailability" is not in WDSL in /home/travoweb/public_html/amadeus_hoel/src/Amadeus/Client/RequestCreator/Base.php:118 |
@saaqeb which WSDL file you using in Client? |
my own wsdl |
@saaqeb |
HotelAvailability_2.0.wsdl |
[
'officeId' => 'XXXXXX', //The Amadeus Office Id you want to sign in to - must be open on your WSAP.
'userId' => 'XXXXXX', //Also known as 'Originator' for Soap Header 1 & 2 WSDL's
'passwordData' => 'XXXXX' // **base 64 encoded** password
],
'sessionHandlerParams' => [
'soapHeaderVersion' => Client::HEADER_V4,
'wsdl' => '/home/travoweb/public_html/amadeus_sandbox/1ASIWOTANA4_PDT_20180321_161425/HotelAvailability_2.0.wsdl',
'stateful' => true,
'logger' => new Psr\Log\NullLogger()
],
'requestCreatorParams' => [
'receivedFrom' => 'Saaqeb Nayeem Hotel TravoJet'
]
]);
$client = new Client($params);
use Amadeus\Client\RequestOptions\HotelMultiSingleAvailOptions;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Criteria;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Guest;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\HotelReference;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Rates;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Room;
use Amadeus\Client\RequestOptions\Hotel\MultiSingleAvail\Segment;
$availabilityResponse = $client->hotelMultiSingleAvailability(
new HotelMultiSingleAvailOptions([
'segments' => [
new Segment([
'infoSource' => Segment::SOURCE_DISTRIBUTION,
'criteria' => [
new Criteria([
'exactMatch' => true,
'stayStart' => \DateTime::createFromFormat('Y-m-d', '2018-12-28'),
'stayEnd' => \DateTime::createFromFormat('Y-m-d', '2018-12-29'),
'hotelReferences' => [
new HotelReference([
'chainCode' => 'RT',
'cityCode' => 'VIE',
'name' => 'SOFITEL VIENNA'
])
],
'rates' => [
new Rates([
'min' => 100.0,
'max' => 400.0,
'timeUnit' => Rates::TIMEUNIT_DAY
])
],
'rooms' => [
new Room([
'id' => 1,
'amount' => 1,
'guests' => [
new Guest([
'occupantCode' => Guest::OCCUPANT_ADULT,
'amount' => 1
])
]
])
]
])
]
])
]
])
);
$HotelInfo = json_encode($params);
$HotelInfo = json_decode($HotelInfo, true);
print""; print_r($HotelInfo); print""; exit; ?> |
So... you getting this error because message Probably you just don't have access to this web service. Yours
|
Now i am getting this error `Array
)` |
Are you using the hotel implementation from the |
…DS-45-amadeus-integrate-prometheus to master * commit 'a6ebeaf23a8f981a7d28a5e3a163fa6a6ebd6c98': FDS-45 | (add) error that should be handled as empty response FDS-45 | (remove) jenkinsfile for pr pipeline as this does't work with outdated stash FDS-45 | (add) jenkins pr pipeline script FDS-45 | (add) track cache requests (hit/miss) FDS-45 | (add) track metrics FDS-45 | (add) prometheus client | (update) dependencies
Hello, I also encountered the same problem when concatenating. Is there any way to solve it now? |
@o150209001 some guys solved this problem that way |
Hello,I tried this ,but it's not working. Thanks. |
Hello, |
@DerMika we had also an error with empty Criterion xml node, but only in case when we used PDT files. Everything started to work with "adapted" TST wsdl files. |
Can I have sample of how to request "Hotel_DescriptiveInfo" please? |
did you get any sample file for this |
Working on supporting the Amadeus Hotel booking flow:
Hotel_MultiSingleAvailability
Hotel_DescriptiveInfo
Hotel_EnhancedPricing
Hotel_Sell
Development is happening on the hotel branch.
However, there's a number of firsts here:
The text was updated successfully, but these errors were encountered: