Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 42993 invoked from network); 26 Nov 2006 18:20:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2006 18:20:25 -0000 Received: (qmail 78404 invoked by uid 500); 26 Nov 2006 18:20:29 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 77793 invoked by uid 500); 26 Nov 2006 18:20:25 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 77782 invoked by uid 99); 26 Nov 2006 18:20:25 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 26 Nov 2006 10:20:24 -0800 Received: (qmail 42940 invoked from network); 26 Nov 2006 18:19:19 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 26 Nov 2006 18:19:19 -0000 Message-ID: <4569DA8C.5030003@gmail.com> Date: Sun, 26 Nov 2006 18:18:52 +0000 From: Sanka Samaranayke User-Agent: Mail/News 1.5 (X11/20060223) MIME-Version: 1.0 To: Sanka Samaranayke CC: axis-user@ws.apache.org Subject: Re: [Axis2] Removing namespace prefix from the OMElement References: <4569D261.4030502@gmail.com> In-Reply-To: <4569D261.4030502@gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sanka Samaranayke wrote: > Reposting with the appropriate prefix. > > --Sanka > > -------- Original Message -------- Subject: Removing namespace > prefix from the OMElement Date: Sat, 25 Nov 2006 18:46:13 -0500 > From: Gul Onural Reply-To: > axis-user@ws.apache.org To: > > > > Removing namespace prefix from the OMElement > > Using RawXMLMessageReceiver, my service receives and OMElement as > input message. OMElement children has namespace prefix : > > XXX > > Is there a way to remove the namespace prefix from OMElement and > all its children, programmatically ? IFAIK you can do it only at the creation time of the OMElement. E.g. OMFactory factory = OMAbstractFactory.getOMFactory(); OMNamespace ns1 = factory.createOMNamespace("http://test1.com", "t1"); OMElement p1 = factory.createOMElement("parent",ns1); OMNamespace ns2 = factory.createOMNamespace("http://test1.com", "t2"); OMElement c1 = factory.createOMElement("child", ns2); p1.addChild(c1); p1.serialize(System.out); will give the following output. > > > > > > -- Sanka Samaranayake WSO2 Inc. > > http://sankas.blogspot.com/ http://www.wso2.net/ - -- Sanka Samaranayake WSO2 Inc. http://sankas.blogspot.com/ http://www.wso2.net/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQFFadqM/Hd0ETKdgNIRAkJBAKCCP5GiJjCyeonIHsm3SbVo3m2+4ACfUCMB 1ss3hy/AL3yovXlaifQyWDk= =yOwC -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org