Announcement Announcement Module
Collapse
No announcement yet.
JaxWsPortProxyFactoryBean and WS-Security Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JaxWsPortProxyFactoryBean and WS-Security

    Hello,

    i tried to get a UsernamePasswordToken from a webservice. But the Response has a MustUnderstand header and i get the following exception:

    org.springframework.remoting.jaxws.JaxWsSoapFaultE xception: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood; nested exception is javax.xml.ws.soap.SOAPFaultException: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.doInvoke(JaxWsPortClientInterceptor.ja va:395)
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.invoke(JaxWsPortClientInterceptor.java :379)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy56.requestSecurityToken(Unknown Source)
    at com.genevaid.vertriebsprototyp.test.WebserviceTest .stServiceTest2(WebserviceTest.java:86)
    at org.springframework.test.context.testng.AbstractTe stNGSpringContextTests.run(AbstractTestNGSpringCon textTests.java:140)
    Caused by: javax.xml.ws.soap.SOAPFaultException: MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood
    at com.sun.xml.ws.protocol.soap.MUTube.createMUSOAPFa ultException(MUTube.java:154)
    at com.sun.xml.ws.protocol.soap.ClientMUTube.processR esponse(ClientMUTube.java:96)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:6 08)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:55 7)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542 )
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:4 39)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStu b.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke (SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke (SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.j ava:118)
    at $Proxy55.requestSecurityToken(Unknown Source)
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.doInvoke(JaxWsPortClientInterceptor.ja va:416)
    at org.springframework.remoting.jaxws.JaxWsPortClient Interceptor.doInvoke(JaxWsPortClientInterceptor.ja va:392)
    ... 34 more
    ... Removed 32 stack frames

    How can I force spring to ignore the mustUnderstand flag, so that I can handle the soap message with my own handler?

    here is my spring config snippet:

    Code:
    	<bean id="securityService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
        	<property name="serviceInterface" value="com.test.SecurityServicePortType"/>
        	<property name="wsdlDocumentUrl" value="META-INF/wsdl/SecurityService-1.0.0.0.wsdl"/>
         	<property name="namespaceUri" value="http://www.test.com/namespace/sec"/>
        	<property name="serviceName" value="SecurityService-1.0.0.0"/>
        	<property name="portName" value="SecurityService"/>
        	<property name="password" value="..."/>
        	<property name="username" value="..."/>
        	<property name="handlerResolver" ref="securityHandlerResolver"/>
        	<property name="soapActionUri" value="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT"/>
    	</bean>
    Best regards,
    Jonas
Working...
X