我正在尝试提出 Soap 请求我说这个错误:
未捕获的 SoapFault 异常:[HTTP] C:\ 中的错误请求
<?php
$client = new SoapClient(null, array('location' => "http://webservices.micros.com/ows/5.1/Availability.wsdl#FetchCalendar",
'uri' => "http://###.###.###.##:8080/ows_ws_51/Availability.asmx?wsdl"));
//print_r($client);
$para = array('StayDateRange' => array('StartDate' => '2013-10-01','EndDate' => '2013-10-10'),'GuestCount'=>array('GuestCountageQualifyingCode'=>'ADULT','GuestCountageQualifyingCode'=>'CHILD'));
$ns = 'http://webservices.micros.com/og/4.3/Availability/'; //Namespace of the WS.
//Body of the Soap Header.
$headerbody = array('OriginentityID' => 'OWS',
'DestinationentityID' => 'WEST',
'systemType'=>'WEB',
'systemType'=>'ORS');
//Create Soap Header.
$header = new SOAPHeader($ns, 'OGHeader', $headerbody);
//set the Headers of Soap Client.
$client->__setSoapHeaders($header);
$client->__soapCall("FetchCalendar", $para);
?>
我的代码有什么问题?
添加异常处理后:http: //postimg.org/image/6w9lmac1d/
编辑:添加了 XML
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<OGHeader transactionID="005435" timeStamp="2008-12-09T13:26:56.4056250-05:00" xmlns="http://webservices.micros.com/og/4.3/Core/">
<Origin entityID="OWS" systemType="WEB" />
<Destination entityID="WEST" systemType="ORS" />
</OGHeader>
</soap:Header>
<soap:Body>
<FetchCalendarRequest xmlns:a="http://webservices.micros.com/og/4.3/Availability/" xmlns:hc="http://webservices.micros.com/og/4.3/HotelCommon/" xmlns="http://webservices.micros.com/ows/5.1/Availability.wsdl">
<HotelReference chainCode="AXA" hotelCode="AXAMUM" />
<StayDateRange>
<hc:StartDate>2013-10-01</hc:StartDate>
<hc:EndDate>2013-10-10</hc:EndDate>
</StayDateRange>
<GuestCount>
<hc:GuestCount ageQualifyingCode="ADULT" count="1" />
<hc:GuestCount ageQualifyingCode="CHILD" count="0" />
</GuestCount>
</FetchCalendarRequest>
</soap:Body>
</soap:Envelope>