dev@jax-ws.java.net

Re: HTTP redirect of web service

From: vo thanh vinh <vthanhvinh_at_gmail.com>
Date: Sat, 16 Jul 2011 15:30:19 +0300

I have filed a bug:

http://java.net/jira/browse/JAX_WS-966?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

I will try with your work around next Monday and let your guys know the
results.

Thank you.

On Fri, Jul 15, 2011 at 11:25 PM, Rama Pulavarthi <
Rama.Pulavarthi_at_oracle.com> wrote:

> Redirection between HTTP URL and HTTPS URL is not automatically followed as
> this would be a security issue [1]. As a workaround you can use set the new
> location as the ENDPOINT_ADDRESS_PROPERTY in the RequestContext,
>
> We have a mechanism to follow it at the tool time. We should allow this at
> runtime with some user configuration, probably through HttpConfigFeature.
> Can you please file a bug.
>
> thanks,
> Rama Pulavarthi
>
> [1] http://download.oracle.com/**javase/6/docs/technotes/**
> guides/deployment/deployment-**guide/upgrade-guide/article-**17.html<http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/upgrade-guide/article-17.html>
>
>
> On 7/15/11 11:07 AM, Vinh Vo wrote:
>
>> 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.
>>
>>
>>
>


-- 
Best regards,
Vo Thanh Vinh
Software developer, Wapice Ltd.
Phone number: +358403790485
Skype :vovinh_wapice