我正在尝试调用这个操作getCountries,但我无法理解读取WSDL文件需要哪些参数以及以何种结构化方式:
http://webservice.nizacars.es/Rentway_WS/getCountries.asmx?WSDL
我已经尝试过:
$this->soap_client->getCountries(
array(
'countriesRequest' => array(
'companyCode' => $this->login,
'allCountries' => true
)
)
)
$this->soap_client->getCountries(
array(
'companyCode' => $this->login,
'allCountries' => true
)
)
$this->soap_client->getCountries(
'companyCode' => $this->login,
'allCountries' => true
)
但我似乎不符合规格,因为我得到了一个“
[服务器无法处理请求。-->对象引用未设置为对象的实例。]
"
SoapClient的最终请求::__getLastRequest为:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.jimpisoft.pt/Rentway_Reservations_WS/getCountries">
<SOAP-ENV:Body>
<ns1:getCountries/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
编辑,解决方案
:
$data = array(
'getCountries' => array(
'objRequest' => array(
'companyCode' => $this->login,
'allCountries' => true
)
)
);
$result = @$this->_client->__call('getCountries',$data);