I have a SOAP Server (created with the PHP5 Standard Soap Functions) and a nuSoap Client.
The Parameters are a username (string), a password (string) and customerdata (associative array)
function add_data(username,password,customerdata) {
dosomething();
return array($errorcode,$msg);
}
|
The strange Problem:
If i use an associative array and want to access it in the soap function (for example customerdata["firstname"]) i get an error-response
Array
(
[faultcode] => SOAP-ENV:Server
[faultstring] => Cannot use object of type stdClass as array
)
|
But if i immediatly return the complete array (return customerdata;) in the soap function i get back the correct associative array, and also if i don't use an associative array i don't have these problems.
I'm relatively new to soap (and don't use a WDL Description of the SOAP Service atm) but need this functionality for a project.
Any Ideas?
Matthias