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 Xinjun Chen <xj...@gmail.com> on 2007/07/19 16:33:17 UTC

Fwd: [AXIOM] Undeclare default namespace

Hi Axis2 Developers,

Is it possible to undeclare a default namespace from an OMElement in AXIOM?
I tried several ways but failed to undeclare a default namespace. Could
anyone point me a way out?
Thanks.

Regards,
Xinjun

---------- Forwarded message ----------
From: Xinjun Chen <xj...@gmail.com>
Date: Jul 19, 2007 12:54 PM
Subject: [AXIOM] Undeclare default namespace
To: axis-user@ws.apache.org


Hi,

I have some problem undeclaring the default namespace in an OMElement.
I have tried the following three ways but all failed. The default namespace
is still in the OMElement.

#1:
        OMElement reqElement = ....;
        reqElement.declareDefaultNamespace("");

#2:
        OMElement reqElement = ....;
        reqElement.declareNamespace("", "");

#3:
        OMElement reqElement = ....;
        OMFactory omFactory = reqElement.getOMFactory();
        OMNamespace ns = omFactory.createOMNamespace("", "");
        reqElement.declareNamespace(ns);

Could anyone point me out what I can do to undeclare the default namespace
in AXIOM? Thanks for your help in advance.

Regards,
Xinjun

Fwd: [AXIOM] Undeclare default namespace

Posted by Xinjun Chen <xj...@gmail.com>.
 Hi AXIOM developers,

I have some problem undeclaring the default namespace in an OMElement.
I have tried the following three ways but all failed. The default namespace
is still in the OMElement.

#1:
        OMElement reqElement = ....;
        reqElement.declareDefaultNamespace("");

#2:
        OMElement reqElement = ....;
        reqElement.declareNamespace("", "");

#3:
        OMElement reqElement = ....;
        OMFactory omFactory = reqElement.getOMFactory();
        OMNamespace ns = omFactory.createOMNamespace("", "");
        reqElement.declareNamespace(ns);

Could anyone point me out what I can do to undeclare the default namespace
in AXIOM? Thanks for your help in advance.

Regards,
Xinjun

Re: Fwd: [AXIOM] Undeclare default namespace

Posted by Xinjun Chen <xj...@gmail.com>.
Hi Anne,

Yes. That's what I mean. I tried to use *reqElement.declareNamespace("",
"");* but it does not undeclare the default namespace as expected.
Do you know why it does not work as expected?


Regards,
Xinjun


On 7/24/07, Anne Thomas Manes <at...@gmail.com> wrote:
>
> By "undeclare" I believe Xinjun means that he wants to declare the
> default namespace as no value, e.g., xmlns="".
>
> Anne
>
> On 7/23/07, Xinjun Chen <xj...@gmail.com> wrote:
> > Hi Chinthaka,
> >
> > I have an element
> > <a xmlns="urn:ecNamespace">
> >    <b>bValue</b>
> > </a>.
> > I have another element <c> which is created by another OMStaxBuilder.
> <c> is
> > unqualified. Now I need to add <a> to <c> as a child of <c> but I want
> to
> > remove the namespace in <a> and make <a> unqualified.
> >
> > I tried the AXIOM API to undeclare the default namespace of <a> but
> failed.
> > I can only change the default namespace to another value but not empty
> > string, i.e., I cannot undeclare it.
> >
> >
> > Regards,
> > Xinjun
> >
> >
> > On 7/23/07, Eran Chinthaka <ch...@opensource.lk> wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > What did u mean by undeclare? If you point me what you want with some
> > > code, perhaps I can answer better.
> > >
> > > Thanks,
> > > Chinthaka
> > >
> > > Xinjun Chen wrote:
> > > > Hi Axis2 Developers,
> > > >
> > > > Is it possible to undeclare a default namespace from an OMElement in
> > AXIOM?
> > > > I tried several ways but failed to undeclare a default namespace.
> Could
> > > > anyone point me a way out?
> > > > Thanks.
> > > >
> > > > Regards,
> > > > Xinjun
> > > >
> > > > ---------- Forwarded message ----------
> > > > From: *Xinjun Chen* <xjchen001@gmail.com <mailto:xjchen001@gmail.com
> >>
> > > > Date: Jul 19, 2007 12:54 PM
> > > > Subject: [AXIOM] Undeclare default namespace
> > > > To: axis-user@ws.apache.org <ma...@ws.apache.org>
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I have some problem undeclaring the default namespace in an
> OMElement.
> > > > I have tried the following three ways but all failed. The default
> > > > namespace is still in the OMElement.
> > > >
> > > > #1:
> > > >         OMElement reqElement = ....;
> > > >         reqElement.declareDefaultNamespace ("");
> > > >
> > > > #2:
> > > >         OMElement reqElement = ....;
> > > >         reqElement.declareNamespace("", "");
> > > >
> > > > #3:
> > > >         OMElement reqElement = ....;
> > > >         OMFactory omFactory = reqElement.getOMFactory();
> > > >         OMNamespace ns = omFactory.createOMNamespace("", "");
> > > >         reqElement.declareNamespace(ns);
> > > >
> > > > Could anyone point me out what I can do to undeclare the default
> > > > namespace in AXIOM? Thanks for your help in advance.
> > > >
> > > > Regards,
> > > > Xinjun
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.3 (GNU/Linux)
> > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> > >
> > >
> > iD8DBQFGo5JvjON2uBzUhh8RAlM6AJoDKg+9UJTRdIVIDgwMgrtIkcvyZQCgmVss
> > > gisWSWkZr/pLyS9lRjOPGjY=
> > > =zx5V
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Fwd: [AXIOM] Undeclare default namespace

Posted by Anne Thomas Manes <at...@gmail.com>.
By "undeclare" I believe Xinjun means that he wants to declare the
default namespace as no value, e.g., xmlns="".

Anne

On 7/23/07, Xinjun Chen <xj...@gmail.com> wrote:
> Hi Chinthaka,
>
> I have an element
> <a xmlns="urn:ecNamespace">
>    <b>bValue</b>
> </a>.
> I have another element <c> which is created by another OMStaxBuilder. <c> is
> unqualified. Now I need to add <a> to <c> as a child of <c> but I want to
> remove the namespace in <a> and make <a> unqualified.
>
> I tried the AXIOM API to undeclare the default namespace of <a> but failed.
> I can only change the default namespace to another value but not empty
> string, i.e., I cannot undeclare it.
>
>
> Regards,
> Xinjun
>
>
> On 7/23/07, Eran Chinthaka <ch...@opensource.lk> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > What did u mean by undeclare? If you point me what you want with some
> > code, perhaps I can answer better.
> >
> > Thanks,
> > Chinthaka
> >
> > Xinjun Chen wrote:
> > > Hi Axis2 Developers,
> > >
> > > Is it possible to undeclare a default namespace from an OMElement in
> AXIOM?
> > > I tried several ways but failed to undeclare a default namespace. Could
> > > anyone point me a way out?
> > > Thanks.
> > >
> > > Regards,
> > > Xinjun
> > >
> > > ---------- Forwarded message ----------
> > > From: *Xinjun Chen* <xjchen001@gmail.com <ma...@gmail.com>>
> > > Date: Jul 19, 2007 12:54 PM
> > > Subject: [AXIOM] Undeclare default namespace
> > > To: axis-user@ws.apache.org <ma...@ws.apache.org>
> > >
> > >
> > > Hi,
> > >
> > > I have some problem undeclaring the default namespace in an OMElement.
> > > I have tried the following three ways but all failed. The default
> > > namespace is still in the OMElement.
> > >
> > > #1:
> > >         OMElement reqElement = ....;
> > >         reqElement.declareDefaultNamespace ("");
> > >
> > > #2:
> > >         OMElement reqElement = ....;
> > >         reqElement.declareNamespace("", "");
> > >
> > > #3:
> > >         OMElement reqElement = ....;
> > >         OMFactory omFactory = reqElement.getOMFactory();
> > >         OMNamespace ns = omFactory.createOMNamespace("", "");
> > >         reqElement.declareNamespace(ns);
> > >
> > > Could anyone point me out what I can do to undeclare the default
> > > namespace in AXIOM? Thanks for your help in advance.
> > >
> > > Regards,
> > > Xinjun
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.3 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> >
> iD8DBQFGo5JvjON2uBzUhh8RAlM6AJoDKg+9UJTRdIVIDgwMgrtIkcvyZQCgmVss
> > gisWSWkZr/pLyS9lRjOPGjY=
> > =zx5V
> > -----END PGP SIGNATURE-----
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: Fwd: [AXIOM] Undeclare default namespace

Posted by Xinjun Chen <xj...@gmail.com>.
Hi Chinthaka,

I have an element
<a xmlns="urn:ecNamespace">
   <b>bValue</b>
</a>.
I have another element <c> which is created by another OMStaxBuilder. <c> is
unqualified. Now I need to add <a> to <c> as a child of <c> but I want to
remove the namespace in <a> and make <a> unqualified.

I tried the AXIOM API to undeclare the default namespace of <a> but failed.
I can only change the default namespace to another value but not empty
string, i.e., I cannot undeclare it.


Regards,
Xinjun

On 7/23/07, Eran Chinthaka <ch...@opensource.lk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> What did u mean by undeclare? If you point me what you want with some
> code, perhaps I can answer better.
>
> Thanks,
> Chinthaka
>
> Xinjun Chen wrote:
> > Hi Axis2 Developers,
> >
> > Is it possible to undeclare a default namespace from an OMElement in
> AXIOM?
> > I tried several ways but failed to undeclare a default namespace. Could
> > anyone point me a way out?
> > Thanks.
> >
> > Regards,
> > Xinjun
> >
> > ---------- Forwarded message ----------
> > From: *Xinjun Chen* <xjchen001@gmail.com <ma...@gmail.com>>
> > Date: Jul 19, 2007 12:54 PM
> > Subject: [AXIOM] Undeclare default namespace
> > To: axis-user@ws.apache.org <ma...@ws.apache.org>
> >
> >
> > Hi,
> >
> > I have some problem undeclaring the default namespace in an OMElement.
> > I have tried the following three ways but all failed. The default
> > namespace is still in the OMElement.
> >
> > #1:
> >         OMElement reqElement = ....;
> >         reqElement.declareDefaultNamespace("");
> >
> > #2:
> >         OMElement reqElement = ....;
> >         reqElement.declareNamespace("", "");
> >
> > #3:
> >         OMElement reqElement = ....;
> >         OMFactory omFactory = reqElement.getOMFactory();
> >         OMNamespace ns = omFactory.createOMNamespace("", "");
> >         reqElement.declareNamespace(ns);
> >
> > Could anyone point me out what I can do to undeclare the default
> > namespace in AXIOM? Thanks for your help in advance.
> >
> > Regards,
> > Xinjun
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGo5JvjON2uBzUhh8RAlM6AJoDKg+9UJTRdIVIDgwMgrtIkcvyZQCgmVss
> gisWSWkZr/pLyS9lRjOPGjY=
> =zx5V
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>

Re: Fwd: [AXIOM] Undeclare default namespace

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What did u mean by undeclare? If you point me what you want with some
code, perhaps I can answer better.

Thanks,
Chinthaka

Xinjun Chen wrote:
> Hi Axis2 Developers,
>  
> Is it possible to undeclare a default namespace from an OMElement in AXIOM?
> I tried several ways but failed to undeclare a default namespace. Could
> anyone point me a way out?
> Thanks.
>  
> Regards,
> Xinjun
> 
> ---------- Forwarded message ----------
> From: *Xinjun Chen* <xjchen001@gmail.com <ma...@gmail.com>>
> Date: Jul 19, 2007 12:54 PM
> Subject: [AXIOM] Undeclare default namespace
> To: axis-user@ws.apache.org <ma...@ws.apache.org>
> 
>  
> Hi,
>  
> I have some problem undeclaring the default namespace in an OMElement.
> I have tried the following three ways but all failed. The default
> namespace is still in the OMElement.
>  
> #1:
>         OMElement reqElement = ....;
>         reqElement.declareDefaultNamespace("");
>  
> #2: 
>         OMElement reqElement = ....;       
>         reqElement.declareNamespace("", "");
>  
> #3:
>         OMElement reqElement = ....;
>         OMFactory omFactory = reqElement.getOMFactory();
>         OMNamespace ns = omFactory.createOMNamespace("", "");       
>         reqElement.declareNamespace(ns);
>  
> Could anyone point me out what I can do to undeclare the default
> namespace in AXIOM? Thanks for your help in advance.
>  
> Regards,
> Xinjun

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGo5JvjON2uBzUhh8RAlM6AJoDKg+9UJTRdIVIDgwMgrtIkcvyZQCgmVss
gisWSWkZr/pLyS9lRjOPGjY=
=zx5V
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org