Hi Sergey! Thanks for the quick response! I just tried with the 2.7.8-SNAPSHOT version. Relative redirection is working now!
I noticed that a second call, with the same client is done to the 'old' location. The redirection adds a session-id to the url. So it is important to keep this id in the URL. Is there a setting that enables this? Greetz, Marco 2013/9/26 Sergey Beryozkin <[email protected]> > I replaced the manual resolution code I added originally with URI resolve > call - that should fix the issue; also add a new "max.http.redirect.count" > property - can be used to prevent the client from spinning... > > Cheers, Sergey > > > On 26/09/13 15:38, Sergey Beryozkin wrote: > >> Hi >> >> Yes, I can see it does not resolve it correctly, I have a test but a bit >> more work is needed. I'll update you when I'm done >> >> Sergey >> >> On 26/09/13 15:01, Marco Mans wrote: >> >>> Hi Folks! >>> >>> I have some problems with a webservice that uses a relative redirect. >>> This is what is happening: >>> 1. I send a request to >>> http://mydomain.com/**webservice.asmx<http://mydomain.com/webservice.asmx> >>> 2. The webservice answers with a HTTP 302 and sets the location to >>> /(12323123312)/webservice.asmx >>> 3. CXF autmatically redirects and send a second request to >>> http://mydomain.com/**webservice.asmx/(12323123312)/**webservice.asmx<http://mydomain.com/webservice.asmx/(12323123312)/webservice.asmx> >>> >>> Instead of replacing the root of my path it simply adds the relative >>> redirection at the end of the original request. >>> >>> This code I use to enable autoredirection: >>> <snippet> >>> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); >>> factory.setServiceClass(**MyWebServiceSoap.class); >>> factory.setAddress("http://**mydomain.com/webservice.asmx<http://mydomain.com/webservice.asmx> >>> ")**; >>> service = (GensysWebServiceSoap) factory.create(); >>> >>> Client client = ClientProxy.getClient(service)**; >>> ((HTTPConduit) (client.getConduit())).**getClient().setAutoRedirect(** >>> true); >>> client.getBus().getProperties(**).put("http.redirect.relative.**uri", >>> true); >>> </snippet> >>> >>> Does anyone knows how to fix this? >>> >>> Thanks in advance!!! >>> >>> Greetz, >>> Marco Mans >>> >>> >> > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > > Blog: http://sberyozkin.blogspot.com >
