dev@jax-ws.java.net

HTTP redirect of web service

From: Vinh Vo <vthanhvinh_at_gmail.com>
Date: Fri, 15 Jul 2011 21:07:24 +0300

Hi,

My web service is in tomcat and tomcat is behind a load balancer which
redirect the traffic from http to https.

I tried to access the web service behind the balancer but always get an
error :


Exception in thread "main"
com.sun.xml.internal.ws.client.ClientTransportException: The server sent
HTTP status code 301: Moved Permanently
     at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(Unknown
Source)
     at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(Unknown
Source)
     at
com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(Unknown
Source)
     at
com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(Unknown
Source)
     at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
     at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
     at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
     at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
     at com.sun.xml.internal.ws.client.Stub.process(Unknown Source)
     at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(Unknown Source)
     at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
     at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
     at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
     at $Proxy28.getDataForm(Unknown Source)
     at
com.wapice.netmes.printing.service.impl.PrintingClientServiceImpl.getDataForm(PrintingClientServiceImpl.java:51)
     at com.wapice.netmes.printing.main.Main.main(Main.java:96)

I guess the problem is the client does not follow the redirection of the
load balancer.

I am in a difficult situation as it has been deployed in production
server and our test servers do not have load balancer. So this problem
is unexpected and I really need to fix it as fast as possible.

Thank you for your help.