Invalid HTTP server response [307] - Temporary Redirect - message with Web Service on JBoss

Solution Verified - Updated -

Issue

  • My web service client won't allow me to redirect a request from http to a https.

  • Web Service client throws the following exception

    Exception in thread "main" 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 $Proxy16.echo(Unknown Source)
         at myecho.EchoClient.main(EchoClient.java:29)
    Caused by: java.io.IOException: Could not transmit message
         at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:211)
         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)
         ... 4 more
    Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Invalid HTTP server response [307] - Temporary Redirect. Response: Temporary Redirect/307.
         at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:380)
         at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:149)
         at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:141)
         at org.jboss.remoting.Client.invoke(Client.java:1925)
         at org.jboss.remoting.Client.invoke(Client.java:786)
         at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:190)
         ... 7 more
    Caused by: org.jboss.ws.WSException: Invalid HTTP server response [307] - Temporary Redirect
         at org.jboss.ws.core.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:77)
         at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:562)
         at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:334)
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x

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