Skip to main content

Changing was:To to an address other than the service endpoint

1 reply [Last post]
Joined: 2007-10-12
Points: 0


I created a service with wsimport (launched by NetBeans 6 Beta) from a WSDL file which contains .

On the server side, I can get the soap headers from
HeaderList headers = (HeaderList) context.get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY);
String to = headers.getTo(AddressingVersion.W3C, SOAPVersion.SOAP_11);
and seems working ok.

However, on the client side, I cannot find an API to add a wsa:To header other than the service endpoint.
provider.setAddress("") changes the service endpoint address too so I get 404 not found error.
provider.setOutboundHeaders(Headers.create(new QName("", "To"), ""));
simply adds a new header so I get two To headers resulting error.

How can I change the header? or can I change the server(glassfish bundled with netbeans) settings to remap all requests to a single endpoint?

I attached the service wsdl file.
JAX-WS version is JAX-WS RI 2.1.2-hudson-182-RC1.

thanks in advance.

Reply viewing options

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

I am facing a similar problem here :

This problem was there since 2007 and there is no solution yet !