1 Reply Latest reply on May 28, 2009 9:05 AM by asoldano

    JBossWS client not sending Basic Authentication

    leobaz2

      Hi, I have a web service client that is trying to call a webservice secured with basic authentication. I had this working with JAVA 6 but not with JAVA 5.

      I am setting the username and password correctly as seen below but I am still getting a 401 error code back. When I used tcpmon to inspect the request\response, I can see that the username and password is not being passed to the client.

      Map requestContext = ((BindingProvider) manager).getRequestContext();
      requestContext.put(BindingProvider.USERNAME_PROPERTY, username);
      requestContext.put(BindingProvider.PASSWORD_PROPERTY, password);
      


      When I debug, I can see that the web service proxy has the username and password in its Map. So why are they not being sent along with the webservice call? Does it have something to do with the versions of the Jars I am using? I am using JBoss 4.2.3 and the jars are.


      jboss\client\xmlsec.jar
      jboss\client\jboss-jaxws.jar
      jboss\client\jbossws-client.jar
      jboss\client\jboss-common-client.jar
      jboss\lib\endorsed\serializer.jar
      jboss\lib\endorsed\xalan.jar
      jboss\lib\endorsed\xercesImpl.jar
      commons-validator
      commons-logging-api
      <my client stubs jar> created using jwsc ant task


        • 1. Re: JBossWS client not sending Basic Authentication
          asoldano

          Which version of JBossWS are you using? Given the current lib configuration, you're using the different jax-ws implementation when switching from JDK 1.5 to 1.6 (more specifically you use the Sun's one with JDK6 as you don't have jbossws specific jars in endorsed dir).
          Perhaps you might want to try with more recent jbossws version?