Posted by yuryu
on October 12, 2007 at 2:08 AM PDT
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("http://tempuri.org/foo/ds") changes the service endpoint address too so I get 404 not found error.
provider.setOutboundHeaders(Headers.create(new QName("http://www.w3.org/2005/08/addressing", "To"), "http://tempuri.org/foo/ds"));
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.