((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, MyENDPOINT);
Wednesday, June 10, 2009
Override default JAX-WS endpoint address in wsdl
((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, MyENDPOINT);
Labels:
java,
jax-ws,
webservice
Subscribe to:
Post Comments (Atom)
Is there a portable solution?
ReplyDeleteCan you elaborate? Agree the syntax is ugly, but typically from DEV=>QA=>PROD all the deployer will have to do is update the external config properties with the correct endpoint value as per env for "MyENDPOINT".
ReplyDeleteAha - sorry - I was referencing the JAX-WS spec. I get the impression that your code debend on the JAX-WS RI implementation / Metro and would not work for e.g. CXF JAX-WS implementation.
ReplyDeleteRemember the context is the request, so need to do this for each time ws is invoked...
ReplyDelete