使用此配置(在 Tomcat 中运行良好)初始化我的 webserviceTemplate:
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
<property name="messageFactory">
<bean class="com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl"/>
</property>
</bean>
<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
<constructor-arg ref="messageFactory"/>
</bean>
我得到这个堆栈跟踪:
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl' to required type 'javax.xml.soap.MessageFactory' for property 'messageFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.xml.internal.messaging.saaj.soap.ver1_2.SOAPMessageFactory1_2Impl] to required type [javax.xml.soap.MessageFactory] for property 'messageFactory': no matching editors or conversion strategy found
我无法弄清楚解决方案,有什么想法吗?