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
[email protected]
http://www.dankulp.com/blog