开发者

PHP WSO2's WSF/PHP

开发者 https://www.devze.com 2023-01-07 11:29 出处:网络
I am trying to use WSO2\' WSF for PHP and I am 开发者_如何学JAVAusing a WS Security object.I am making the request to the server and getting an Authentication error.I believe the WS Security Object is

I am trying to use WSO2' WSF for PHP and I am 开发者_如何学JAVAusing 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消