note 77413 added to function.soap-soapclient-soapcall

From: Date: Tue, 28 Aug 2007 21:17:53 +0000
Subject: note 77413 added to function.soap-soapclient-soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-129862@lists.php.net to get a copy of this message
hello, i am using the following code in order to call a server but i get this error: Fault Array ( [faultcode] => soap:Server [faultstring] => Server was unable to process request. --> Object reference not set to an instance of an object. [detail] => ) what should i try so as the server accept the xml code i am sending him? <?php // Pull in the NuSOAP code require_once('nusoap.php'); // Create the client instance $client = new soapclient('http://xxx.xxx.xxx.xxx/services/filename.asmx?wsdl', true); // Check for an error $err = $client->getError(); if ($err) { // Display the error echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; // At this point, you know the call that follows will fail } $xml_4_sending="xml code"; // Call the SOAP method $result = $client->call('GradeActivity', array('xmlContent' => $xml_4_sending)); // Check for a fault if ($client->fault) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { // Display the result echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } // Display the request and response echo '<h2>Request</h2>'; echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Response</h2>'; echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; // Display the debug messages echo '<h2>Debug</h2>'; echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>'; ?> thank you ---- Server IP: 208.69.120.35 Probable Submitter: 88.218.161.74 ---- Manual Page -- http://www.php.net/manual/en/function.soap-soapclient-soapcall.php Edit -- https://master.php.net/note/edit/77413 Del: integrated -- https://master.php.net/note/delete/77413/integrated Del: useless -- https://master.php.net/note/delete/77413/useless Del: bad code -- https://master.php.net/note/delete/77413/bad+code Del: spam -- https://master.php.net/note/delete/77413/spam Del: non-english -- https://master.php.net/note/delete/77413/non-english Del: in docs -- https://master.php.net/note/delete/77413/in+docs Del: other reasons-- https://master.php.net/note/delete/77413 Reject -- https://master.php.net/note/reject/77413 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129862) next »