Ean Web Service出现“解组错误:意外元素”错误

时间:2014-02-05 09:52:25

标签: c# web-services soap wsdl

我打算将EAN Hotel API添加到我的网站或其他应用程序中。 我从以下位置添加SOAP WSDL Web Reference: http://api.ean.com/ean-services/ws/hotel/v3?wsdl

现在我想得到酒店信息。 我收到错误: Unmarshalling Error:意外元素(uri:“http://v3.hotel.wsapi.ean.com/”,local:“HotelListRequest”)。预期元素是< {} HotelListRequest>

我的示例代码是:

var hotelService = new HotelServicesClient("HotelServicesImplPort");
            var hotelRequest = new HotelInformationRequest
            {
                cid = 55505,// Your CID
                apiKey = "wyju58sf64tpnf2mwj8x2s8b", // Your API Key
                minorRev = 99,
                customerIpAddress = " 178.131.228.12",
                hotelId = 122212                    
            };

HotelInformationResponse response = hotelService.getInformation(hotelRequest);
Response.Write(response);

0 个答案:

没有答案