0

我一直在这里和谷歌寻找答案,但似乎没有一个明确的答案,这是我在 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 未找到服务”错误。

如果以前有人问过这个问题,我深表歉意,非常感谢您的帮助!!!

4

3 回答 3

1

EAN 开发人员中心中用于发出酒店信息请求的示例已得到修复。

问题:

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

解决方案:

http://api.ean.com/ean-services/rs/hotel/v3/info?
于 2013-03-09T18:23:05.450 回答
0

You also didn't enter the xml parameter correctly. It should have been like this:

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>

You could just forget about using xml and use the REST format:

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

By the way, I just found a SDK for Android from Expedia Affiliate Network. https://github.com/ExpediaInc/ean-android

于 2013-03-07T18:25:06.213 回答
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>

于 2013-07-03T07:45:57.603 回答