I am trying to invoke the Web Service PersonalDetails_Update by passing an array of values to it. These values are being successfully written to the database that the web service is designed to do. However, it is also supposed to return an ID for the record written to the database. But I don’t get anything back. Just a blank screen with no XML or underlying source.
When using getLastRequest, I get this error:
Fatal error: Uncaught SoapFault exception: [Client] Function ("getLastRequest") is not a valid method for this service in
Code used to pass data to web service and request/response headers:
$client->PersonalDetails_Update(array('personaldetails' => $params));
printf("<br/> Request = %s </br>", htmlspecialchars($client->getLastRequest()));
$result = $client->__getLastResponse();
$header = $client->__getLastResponseHeaders();
When using getLastResponse and getLastResponseHeaders, I don’t get anything back.
you forgot the “__”:
your soap client thinks “getLastRequest” is a method of a soap service this way, not a soap client method.
also you should tell us what soap client you are using. i assume you use php built-in soap client…
use __soapCall method to be sure, you are making a request to the service:
you should check if the returned value is a soap fault.. see the manual