Reputation: 135
I am trying to use WSO2' WSF for PHP and I am using a WS Security object. I am making the request to the server and getting an Authentication error. I believe the WS Security Object is missing something, so I would like to see the RAW SOAP message being sent...Is there a way to do this.
I am not doing this locally.
Upvotes: 2
Views: 1515
Reputation: 4716
This is pretty straightforward. Construct your SOAP client like so:
$client = new SoapClient($wsdl_url, array('location' => $endpoint_url, 'trace' => true));
Then, after you've sent your message, just call $client->__getLastRequest()
or $client->__getLastResponse()
as appropriate. You can also call $client->__getLastRequestHeaders()
or $client->__getLastResponseHeaders()
.
Note that it is not possible to get any of this before sending the message. You must first send the SOAP message.
Also, you may find http://us.php.net/soapclient helpful.
Upvotes: 2