I need to read information from susoap web service,
Server Side;
$server->register('login',
array('myVar' => 'xsd:string'),
array('return' => 'tns:ct_adminUser'),
$namespace,
$namespace . '#login',
'rpc',
'encoded',
'Login validation!'
);
...
$server->wsdl->addComplexType('MyStruct','complexType','struct','all','',
array( 'val1' => array('name' => 'val1','type' => 'xsd:int'),
'val2' => array('name' => 'val2','type' => 'xsd:string')
));
function testFn()
{
return Array ('usrId' => 1,'usrName' => 'MY NAME');
}
I'm using vb.net and I can read the data but I'm trying to implement the client in PHP and I can't read the response.
In the PHP client I have the following code;
$result = $client->call('testFn',array('myVar' => 'XXXXX')));
echo $result;
The response is;
Array
If I change the client to the following don't receive anything;
$result = $client->call('testFn',array('myVar' => 'XXXXX')));
echo $result->val1;