Nusoap does not work within function call
PHP : Version 5
Nusoap : Version 1.94
Dear All,
I get followiing error when I perform soap calls within function :
“[B]soap:ServerServer was unable to process request. —> Object reference not set to an instance of an object.”
Here is the function :
[code=php]
function getdownloadurl()
{
$soapaction=”[URL]https://secure.webaddress.com/V7/webservices/GetDownloadUrl[/URL]”;
$wsdl=”[URL]https://secure.webaddress.com/v3/WebServices/Update1.asmx[/URL]”;
$client=new soapclient($wsdl);
$newcrop=new newCrop();
$newcrop->provofficeCode=$officeid;
$recentdownload=$newcrop->GetDownloadUrl(‘3’);
$response=$client->send($client->serializeEnvelope($recentdownload, ”, array(), ‘document’, ‘literal’),$soapaction,$timeout,$response_timeout);
$newcropResponseXML=$client->response;
}
Does any one know why error occurs? Any help would be greatly appreciated.
Thank You,
Santhosh