Sign SOAP request on client-side with Spring

痞子三分冷 提交于 2019-12-06 10:46:09

Well, I am afraid I am going to answer my own questions:

First one: NO. Chapter 7 of Spring Web Services documentation is about both sides, client and server.

Second one: Acording with the answer to the fisrt question, YES, as it is described on chapter 7 of Spring Web Services documentation.

My error was that I was declaring interceptor in this way:

<sws:interceptors>
    <ref bean="wsSecurityInterceptor" />
</sws:interceptors>

and this interceptors just affect to server-side Web services. For clients it should be done in this way:

<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
    <property name="marshaller" ref="marshaller" />
    <property name="unmarshaller" ref="marshaller" />
    <property name="defaultUri"
        value="http://localhost:8080/ws-demo/myws" />
    <property name="interceptors">
        <list>
            <ref bean="wsSecurityInterceptor" />
        </list>
    </property>
</bean>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!