1 Reply Latest reply on Mar 5, 2013 10:20 PM by ffang

    Basic authentication on "To" endpoint in a camel route

    rvojjala

      Hi,

      I need to invoke an external web service from my application in Servicemix. This external Web service needs username and password for the basic authentication.

       

      My route looks simple:

       

       

       

      In other words, how can I add SOAP header for WSSE for an external web service.

       

      Appreciate your response.

       

      Edited by: rvojjala on Mar 5, 2013 5:40 PM

        • 1. Re: Basic authentication on "To" endpoint in a camel route
          ffang

          Hi,

           

          I think you mismatch some concept.

           

          The

          "authMethod=Basic&authUsername=admin&authPassword=admin".

          is used for http basic auth, that said, it will add username/password http header.

          But from your description your external webservice is expecting ws-security UsernameToken header, it's soap header and has nothing to do http basic auth.

           

          And I suggest you use camel-cxf endpoint to talk to external webservice, where you can easily configure the WSS4JInterceptor to add UsernameToken soap headers to the outbound message.

           

          Freeman