I'm having trouble viewing the xml created by the PHP SOAP client. I want to do this because I am trouble shooting a problem where I can only retrieve data from a remote service. When I try to submit an array of my object that includes updates I get a SOAP Fault:
"ObjectSave Failed. Error: Object reference not set to an instance of an object. "
Here is how I retrieve an object using the SOAP client:
$client->ObjectGet( array('ObjectID' => 1) );//this works just fine
And here is how I am trying to update using the SOAP client:
$client->ObjectSave($objectarray);//this is when I get the SOAP Fault
To see the XML I enabled tracing on the soap client like so:
$client = new SoapClient("http://beta.mywsdlvendor.com", array(
"trace" => true,
"exceptions" => false
)
);
I then tried to see the xml generated from the client like this:
echo $client->__getLastRequest();
Instead of XML I get this:
2013-06-04T14:16:40.744616Z76DJvRi+ktH6JtcQghzkJR2OoyALI=0-1
According to How do I see the actual XML generated by PHP SOAP Client Class? __getLastRequest() should show the xml.
Why can't I see the XML?