You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/03/24 11:44:24 UTC
DO NOT REPLY [Bug 18274] New: -
prefix name not set during adding child element
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18274>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18274
prefix name not set during adding child element
Summary: prefix name not set during adding child element
Product: Axis
Version: 1.1rc2
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: ramil.israfilov@aditel.be
I'm using SOAP API to construct SOAP message. Here is example of code:
-----------
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage msg = factory.createMessage();
SOAPPart sp=msg.getSOAPPart();
SOAPEnvelope se=sp.getEnvelope();
SOAPBody sb= se.getBody();
SOAPElement el1= sb.addBodyElement(se.createName
("element1","prefix1","http://www.sun.com"));
SOAPElement el2 = el1.addChildElement(se.createName
("element2", "prefix2", "http://www.apache.org"));
msg.writeTo(new FileOutputStream("msg1.xml"));
-------------
In msg1.xml file I expect that el2 should have 'prefix2' prefix, but instead it
is set to 'ns1'.
After digging into source code I found that probably it is because
child.setPrefix(prefix); is not used in addChildElement(Name name) method
oforg.apache.axis.message.MessageElement class.
Could it be added ?