jayaraj Posted April 6, 2010 Share Posted April 6, 2010 <?php $client = new SoapClient("http://......../DatasetServiceService.asmx?wsdl"); $result = $client->GetDatasets("testing"); ?> getLastResponse and getFunctions working properly but when i call the GetDatasets function, The following error will occurs: Fatal error: Uncaught SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DataSource.GetDatasets(String customer) in d:\WORKFLOWSERVICES\DatasetService\App_Code\DataSource.cs:line 313 at Service.GetDatasets(String customer) in d:\WORKFLOWSERVICES\DatasetService\App_Code\Service.cs:line 21 --- End of inner exception stack trace --- in /home/jayaraj/www/opt/trunk/web/src/webservices.php:22 Stack trace: #0 [internal function]: SoapClient->__call('GetDatasets', Array) #1 /home/jayaraj/www/opt/trunk/web/src/webservices.php(22): SoapClient->GetDatasets('test1') #2 {main} thrown in /home/jayaraj/www/opt/trunk/web/src/webservices.php on line 22 Link to comment https://forums.phpfreaks.com/topic/197746-php-web-service/ Share on other sites More sharing options...
jayaraj Posted April 7, 2010 Author Share Posted April 7, 2010 $client->functionname(); If i use the empty argument, it will work Otherwise, the error will occur Link to comment https://forums.phpfreaks.com/topic/197746-php-web-service/#findComment-1038158 Share on other sites More sharing options...
jayaraj Posted April 13, 2010 Author Share Posted April 13, 2010 I can use nusoap methods, then only my problem is solved require_once('nusoap.php'); $proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : ''; $proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : ''; $proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : ''; $proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : ''; $client = new nusoap_client('http://......./Service.asmx?wsdl', 'wsdl', $proxyhost, $proxyport, $proxyusername, $proxypassword); $err = $client->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } // Doc/lit parameters get wrapped $param = array('Customer' => $_GET['name']); $result = $client->call('GetPDFDetails', array('parameters' => $param), '', '', false, true); /* ---------------------------------------------------- array('parameter'=>$param) //dont change "parameter" it's an constant and "Customer" is XML Name ----------------------------------------------------- */ Link to comment https://forums.phpfreaks.com/topic/197746-php-web-service/#findComment-1040741 Share on other sites More sharing options...
trq Posted April 13, 2010 Share Posted April 13, 2010 Can you piece together a post for us? Link to comment https://forums.phpfreaks.com/topic/197746-php-web-service/#findComment-1040743 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.