You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by to...@attbi.com on 2002/08/28 18:16:27 UTC
empty xmlns attribute
I'm attempting to create a simple document based soap
message. When I create the body all of the elements
within have an empty xmlns attribute which the service
objects to. I'm using axis beta3.
For example,
Document doc = new DocumentImpl();
Element elem1 = doc.createElement("elem1");
Element elem2 = doc.createElement("elem2");
elem1.appendChild(elem2);
SOAPBodyElement reqSOAPBodyElement = new SOAPBodyElement
(somePQN);
reqSOAPBodyElement.addChild(new MessageElement(elem1));
SOAPEnvelope env = getEnvelope(); //creates generic env
w/header
env.addBodyElement(reqSOAPBodyElement);
SOAPEnvelope resp = call.invoke(env);
When I look at the body of the created message the
result looks something like this.
<soapenv:Body>
<elem1 xmlns="">
<elem2 xmlns="">some value</elem2>
</elem1>
</soapenv:Body>
How do I get rid of the xmlns="" attributes? BTW: It
appears these are being added by
SerializationContextImpl.
Tom C.