@pre:使用 Netbeans 8.1、JDK 1.8 进行开发并使用 jaxws-maven-plugin 2.3 强制使用 SOAP 1.2
大家好
我需要使用外部 SOAP 服务。该服务不是我的,所以我无法更改 WSDL 文件,它已经用于其他目的。
我遇到的问题如下:
- 该服务在每个请求中都需要一个标头和一个正文。这就是 WSDL 文件看起来像这样的原因
<message name="processRequest">
<part element="impl:SERVICE_DISPATCHER_REQUEST" name="part">
</part>
<part element="impl:SERVICE_DISPATCHER" name="request_header">
</part>
</message>
<portType name="ServiceDispatcherPortType">
<operation name="process">
<input message="impl:processRequest" name="processRequest">
</input>
more stuff here
</operation>
</portType>
<binding name="ServiceDispatcherSoapBinding" type="impl:ServiceDispatcherPortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="process">
<wsdlsoap:operation soapAction=""/>
<input name="processRequest">
<wsdlsoap:header message="impl:processRequest" part="request_header" use="literal">
</wsdlsoap:header>
<wsdlsoap:body use="literal"/>
</input>
more stuff here
</operation>
</binding>
- 当我尝试使用 jaxws-maven-plugin 2.3 强制使用 SOAP 1.2(在我的 pom.xml 中为真)自动生成相关代码时,您会收到以下错误消息:
[Spanish] [WARNING] Compruebe el enlace \"process\" de la operación abstracta; la parte \"request_header\" tiene varios enlaces. De todas formas, se intentará generar artefactos...
[English translation] [WARNING] Check abstract operation \"process\" link; \"request_header\" part has several link. Nonetheless will try to generate artifacts.
但是它不起作用。jaxws-maven-plugin 2.3 不生成进程方法,所以我无法调用该服务。
拜托,你能帮帮我吗?先感谢您。