繁体   English   中英

WSDL使用SOAP 1.2时生成webservice客户端

[英]Generate webservice client when WSDL uses SOAP 1.2

我有一个 WSDL 文件,我想从中生成一个 Web 服务客户端。 问题是我得到的 WSDL 使用 SOAP 1.2:

<wsdl:definitions xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" [...]>

<wsoap12:operation soapAction="[...]" />

当我尝试从中生成客户端时,我只得到请求/响应 Java bean。

If I on the other hand edit the WSDL to use SOAP 1.1 (and nothing else), everything generates beautifully, except that it will send SOAP 1.1 request instead of SOAP 1.2, and the server will yell at me to use 1.2 instead...

我使用 Windows 7 上的 Spring Tool Suite 生成代码,方法是右键单击 WSDL 并选择“Web 服务 > 生成客户端”。 当我们使用 SOAP 1.1 时,所有这一切都像魅力一样起作用。

我还尝试使用 maven 插件jaxws-maven-pluginwsimport生成它,但无济于事; 它也只生成bean,而不是代理。

有没有办法让它工作? 或者有什么方法可以修改生成的*ServiceProxy.java类,让他们使用 SOAP 1.2 而不是 1.1?

你可能想看看地铁。 那应该支持 Soap 1.2。

有人在这里使用 Metro 发布了对客户端 gen 的引用: 使用本地 WSDL 文件生成 Metro 客户端

Metro wsimport 选项: http://metro.java.net/1.2/docs/wsimport.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM