WSDL & PHP. phpType is struct, but value is not an array
I've been given the task of joining two ASP applications together to perform a variety of functio开发者_如何学编程ns. Apparently as a PHP dev ASP is no worries, ha! I've had little problem till now but have hit this error and can't see the problem. As the title states when parsing a certain option in my call array (in this case 'org') I get 'phpType is struct, but value is not an array'.
My code
$result = $client->call('UserCreate',
array ( 'id' => '0',
'email' => 'josh@on.co.nz',
'sendCreationEmail' => 'TRUE',
'role_id' => 'Site Admin',
'org' => '2',
)
);
Would appreciate any help! Thanks!
You are not giving much to go on. Are you using NuSoap by any chance?
I think your second parameter needs to be a nested array. Have not used this in ages but here is a sample soap call I had in my snippets:
// 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
精彩评论