我接到了一个调试由未知方编写的 PHP SOAP 服务器(SoapServer)的项目。它由 ac# SOAP 客户端使用,我无法访问该客户端的源代码(换句话说,我无法使用 __getLastResponse 来查看它得到的内容)。我正在尝试捕获服务器响应的 XML 输出。流量嗅探(wireshark 等)不起作用,因为 SSL 层用于加密 XML 消息。任何有关如何查看服务器发送的 XML 消息的帮助将不胜感激。
I was landed a project to debug a PHP SOAP server (SoapServer) written by an unknown party. It is being used by a c# SOAP client, which I don't have access to the source code to (in other words, I cannot use __getLastResponse to see what it gets). I am trying to capture XML output of the server's responses. Traffic sniffing (wireshark, etc) doesn't work because of the SSL layer being used to encrypt XML messages. Any help in figuring out how to see the XML messages sent out by the server would be greatly appreciated.
发布评论
评论(2)
这里有一个扩展 SoapServer 类并获取 Soap XML 请求和响应的出色示例:http://blog.mayflower.de/archives/179-Extending-class-SoapServer-PHP5-for-debugging.html
There's an excellent example for extending the SoapServer class and grabbing the Soap XML request and responses here: http://blog.mayflower.de/archives/179-Extending-class-SoapServer-PHP5-for-debugging.html
SoapServer 看起来像这个,还是 喜欢这个吗?如果是前者,你就在树上,一年内的所有梯子都被狼獾猛烈摧毁了。相反,它是编译代码的二进制块,无法从中逃脱。
如果是后者,您可能会有一些希望 -
service
方法的第三个参数可以设置为true来获取响应数据,而不是盲目地发送出去。还有传言称古老的“nuSOAP”库具有服务器模式,但该项目似乎已经内爆,并带走了文档。
从长远来看,使用非 病态倒退,尽管这可能不适合你。
Does the SoapServer look like this one, or like this one? If it's the former, you're up a tree and every ladder within a year's distance has been violently destroyed by wolverines. Rather, it's a binary blob of compiled code from which there is no escape.
If it's the latter, you may have some hope -- the
service
method's third parameter can be set to true to get the response data rather than blindly sending it out.There's also a rumor that the ancient "nuSOAP" library has a server mode, but that project seems to have imploded in upon itself, and took the documentation with it.
Long-term, you may be better served by using a web service layer that isn't pathologically backwards, though that might not be an option for you.