是否有必要创建“SOAP 服务器”?实例?
出于遗留/兼容性原因,我将 nusoap lib 与 cakephp 应用程序一起使用,我只是想知道是否完全有必要创建 nusoap_server 的实例,当我可以输出任何内容时,我无法找出这样做的任何明显原因不创建服务器实例而将数据格式化为 xml 的情况 - 是否可能只是为了调试目的?
I am using the nusoap lib with a cakephp app for legacy / compatibility reasons, I was just wondering if it was totally necessary to create an instance of nusoap_server, I can't figure out any obvious reason for doing this when i can just output any data formatted as xml nilly willy without creating a server instance - is it perhaps just for debugging purposes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(我从未使用过
nuSOAP
,但我猜它与原生SoapServer
PEAR::SOAP
非常相似扩展和Zend_Soap
)您的服务器实例将:
中SOAP 格式有多复杂,我绝对不想自己解析它,也不想重新构造一些 SOAP 字符串——特别是如果已经存在一个可以为我做到这一点的库的话!
(I've never used
nuSOAP
, but I'm guessing it's quite the same asPEAR::SOAP
, the nativeSoapServer
extension, andZend_Soap
)Your server instance will :
Considering how complex the SOAP format is, I would definitly not want to parse it by myself, nor would I want to re-construct some SOAP string -- especially if a library that can do that for me already exists !
这取决于您是进行 SOAP 调用还是接收 SOAP 调用。
为了制作它们,您需要创建适当的客户端实例来进行WDSL处理并组装XML。
要接收它们,您需要创建服务器实例并告诉它如何分派各种调用。
您的应用程序只需要执行其中一项操作是完全合理的。
It depends on whether you are making SOAP calls or receiving SOAP calls.
To make them, you need to create the appropriate client instance to do the WDSL processing and assemble the XML.
To receive them, you need to create the server instance and tell it how to dispatch the various calls.
It is entirely reasonable for your app to only need to do one of those.