Announcement Announcement Module
Collapse
No announcement yet.
Interoperability between Axis2 client and a SpringWS Wss4jSecurityInterceptor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interoperability between Axis2 client and a SpringWS Wss4jSecurityInterceptor

    Hi,
    I have a Spring WS that is working with a Wss4JSecurityInterceptor implemented on the server side. I can access the ws great using a Spring WS client by supplying my credentials to the Wss4jInterceptor class like so:
    Code:
    private final WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
    ...
    
      		Wss4jSecurityInterceptor interceptor = new Wss4jSecurityInterceptor(); 
    		interceptor.setSecurementActions(USERNAME_TOKEN);
    		interceptor.setSecurementUsername("legitUser");
    		interceptor.setSecurementPassword("secret");
    		interceptor.setSecurementPasswordType(WSConstants.PW_TEXT); 
    		interceptor.setSecurementMustUnderstand(false);
    		
    		webServiceTemplate.setInterceptors(new Wss4jSecurityInterceptor[]{interceptor});

    My question is how can I use some other non-spring ws client (which doesn't know about Spring classes) like Axis2 or even .Net clients, supply info to the interceptor on the client side?
    I have this working fine with a Spring WS client. But now I do NOT want to use Spring on the client side at all. So no WebServiceTemplate on the client side. How can I get the setSecurementUsername and setSecurementPassword info to the server without instantiating an interceptor on the client.

    I am suspecting that I will have to populate SOAP Headers to achieve this. What headers do I need to populate and how?

    Thanks a lot!
Working...
X