Java 如何配置JaxWsPortProxyFactoryBean以使用SOAP1.2WebService
我需要使用Java 如何配置JaxWsPortProxyFactoryBean以使用SOAP1.2WebService,java,spring,web-services,soap,Java,Spring,Web Services,Soap,我需要使用JaxWsPortProxyFactoryBean 以下是我的Spring配置文件的片段: <bean id="documentUploadServiceJaxwsClient" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean" lazy-init="true"> <property name="serviceInterface" value="org.te
JaxWsPortProxyFactoryBean
以下是我的Spring配置文件的片段:
<bean id="documentUploadServiceJaxwsClient"
class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean"
lazy-init="true">
<property name="serviceInterface" value="org.tempuri.IDocumentUploadService" />
<property name="namespaceUri" value="http://tempuri.org/" />
<property name="serviceName" value="DocumentUploadService" />
<property name="portName" value="secureBinding" />
<property name="endpointAddress" ref="documentUploadServiceEndpointString" />
<property name="customProperties" ref="internetProxyProperties" />
<property name="handlerResolver" ref="handlerResolver"/>
</bean>
我正在使用Spring3.0.0。我不想讨论与CXF相关的配置,因为这只是一个短期解决方案
我也尝试过使用SOAPHandler
(脏解决方案),但服务器不允许我在运行时更改SOAPEnvelope
。
我使用的示例代码:
SOAPMessage sm=MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createMessage(mimeHeaders,newbytearrayinputstream(stream.toByteArray())代码>
context.setMessage(sm)代码>
Websphere给了我以下信息:
原因:java.lang.IllegalArgumentException:WSWS4117E:试图将协议为SOAP 1.1的SOAPEnvelope添加到协议为SOAP 1.2的SOAPMessage
我还尝试设置customproperties
,但没有帮助
我需要一些相当于
但是通过使用JaxWsPortProxyFactoryBean
理想情况下,我想让它通过简单的配置工作
我们非常感谢您在这方面提供的任何帮助
非常感谢你运气好吗?我被困在这个问题上