Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amadeus : Travel Build Request for hotel response error 17 | session 'no agreement on destination'

Tags:

php

amadeus

I have been having issues with my amadeus ws travel build Each time i tried creating a reservation for the hotel, i keep getting this error

17|session|No agreement on destination

Here is my code // curl url

$soapUrl = "http://amadeusws.tripxml.com/TripXML/wsTravelBuild_v03.asmx";


 $xml_post_string = "<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
  <soap:Header>
    <TripXML xmlns='http://amadeusws.tripxml.com/wsTravelBuild'>
      <userName>string</userName>
      <password>string</password>
      <compressed>boolean</compressed>
    </TripXML>
  </soap:Header>
  <soap:Body>
    <wmTravelBuild xmlns='http://traveltalk.com/wsTravelBuild'>
      <OTA_TravelItineraryRQ>
      <POS>
      <Source PseudoCityCode='JNBZA21ZZ' ISOCurrency='NGN'>
      <RequestorID Type='21' ID='RubyTravel'/></Source>
      <TPA_Extensions>
      <Provider>
      <Name>Amadeus</Name> 
               <System>Test</System> 
               <Userid>user</Userid> 
               <Password>user</Password> 
      </Provider>
      </TPA_Extensions>
      </POS>
  <OTA_HotelResRQ><HotelReservations>
        <HotelReservation RoomStayReservation='1'>
            <RoomStays>
              <RoomStay>
                  <RoomRates>
                    <RoomRate BookingCode='Q4WTPQJ' NumberOfUnits='1' RatePlanCode='PRO'>
                     </RoomRate>
                    </RoomRates>
                   <GuestCounts>
                    <GuestCount AgeQualifyingCode='ADT' Age='0' Count='1' />
                    </GuestCounts>
                    <TimeSpan Start='2017-08-20' Duration='' End='2017-08-23' >
                            </TimeSpan>
                    <Guarantee GuaranteeType='GuaranteeRequired'>
                    <GuaranteesAccepted>
                     <GuaranteeAccepted>
                        <PaymentCard CardType='Credit' CardCode='VI' CardNumber='4444333322221111' ExpireDate='0520'>
                        <CardHolderName>user User</CardHolderName>
                            <Address FormattedInd='false' Type='Home'>
                        <StreetNmbr>7300 NORTH KENDALL DRIVE</StreetNmbr>
                        <CityName>MIAMI</CityName>
                        <PostalCode>33156</PostalCode>
                        <StateProv>FL</StateProv>
                        <CountryName>USA</CountryName>
                            </Address>
                        </PaymentCard>
                    </GuaranteeAccepted>
                    </GuaranteesAccepted>
                   </Guarantee>
                <DepositPayments> <RequiredPayment>
                <AcceptedPayments> 
                    <AcceptedPayment>
                        <PaymentCard CardType='Credit' CardCode='VI' CardNumber='4444333322221111' ExpireDate='0520'> <CardHolderName>user User</CardHolderName>
                            <Address FormattedInd='false' Type='Home'>
                                <StreetNmbr>7300 NORTH KENDALL DRIVE</StreetNmbr>
                                <CityName>MIAMI</CityName>
                                <PostalCode>33156</PostalCode>
                                <StateProv>FL</StateProv>
                                <CountryName>USA</CountryName>
                                 </Address> 
                            </PaymentCard>
                        </AcceptedPayment>
                    </AcceptedPayments> 
                </RequiredPayment> 
            </DepositPayments>
                 <BasicPropertyInfo ChainCode='HS' HotelCode='ATK' HotelCityCode='BKK' HotelCodeContext='1A' />
                <ResGuestRPHs>
                    <ResGuestRPH RPH=''/>
                </ResGuestRPHs> 
              </RoomStay>
            </RoomStays>
</HotelReservation>


               </HotelReservations></OTA_HotelResRQ><TPA_Extensions><PNRData>
                      <Traveler>
                       <PersonName>
                        <NamePrefix>MR</NamePrefix>                    
                        <GivenName>user</GivenName>
                        <Surname>user</Surname>
                        <NameTitle>Mr.</NameTitle>
                       </PersonName>
                       <TravelerRefNumber RPH='1'/>
                      </Traveler>
                      <Telephone PhoneLocationType='Home' CountryAccessCode='1'  FormattedInd='0' AreaCityCode='MIAMI' PhoneNumber='8789878954'/>
                      <Email>[email protected]</Email>
                      <Ticketing><TicketAdvisory>OK</TicketAdvisory></Ticketing>
                     </PNRData></TPA_Extensions>
                     </OTA_TravelItineraryRQ>   
        </wmTravelBuild>
      </soap:Body>
    </soap:Envelope>";
/// header for the curl function
     $headers = array(
    "POST /TripXML/wsTravelBuild_v03.asmx HTTP/1.1",
    "Host: amadeusws.tripxml.com",
    "Content-Type: text/xml; charset=utf-8",
    "SOAPAction: "."http://traveltalk.com/wsTravelBuild/wmTravelBuild",
    "POST /TripXML/wsLowFarePlus.asmx HTTP/1.1",
    "Content-Length: ".strlen($xml_post_string)
    ); 
    $url = $soapUrl; // curl url
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $reply = curl_exec($ch);
    curl_close($ch);

Have anybody had this problem and be able to fix it, I used the same url for the travel build for air and it works well but when i send a request to create a reservation for hotel, it keep returning error.

like image 520
UniQue Avatar asked Oct 30 '22 04:10

UniQue


1 Answers

That error message means your web services access is not set up to use that service. Either you need a new/updated WSDL or something is not configured correctly at Amadeus for you to use that request

like image 162
Dave Avatar answered Nov 11 '22 11:11

Dave