<?php
$opt = array(
'currentPage' => '1',
'pageSize' => '10',
'productType' => 'TICKET'
);
$url = 'http://x.x.x.x/clutter/services/distributionService?wsdl';
$client = new SoapClient($url, array("trace" => 1));
$result = $client->productInfoList(array('parameters' => $opt));
var_dump($client->__getFunctions());
var_dump($client->__getLastRequest());
var_dump($client->__getLastResponse());
无论我更改传递给soap函数的值的$opt,使用__getLastRequest总是返回:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://service.distribution.xxxx.com"><SOAP-ENV:Body><ns1:productInfoList><ns1:in0 xsi:nil="true"/></ns1:productInfoList></SOAP-ENV:Body></SOAP-ENV:Envelope>
从不改变。
而且我从来没有正确得到肥皂结果。
看起来参数没有传入请求。为什么?