5

我的 amadeus ws travel build 出现问题每次我尝试为酒店创建预订时,我都会收到此错误

17|会话|没有关于目的地的协议

这是我的代码 // 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@gmail.com</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);

有没有人遇到过这个问题并且能够解决它,我使用相同的 url 来构建航空旅行,它运行良好,但是当我发送创建酒店预订的请求时,它不断返回错误。

4

1 回答 1

2

该错误消息意味着您的 Web 服务访问权限未设置为使用该服务。您需要新的/更新的 WSDL,或者 Amadeus 未正确配置某些内容以供您使用该请求

于 2017-08-24T15:57:45.880 回答