如何使用 SOAP UI 为 SOAP 生成客户端 PHP 代码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10502636/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to generate client PHP code for SOAP using SOAP UI?
提问by BruneX
Googling I've found this article:
谷歌搜索我找到了这篇文章:
http://java.dzone.com/tips/generating-client-java-code
http://java.dzone.com/tips/generate-client-java-code
It talk about how to generate a "JAVA" code with SOAP UI client, but what I need is to generate code php with soap UI or other resource.
它讨论了如何使用 SOAP UI 客户端生成“JAVA”代码,但我需要的是使用soap UI 或其他资源生成代码 php。
Is this possible? exist any other resource to make it work that?
这可能吗?是否存在任何其他资源使其工作?
thank you for your answers..
谢谢您的回答..
Regards.
问候。
采纳答案by ladenedge
soapUI will not generate PHP code.
soapUI 不会生成 PHP 代码。
Fortunately, in PHP there often isn't a need to generate proxy classes. Instead, use SoapClientand simply call the SOAP methods you need outright. You can find simple examples at variousblogs.
幸运的是,在 PHP 中通常不需要生成代理类。相反,使用SoapClient并直接调用您需要的 SOAP 方法。您可以在各种博客中找到简单的示例。
If the service with which you're interacting uses lots of complex types, then you may indeed want to auto-generate some PHP codeand make use of SoapClient's classmapoption.
如果您与之交互的服务使用许多复杂类型,那么您可能确实希望自动生成一些 PHP 代码并利用 SoapClient 的classmap选项。

