storm_buster
storm_buster

Reputation: 7568

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

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?

Upvotes: 10

Views: 8408

Answers (2)

GingerHead
GingerHead

Reputation: 8230

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>

Upvotes: 2

storm_buster
storm_buster

Reputation: 7568

<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

Upvotes: 15

Related Questions