How do I specify which kind of version of soap do

2020-03-12 03:37发布

I am developing a soap web service client with spring.

I am using webServiceTemplate

How do I specify which kind of version of soap do I use?

I can see that it s using soap 1.1 by default.

I want to force it to use soap 1.2

How can I do that?

2条回答
戒情不戒烟
2楼-- · 2020-03-12 04:24

You just specify the soap version in the configuration file of spring usually spring.cfg.xml in the following way:

<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
    <property name="soapVersion">
        <util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12"/>
    </property>
</bean>
查看更多
虎瘦雄心在
3楼-- · 2020-03-12 04:31
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
    <property name="soapVersion">
        <util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12"/>
    </property>
</bean>

i just found, i need to pass a message Factory

查看更多
登录 后发表回答