Skip to main content

How to change end point address but not wsa:to

2 replies [Last post]
manojbmsce1
Offline
Joined: 2013-02-04
Points: 0

Hi,
I have a web service client generated from a wsdl using jax-ws.
The serivice runs on a service bus and the wsdl is not available at runtime.
So I need to provide the local wsdl while creating a service and then,
provide the acutal end point using BindingProvider.ENDPOINT_ADDRESS_PROPERTY

**My problem is, when I set this property in the binding provider's context, the wsa:to element is also set to this URL,**

I want only the end point to change, but the wsa;to element should remain what is there in the wsdl.

Any suggestions how to go about this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
manojbmsce1
Offline
Joined: 2013-02-04
Points: 0

I don't know if this is a workaround or the solution, but unless someone comes up with a better way of doing it :

Use a soap handler to get the soap header (sub node with name to) and update its value.
(That simple.... no, it is not straight forward,
we need to remove the soap header and then add it again with proper values.
This took me a lot of time and effort to find out. :-)
)

Glen Mazza

Just FYI, here's an article on adding JAX-WS handlers to modify SOAP
messages: http://www.jroller.com/gmazza/entry/jaxws_handler_tutorial .

Glen

On 02/06/2013 08:00 AM, forums@java.net wrote:
> I don't know if this is a workaround or the solution, but unless someone
> comes up with a better way of doing it : Use a soap handler to get the
> soap
> header (sub node with name to) and update its value. (That simple....
> no, it
> is not straight forward, we need to remove the soap header and then
> add it
> again with proper values. This took me a lot of time and effort to
> find out.
> :-) )
>