Marco Firrincieli
2012-10-18 08:14:04 UTC
For some reason I cant' seem to create <soap:Header> and <soap:Envelope>
tags the way I want them to be.
I need <soap:Header> to contain the reference to a particular namespace
so something like <soap:Header xmlns:mfi="http://this.particular.ns.com">
and soap:Envelope has to be
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://this.particular.com" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
How is that possible?
I've tried with something like this:
List<Header> headers = new ArrayList<Header>();
QName qName = new QName(...)
Header dummyHeader = new Header(...);
headers.add(dummyHeader);
Map<String, Object> requestContext = ((javax.xml.ws.BindingProvider)
port).getRequestContext();
requestContext.put(Header.HEADER_LIST, headers);
But this adds ns to <soap:Header> sub-tags.
For the envelope part I'm not sure where to start.
tags the way I want them to be.
I need <soap:Header> to contain the reference to a particular namespace
so something like <soap:Header xmlns:mfi="http://this.particular.ns.com">
and soap:Envelope has to be
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="
http://this.particular.com" xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/">
How is that possible?
I've tried with something like this:
List<Header> headers = new ArrayList<Header>();
QName qName = new QName(...)
Header dummyHeader = new Header(...);
headers.add(dummyHeader);
Map<String, Object> requestContext = ((javax.xml.ws.BindingProvider)
port).getRequestContext();
requestContext.put(Header.HEADER_LIST, headers);
But this adds ns to <soap:Header> sub-tags.
For the envelope part I'm not sure where to start.