jax-ws
  1. jax-ws
  2. JAX_WS-1

Authentication doesn't work with HTTP binding

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 2.0.1 M1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      1

      Description

      Weekly build 20th of October.

      I am using SE HttpServer + BasicAuthFilter + HTTP Binding.

      The following scenario works properly when using SOAP binding.

      The client send an Authenticated request.
      The server Filter is not called.
      The client receives an exception :
      Caused by: javax.xml.ws.WebServiceException: request requires HTTP
      authentication: Unauthorized
      at
      com.sun.xml.ws.util.XMLConnectionUtil.getXMLMessage(XMLConnectionUtil.java:66)
      at
      com.sun.xml.ws.protocol.xml.client.XMLMessageDispatcher.getXMLMessage(XMLMessageDispatcher.java:711)
      at
      com.sun.xml.ws.protocol.xml.client.XMLMessageDispatcher.receive(XMLMessageDispatcher.java:310)
      at
      com.sun.xml.ws.protocol.xml.client.XMLMessageDispatcher.doSend(XMLMessageDispatcher.java:187)
      at
      com.sun.xml.ws.protocol.xml.client.XMLMessageDispatcher.send(XMLMessageDispatcher.java:100)
      at
      com.sun.xml.ws.client.dispatch.impl.DispatchDelegate.send(DispatchDelegate.java:75)
      at
      com.sun.xml.ws.client.dispatch.DispatchBase.sendAndReceive(DispatchBase.java:305)
      ... 7 more

        Activity

        Hide
        kohlert added a comment -

        re-assigning to responsible engineer

        Show
        kohlert added a comment - re-assigning to responsible engineer
        Hide
        jitu added a comment -

        The problem seems to be in client runtime. ...client.XMLMessageDispatcher
        doesn't handle USERNAME_PROPERTY, PASSWORD_PROPERTY. It works fine in SOAP
        binding since ...client.SOAPMessageDispatcher handles them. Ideally, these
        properties should be handled in HttpClientTransport.

        One workaround is to use java.net.Authenticator class for this purpose and that
        gives more control for authenticating HTTP requests.

        Show
        jitu added a comment - The problem seems to be in client runtime. ...client.XMLMessageDispatcher doesn't handle USERNAME_PROPERTY, PASSWORD_PROPERTY. It works fine in SOAP binding since ...client.SOAPMessageDispatcher handles them. Ideally, these properties should be handled in HttpClientTransport. One workaround is to use java.net.Authenticator class for this purpose and that gives more control for authenticating HTTP requests.
        Hide
        kwalsh added a comment -

        assigning to kwalsh

        Show
        kwalsh added a comment - assigning to kwalsh
        Hide
        kwalsh added a comment -

        accepted

        Show
        kwalsh added a comment - accepted
        Hide
        kwalsh added a comment -

        USERNAME/PASSWORD properties used in XMLMessageDispatcher on client.
        HTTP authentication code also added where needed.

        Show
        kwalsh added a comment - USERNAME/PASSWORD properties used in XMLMessageDispatcher on client. HTTP authentication code also added where needed.

          People

          • Assignee:
            kwalsh
            Reporter:
            jfdenise
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: