1 Reply Latest reply on Mar 18, 2008 1:32 PM by Lihui Pang

    How to pass user credential when calling secured WS from ESB

    Lihui Pang Newbie

      Hi, I am using SOAPClient to call an external web service. The web service is secured that needs client to provide username and password. However I can NOT find a way to pass the user credential either in Message, or SOAPClient?

      If I remove the security related annotation from MyServiceBean, I can call the method and get the result.

      Please Help.

      Here it's the current ESB config for SOAPClient

      Here it's the MyServiceBean

      @RolesAllowed({"ADMIN", "ADMIN_DATA"})
      @EndpointConfig(configName = "Standard WSSecurity Endpoint")
      @SOAPBinding(style = SOAPBinding.Style.RPC)
      @WebContext(contextRoot="/ws",authMethod="BASIC", secureWSDLAccess=false)
      public class MyServiceBean {
      public List searchProductByName(String userName){...}


      Many Thanks.