PHP soap web服务asmx问题:soap-ERROR:编码:对象没有

PHP soap web服务asmx问题:soap-ERROR:编码:对象没有,php,soap,asmx,Php,Soap,Asmx,我试图将数据发布到.net web服务,但收到错误:“SOAP-error:Encoding:对象没有'ActiveCust'属性” 以下是wsdl: 关联数组的格式良好。 问题是最后一个可选数组$CustomerCustomAttrs,我删除了它,web服务开始正常工作 旧版本 //Associative array $params = array( $Context, $WebsiteName, $Cust, $ActiveCust, $Custom

我试图将数据发布到.net web服务,但收到错误:“SOAP-error:Encoding:对象没有'ActiveCust'属性”

以下是wsdl:


关联数组的格式良好。 问题是最后一个可选数组$CustomerCustomAttrs,我删除了它,web服务开始正常工作

旧版本

//Associative array
$params = array(
    $Context,
    $WebsiteName,
    $Cust,
    $ActiveCust,
    $CustomerCustomAttrs
);
新版本

$params = array(
    'Context' => $Context,
    'WebsiteName' => $WebsiteName,
    'Cust' => $Cust,
    'ActiveCust' => $ActiveCust
);

我已经很久没有使用SOAP了,所以我只是通过评论提出了一些想法。。1.您的关联数组
$params
不关联(需要类似
'Cust'=>$Cust,…
)。2.我会尝试使用fitting数组调用wsdl函数,比如
$client->SubmitNewCustomerToB1($ActiveCust)。3.complexeTypes可能很难,我模糊地记得,也许您需要将参数包装在类中。谢谢您的建议。仍然没有成功。也许这个Q/A中的例子有帮助他们将复杂类型的参数构建为对象,而不是ArrayShanks cypherabe,以获得您的有效帮助!