"Invalid HTTP server response [401] - Unauthorized." message with Web Service on JBoss

Solution Unverified - Updated -

Issue

  • Web Service client throws the following exceptions :

    javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
            at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:307)
            at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:245)
            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
            at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
            at $Proxy291.findItem(Unknown Source)
            at com.aaa.bbb.obtp.exchange.MSExchange.getNewEmail(MSExchange.java:198)
            at com.aaa.bbb.obtp.exchange.ListenForExchangeResponses.run(ListenForExchangeResponses.java:97)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Could not transmit message
            at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:210)
            at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
            at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
            at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:233)
            ... 6 more
    Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Invalid HTTP server response [401] - Unauthorized. Response: Unauthorized/401.
            at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:368)
            at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:148)
            at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:141)
            at org.jboss.remoting.Client.invoke(Client.java:1858)
            at org.jboss.remoting.Client.invoke(Client.java:718)
            at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:189)
            ... 9 more
    Caused by: org.jboss.ws.WSException: Invalid HTTP server response [401] - Unauthorized
            at org.jboss.ws.core.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:77)
            at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:548)
            at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:322)
            ... 14 more
    

Environment

  • JBoss Enterprise Application Platform [EAP]

    • 4.3.0.GA_CP06
  • Web Services Application

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content