Announcement Announcement Module
Collapse
No announcement yet.
wss4j namespace issue in calling legacy ws Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • wss4j namespace issue in calling legacy ws

    I using spring integration flow to invoke legacy webservice which requires usr/pwd.

    I use "org.springframework.ws.soap.security.wss4j.Wss4jS ecurityInterceptor" to pass the usr/pwd.

    Code:
        <bean id="wsSecurityInterceptorId" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext" 
           class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
           <property name="securementActions"  value="UsernameToken" />
           <property name="securementUsername" value="admin" />
           <property name="securementPassword" value="welcome01" />
           <property name="securementMustUnderstand" value="false"/>        
           <property name="securementPasswordType" value="PasswordText" />
       </bean>
    In the integration flow -

    Code:
       <int-ws:outbound-gateway id="gateway"
        interceptor="**wsSecurityInterceptorId**" 
        request-channel="ws.request.in" reply-channel="ws.response.out"
        uri="http://${host}:${port}${webservice.endpoint}">
    The Soap message generated is fine.

    Code:
    <SOAP-ENV:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    ...
    </SOAP-ENV:Header>
    But probably since the legacy is implemented with older ver of ws-security, this doesn't work. It works only if the namespace is xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext".

    Code:
    <SOAP-ENV:Header>
     <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
      ...
     </SOAP-ENV:Header>
    What is the best way to change my ws-client to produce the namespace like above ?

    Arun
Working...
X