cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: spring 2.5 with client side manual address
Date Thu, 03 Dec 2009 19:20:53 GMT
On Wed December 2 2009 8:35:57 pm Saiful Haqqi wrote:
> hi all,
> 
> many article say how to create client side like this with spring,
> <bean id="client" class="demo.order.OrderProcess"
> factory-bean="clientFactory" factory-method="create"/>
>     <bean id="clientFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>         <property name="serviceClass" value="demo.order.OrderProcess"/>
>         <property name="address"
> value="http://localhost:8888/siknws/OrderProcess"/>
>     </bean>
> 
> My problem, I'm have many web service with same method. I want change
> address localhost:8888 to other address manually, that is imposinle in
> spring?

One you have a handle to your client object, you can always reset the address 
it uses on a per invoke basis:


((BindingProvider)client).getRequestContext()
  .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
         "http://blah/blah/blah");


-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message