PHP WSO2 的 WSF/PHP

发布于 2024-09-09 17:00:02 字数 149 浏览 2 评论 0原文

我正在尝试将 WSO2' WSF 用于 PHP,并且我正在使用 WS Security 对象。我正在向服务器发出请求并收到身份验证错误。我相信 WS 安全对象缺少某些内容,因此我希望看到正在发送的 RAW SOAP 消息...有没有办法做到这一点。

我不在本地这样做。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

从来不烧饼 2024-09-16 17:00:02

这非常简单。像这样构造您的 SOAP 客户端:

$client = new SoapClient($wsdl_url, array('location' => $endpoint_url, 'trace' => true));

然后,在发送消息后,只需调用 $client->__getLastRequest()$client->__getLastResponse()视情况而定。您还可以调用 $client->__getLastRequestHeaders()$client->__getLastResponseHeaders()

请注意,在发送消息之前不可能获得任何这些信息。您必须首先发送 SOAP 消息。

另外,您可能会发现 http://us.php.net/soapclient 很有帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文