我正在尝试使用杜松肥皂网络服务,但我收到错误以下是我正在使用的代码
$client = new SoapClient('http://xml2.bookingengine.es/WebService/JP/WebServiceJP.asmx?WSDL', array("trace" => 1, "exception" => 1));$parameters = [
'HotelListRQ' => [
'version' => '1.1',
'language' => 'en',
'login' => ['email' => 'Email@email.com', 'password' => 'xxxxxxxx'],
'HotelListRequest' => ['ZoneCode' => '55153'] ]];
$bookingList = $client->HotelList($parameters);
echo json_encode($bookingList);
输出是
{"HotelListRS":{"Errors":{"Error":{"Text":" 请在您的请愿书中添加 'Accept-Encoding: gzip, deflate' 标头。这样可以将传输时间和响应大小减少约 75 -95%。在此处查看更多信息:http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html","Code":"COMPRESSION_REQUIRED"}},"Url":"http://xml2. bookingengine.es","TimeStamp":"2017-10-18T13:21:09.69911+02:00","IntCode":"lTi3rTnUmlR/a7qZHG2RbvurJ1USoOdKCz2UX3Y19y0="}}