Wednesday, June 10, 2009

Override default JAX-WS endpoint address in wsdl


((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, MyENDPOINT);

4 comments:

  1. Can 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".

    ReplyDelete
  2. Aha - 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.

    ReplyDelete
  3. Remember the context is the request, so need to do this for each time ws is invoked...

    ReplyDelete