WSDL和PHP phpType是struct,但value不是数组

问题描述

| 我已经承担了将两个ASP应用程序连接在一起以执行各种功能的任务。显然作为PHP开发人员的ASP不用担心,哈!到目前为止,我几乎没有问题,但是遇到了此错误,看不到问题。正如标题在解析我的调用数组中的某个选项时指出的那样(在本例中为'org \'),我得到\'PHPType是struct,但value不是数组\'。 我的密码
$result = $client->call(\'UserCreate\',array   (       \'id\'                    => \'0\',\'email\'                 => \'josh@on.co.nz\',\'sendCreationEmail\'     => \'TRUE\',\'role_id\'               => \'Site Admin\',\'org\'           => \'2\',)
                        );
将不胜感激!谢谢!     

解决方法

        您没有付出太多努力。您是否正在使用NuSoap? 我认为您的第二个参数需要是一个嵌套数组。很久没有使用此功能了,但以下是我在摘要中提到的一个示例肥皂呼叫:
 // call Web services function
 $result = $client->call(\'Report.QueueOvertime\',// function name
                    array(\'reportDescription\' => array(
                               \'reportSuiteID\'=>\'rsid\',\'date\'=>\'2010-06-22\',\'metrics\'=>array(array(\'id\'=>\'pageViews\')),\'locale\'=>\'en-US\'),// end reportDescription
                    \'http://website.com\',// namespace
                    \'\',// SOAP Action
                    get_header($username,$secret)        // security header
                 ); // end SOAP