cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psd <>
Subject Re: CXF JAXRS client Base URL is incorrect
Date Mon, 05 Jan 2015 09:23:05 GMT
Sergey Beryozkin wrote
> Hi
> This property was added to make sure that when a WebClient instance is 
> reused and it has been redirected to a new URI then this new URI will be 
> effective in the subsequent invocations.
> I can see it can have side-effects for Authorization-based retransmits, 
> and I've got it fixed.
> The easy fix/workaround is not to init a WebClient with a URI like 
> "http://localhost:8080/api-ws/ws/rs/v1/ci/COMPANY/2222" but with 
> "http://localhost:8080/api-ws/ws/rs/v1/" and then build a current URI 
> with path(). Can not be easy with proxies so for now do not reuse the 
> same proxy when testing the authorization retransmits
> Thanks, SErgey

Thanks a lot Sergey for your response, yes, I'm initializing client with URI

	<jaxrs:client id="v1RestClient" serviceClass="${REST.v1.Class}"
			<ref bean="apiSecurityRestOutInterceptor" />
			<ref bean="genericResponseExceptionMapper"/>
			<bean class="org.apache.cxf.feature.LoggingFeature"/>

but since first unit test call makes URL
"http://localhost:8080/api-ws/ws/rs/v1/ci/COMPANY/2222" & because of
authorization retransmit that becomes base URL thenforth...

I can see that you are suggesting not reusing proxy, but apart from that is
there any way I can clear out "transport.retransmit.url" in
org.apache.cxf.jaxrs.client.AbstractClient class? say by passing some
property etc?

- psd

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message