SOAP PHP Client返回缺少的参数,但soapUI工作正常

时间:2012-04-11 16:59:08

标签: php

我创建了以下php soap客户端,该服务继续报告缺少或无效的adminPassword版本。当我使用soapUI时,传递的方法和参数工作正常,所以不确定为什么php客户端不工作。

我也收到了一条通知消息,所以不确定是否有任何事情要做“注意:第5行stdClass上/var/www/html/index.php中的数组到字符串转换”

响应: ([method] => getUsageReport_v1 [statusCode] => GEN006 [statusMessage] =>以下必需参数缺失或无效:adminPassword,version。[version] => 1.0 [monthlyReceiveReports] => [monthlySendReports] => [receiveReports] => [sendReports] =>)

客户端(屏蔽adminId和adminPassword):

$client = new SoapClient("https://www.efaxcorporate.com/corp/services/CorpAdmin?wsdl");
$parm = array("adminId" => "*****","version" => "1.0", "adminPassword" => "***",);
print_r($client->getUsageReport_v1(array($parm)));

感谢您对此提供的任何帮助

1 个答案:

答案 0 :(得分:0)

我相信你错过了用户名:

<wsdl:message name="getUsageReport_v1Request">
<wsdl:part name="adminId" type="xsd:string"/>
<wsdl:part name="adminUserName" type="xsd:string"/>
<wsdl:part name="adminPassword" type="xsd:string"/>
<wsdl:part name="version" type="xsd:string"/>
</wsdl:message>