You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Carlo Camerino <ca...@gmail.com> on 2010/05/30 14:58:08 UTC
Change Address For Client At Runtime
Hi,
I have a web service client developed using CXF. What we currently do is
specify the address in spring xml configuration.
Is there anyway that I could change this at runtime?
Here is how we currently configure the client using spring, is there anyway
that I could reconfigure the address at runtime?
<jaxws:client id = "cardService" serviceClass="org.tempuri.ServiceSoap"
address = "http://localhost/address">
</jaxws:client>
for e.g.
change to this
http://192.168.2.*/address
thanks
carlo
Re: Change Address For Client At Runtime
Posted by Daniel Kulp <dk...@apache.org>.
JAX-WS spec covers this:
((BindingProvider)proxy).getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_URL,
"http://192.168.2.0/address")
And that should be it.
Dan
On Sunday 30 May 2010 8:58:08 am Carlo Camerino wrote:
> Hi,
>
> I have a web service client developed using CXF. What we currently do is
> specify the address in spring xml configuration.
> Is there anyway that I could change this at runtime?
>
> Here is how we currently configure the client using spring, is there anyway
> that I could reconfigure the address at runtime?
>
> <jaxws:client id = "cardService" serviceClass="org.tempuri.ServiceSoap"
> address = "http://localhost/address">
> </jaxws:client>
>
> for e.g.
>
> change to this
>
> http://192.168.2.*/address
>
> thanks
> carlo
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog