Changing a SOAP Endpoint on an Outgoing Message using JAX-WS

This tip comes from Arancha Ocana Diaz-Ufano, who did all the hard work to figure it out!

In WebSphere ESB, there are many ways of changing the endpoint of a SOAP message outbound from a mediation flow, and the normal way is to use the dynamic endpoint support.  To be clear, this is recommended way.

However, there is another technique, and that’s to use a JAX-WS handler (assuming you’re using a JAX-WS Web Services binding) on the outbound message. This might be useful if, for example, you absolutely cannot modify a mediation flow that’s been given to you, you cannot modify the endpoint at administration time (for example, from the administration console), or you want to do the override in a generic fashion across a large number of mediation flows.

The key is knowing the magic incantation to put in your JAX-WS handler. And here it is:

mySOAPMessageContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://myhost:9080/MyEndPoint");

Thanks again to Arancha for allowing us to publish this tip.

Michal Kuzak Joins SOA Tips ‘n’ Tricks

Two new joiners in as many weeks!

My ex-IBM colleague Michal Kuzak has also agreed to join the SOA Tips ‘n’ Tricks team, along with David George. He’s an independent WebSphere Process Server consultant, and will no doubt have many tips ‘n’ tricks to share.

As always, please remember that the postings on this blog are our own and don’t necessarily represent our employers’ positions, strategies or opinions.

David George Joins SOA Tips ‘n’ Tricks

I’m pleased to say that my colleague David George has agreed to join the SOA Tips ‘n’ Tricks team. He’s a WebSphere Process Server consultant, and will be blogging about it, WebSphere Integration Developer, and other related subjects. Like myself, David is part of IBM Software Services and works with IBM customers on a regular basis, so has a wealth of experience to share.

As always, please remember that the postings on this blog are our own and don’t necessarily represent IBM’s positions, strategies or opinions.