LLeoun Posted March 10, 2010 Share Posted March 10, 2010 Hi all , The following code connects with a web service that given a max number returns the prime numbers below that max. So in a server given 10 as a max I get: Result Array ( [GetPrimeNumbersResult] => 1,3,5,7 ) And In another server I get: Fatal error: Call to a member function getError() on a non-object in /var/apache2/htdocs/test/3.php on line 15 Pointing to line 15, which is: $err = $proxy->getError(); I'm attaching the phpinfo.php for the server that shows the error.. (please change .txt for .rar) Can anyone please tell me what is going on with the second server?? Thanks a ton! ?php require_once('lib/nusoap.php'); require_once('lib/class.wsdlcache.php'); $webservice_username = ""; $webservice_password = ""; $webServiceURL ="http://www50.brinkster.com/vbfacileinpt/np.asmx?wsdl"; $client = new nusoap_client($webServiceURL, 'wsdl', '', '', '', ''); $proxy = $client->getProxy(); $err = $proxy->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $session_header = "<UserCredentials xmlns='http://vidzapper.net/Webservice/'><Userid>".$webservice_username."</Userid><Password>".$webservice_password."</Password></UserCredentials>"; $client->setHeaders($session_header); $params=array('max'=>'10'); $results = $client->call('GetPrimeNumbers', $params); try{ // Check for a fault if ($soapCall->fault) { echo '<h2>Fault</h2><pre>'; print_r($results); echo '</pre>'; die; } echo '<h2>Result</h2><pre>'; print_r($results); echo '</pre>'; die; } catch (SoapFault $exception) { echo '<h2>Exception</h2><pre>'; print_r($exception); echo '</pre>'; die; } ?> [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/194755-web-service-via-php-nusoap-with-proxy/ Share on other sites More sharing options...
LLeoun Posted March 11, 2010 Author Share Posted March 11, 2010 No ideas on this one? not even a clue? or at least, a hint on where to ask, I'm totally lost Thanks! Link to comment https://forums.phpfreaks.com/topic/194755-web-service-via-php-nusoap-with-proxy/#findComment-1024645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.