【发布时间】:2009-04-22 13:59:39
【问题描述】:
很抱歉不得不这样做,但我没有得到运行此特定网络服务的人的喜爱。我以前从未使用过 SOAP。
Here's the method I'm trying to call
这是我认为应该可以工作的代码
public function soapTest(){
echo "start <br />";
use_soap_error_handler(true);
$client = new SoapClient("https://cwi.rezexchange.com:9991/?wsdl");
// here's the problem. What goes in the parenthesis?
$result = $client->CwiRateDetails(????);
echo($result);
echo "<br /> end";
}
现在我猜这告诉我括号应该包含什么。
POST /Service.asmx HTTP/1.1
Host: cwi.rezexchange.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://hotelconcepts.com/CwiRateDetails"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CwiRateDetails xmlns="http://hotelconcepts.com/">
<PropertyCode>string</PropertyCode>
<DateFrom>dateTime</DateFrom>
<DateTo>dateTime</DateTo>
<RatePlan>string</RatePlan>
<RoomType>string</RoomType>
<PromotionalRates>boolean</PromotionalRates>
</CwiRateDetails>
</soap:Body>
</soap:Envelope>
我猜是这样的
$result = $client->CwiRateDetails($PCode, $DateFrom, $DateTo, $RatePlan, $RoomType, false);
应该可以。但我不知道日期格式是什么,或者房间类型是什么,或者如何参考房价计划。
现在。在我和他们一起通过电子邮件发疯之前,我认为他们需要给我更多的信息是错误的吗?或者我可以使用某种 SOAP 技巧从某个地方获取该信息?
【问题讨论】: