EAN Expedia酒店信息URL服务未找到

时间:2013-02-23 14:01:58

标签: php xml api

我一直在这里和谷歌寻找答案,但似乎没有明确的答案,这是我在StackOverflow中的第一篇文章,但多年来一直是常客,我从中学到了很多东西网站,谢谢!

我的问题在于Expedia关于酒店信息的API:http://developer.ean.com/docs/read/hotel_info/examples/XML_Default_Content

我有问题的网址是:
http://api.ean.com/ean - services / rs / hotel / v3 / info?cid = 55505& minorRev = 1& apiKey = 9kxdnz8ngbf7gmwkzm4qkgjw& customerSessionId = 0ABAA850-419E-A913-D072-4A24A390607C& customerUserAgent = Mozilla / 5.0(Macintosh; Intel Mac) OS X 10.8; rv:19.0)Gecko / 20100101 Firefox / 19.0& customerIpAddress = 2.50.181.154& locale = en_UScurrencyCode = USD& xml = 1175480

我收到“596 Service Not Found”错误。

如果之前有人问过我,我很抱歉,非常感谢你的帮助!

3 个答案:

答案 0 :(得分:1)

EAN开发者中心中用于制作Hotel Info request的示例已得到修复。

问题:

http://api.ean.com/ean‑services/rs/hotel/v3/info?

解决方案:

http://api.ean.com/ean-services/rs/hotel/v3/info?

答案 1 :(得分:0)

您也没有正确输入xml参数。应该是这样的:

http://api.ean.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=1&apiKey=9kxdnz8ngbf7gmwkzm4qkgjw&customerUserAgent=Mozilla/5.0 (Macintosh; Intel Mac 0OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0&customerIpAddress=2.50.181.154&locale=en_US&currencyCode=USD&xml=<HotelInformationRequest>
  <hotelId>122212</hotelId>
  <options>0</options>
</HotelInformationRequest>

您可以忘记使用xml并使用REST格式:

http://api.ean.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=1&apiKey=9kxdnz8ngbf7gmwkzm4qkgjw&customerUserAgent=Mozilla/5.0 (Macintosh; Intel Mac 0OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0&customerIpAddress=2.50.181.154&locale=en_US&currencyCode=USD&hotelId=122212&options=0

顺便说一句,我刚从Expedia Affiliate Network找到了Android版SDK。 https://github.com/ExpediaInc/ean-android

答案 2 :(得分:0)

你可以试试这个工作的好处。

http://api.ean.com/ean-services/rs/hotel/v3/info?cid=55505&minorRev=1&apiKey=9kxdnz8ngbf7gmwkzm4qkgjw&customerSessionId=&customerUserAgent=Mozilla/5.0%20%28Macintosh;%20Intel%20Mac%20OS%20X%2010.8;%20rv:19.0%29%20Gecko/20100101%20Firefox/19.0&customerIpAddress=&locale=en_UScurrencyCode=USD

您可以将此xml添加到代码中

<强> &xml=<HotelInfo><hotelId>407696</hotelId><city></city><options>DEFAULT</options></HotelInfo>