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 Ryo Neyama <ne...@trl.ibm.co.jp> on 2001/10/31 06:15:16 UTC

Axis breaks XML infoset

Hello,

I am struggling with a problem that Axis does not generate well-formed XML
documents.

The program attached illustrates the problem. -- Here, Client.java creates a
DOM element with createElementNS("urn:Test", "foo") and sends it as a
SOAPBodyElement to Server.java.  And then, the Server.java sends the
Document object to the Client.java as it is.

Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of the target
XML document must be kept along the message path. However, it is not in
Axis.

In case of Axis 1.0 alpha-2, the Client.java receives the following XML
document from the Server.java:
    <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>

First of all, this is not an well-formed XML document.
    1. The attributes "xmlns:ns3" occurs twice.
    2. "ns3:ns3:" is not allowed by XML Namespaces.
Even if we resolve these problems, renaming the namespace prefixes is still
not allowed by XML infoset. Specifically, the original XML document is
qualified by the default namespace. On the otherhand, the received XML
document is qualified by the namespace associated with the namespace prefix
"ns3". This is illegal in XML infoset.

This is a serious bug when we are handling a "vanilla" XML documents because
we are sensitive in how the XML documents are represented literally.

I hope I have any comments.

Best regards,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp


Re: Axis breaks XML infoset

Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
Hello,

The current CVS version of Axis breaks XML infoset by calling
context.setPretty(true).
Specifically, see the
xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java:297.
------------
    /** Should make SOAPSerializationException?
     */
    public void outputImpl(SerializationContext context)
        throws Exception
    {
        boolean oldPretty = context.getPretty();
        context.setPretty(true);

------------

setPretty is called for pretty printing. But this is illegal from the
XML-infoset's point of view.
Can we remove this code?
If there is no objection, I will remove it.

Best regards,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp

----- Original Message -----
From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
To: <ax...@xml.apache.org>
Sent: Friday, November 02, 2001 4:22 PM
Subject: Re: Axis breaks XML infoset


> Glen,
>
> The solution you suggested worked fine.
> Thank you.
>
>     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
>     Internet Technology
>     neyama@trl.ibm.co.jp
>
> ----- Original Message -----
> From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> To: <ax...@xml.apache.org>
> Sent: Friday, November 02, 2001 10:43 AM
> Subject: Re: Axis breaks XML infoset
>
>
> > Glen,
> >
> > Thank you very much for the suggestion.
> > I will try it.
> >
> > Best regards,
> >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> >     Internet Technology
> >     neyama@trl.ibm.co.jp
> >
> > ----- Original Message -----
> > From: "Glen Daniels" <gd...@macromedia.com>
> > To: <ax...@xml.apache.org>
> > Sent: Friday, November 02, 2001 4:07 AM
> > Subject: Re: Axis breaks XML infoset
> >
> >
> > >
> > > Hi, Ryo!
> > >
> > > I'm not sure, but isn't defining a document with:
> > >
> > > createElementNS("urn:Test", "foo")
> > >
> > > and then not putting in any namespace prefix mapping information kind
of
> > bad
> > > form?  If you take the resultant element and add an attribute to it
> > thusly:
> > >
> > > element.setAttributeNS(Constants.NS_URI_XMLNS, "xmlns:prefix",
> > "urn:Test");
> > >
> > > You should then see
> > >
> > > <prefix:foo xmlns:prefix="urn:Test"/>
> > >
> > > on both the request and the response.
> > >
> > > --Glen
> > >
> > > ----- Original Message -----
> > > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > > To: <ax...@xml.apache.org>
> > > Sent: Wednesday, October 31, 2001 9:31 PM
> > > Subject: Re: Axis breaks XML infoset
> > >
> > >
> > > > Hello Glen,
> > > >
> > > > I tried a recent nightly build.
> > > > The Client.java received the following response:
> > > >     <ns3:foo xmlns:ns3="urn:Test"/>
> > > > Thank you very much for the information.
> > > >
> > > > However, the problem has not been solved completely yet because
<foo>
> is
> > > > renamed to <ns3:foo>. A namespace prefix is a part of XML infoset.
> > > >     http://www.w3.org/TR/xml-infoset/#infoitem.element
> > > >
> > > > Do you have any suggestion on this?
> > > >
> > > > Best regards,
> > > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > > >     Internet Technology
> > > >     neyama@trl.ibm.co.jp
> > > >
> > > > ----- Original Message -----
> > > > From: "Glen Daniels" <gd...@macromedia.com>
> > > > To: <ax...@xml.apache.org>
> > > > Sent: Wednesday, October 31, 2001 9:42 PM
> > > > Subject: Re: Axis breaks XML infoset
> > > >
> > > >
> > > > > Hi Ryo!
> > > > >
> > > > > Are you using a recent nightly build?  I believe these issues may
> have
> > > > been
> > > > > resolved.
> > > > >
> > > > > --Glen
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > > > > To: <ax...@xml.apache.org>
> > > > > Sent: Wednesday, October 31, 2001 12:15 AM
> > > > > Subject: Axis breaks XML infoset
> > > > >
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I am struggling with a problem that Axis does not generate
> > well-formed
> > > > XML
> > > > > > documents.
> > > > > >
> > > > > > The program attached illustrates the problem. -- Here,
Client.java
> > > > creates
> > > > > a
> > > > > > DOM element with createElementNS("urn:Test", "foo") and sends it
> as
> > a
> > > > > > SOAPBodyElement to Server.java.  And then, the Server.java sends
> the
> > > > > > Document object to the Client.java as it is.
> > > > > >
> > > > > > Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/)
of
> > the
> > > > > target
> > > > > > XML document must be kept along the message path. However, it is
> not
> > > in
> > > > > > Axis.
> > > > > >
> > > > > > In case of Axis 1.0 alpha-2, the Client.java receives the
> following
> > > XML
> > > > > > document from the Server.java:
> > > > > >     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
> > > > > >
> > > > > > First of all, this is not an well-formed XML document.
> > > > > >     1. The attributes "xmlns:ns3" occurs twice.
> > > > > >     2. "ns3:ns3:" is not allowed by XML Namespaces.
> > > > > > Even if we resolve these problems, renaming the namespace
prefixes
> > is
> > > > > still
> > > > > > not allowed by XML infoset. Specifically, the original XML
> document
> > is
> > > > > > qualified by the default namespace. On the otherhand, the
received
> > XML
> > > > > > document is qualified by the namespace associated with the
> namespace
> > > > > prefix
> > > > > > "ns3". This is illegal in XML infoset.
> > > > > >
> > > > > > This is a serious bug when we are handling a "vanilla" XML
> documents
> > > > > because
> > > > > > we are sensitive in how the XML documents are represented
> literally.
> > > > > >
> > > > > > I hope I have any comments.
> > > > > >
> > > > > > Best regards,
> > > > > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > > > > >     Internet Technology
> > > > > >     neyama@trl.ibm.co.jp
>
>
>


Re: Axis breaks XML infoset

Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
Glen,

The solution you suggested worked fine.
Thank you.

    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp

----- Original Message -----
From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
To: <ax...@xml.apache.org>
Sent: Friday, November 02, 2001 10:43 AM
Subject: Re: Axis breaks XML infoset


> Glen,
>
> Thank you very much for the suggestion.
> I will try it.
>
> Best regards,
>     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
>     Internet Technology
>     neyama@trl.ibm.co.jp
>
> ----- Original Message -----
> From: "Glen Daniels" <gd...@macromedia.com>
> To: <ax...@xml.apache.org>
> Sent: Friday, November 02, 2001 4:07 AM
> Subject: Re: Axis breaks XML infoset
>
>
> >
> > Hi, Ryo!
> >
> > I'm not sure, but isn't defining a document with:
> >
> > createElementNS("urn:Test", "foo")
> >
> > and then not putting in any namespace prefix mapping information kind of
> bad
> > form?  If you take the resultant element and add an attribute to it
> thusly:
> >
> > element.setAttributeNS(Constants.NS_URI_XMLNS, "xmlns:prefix",
> "urn:Test");
> >
> > You should then see
> >
> > <prefix:foo xmlns:prefix="urn:Test"/>
> >
> > on both the request and the response.
> >
> > --Glen
> >
> > ----- Original Message -----
> > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > To: <ax...@xml.apache.org>
> > Sent: Wednesday, October 31, 2001 9:31 PM
> > Subject: Re: Axis breaks XML infoset
> >
> >
> > > Hello Glen,
> > >
> > > I tried a recent nightly build.
> > > The Client.java received the following response:
> > >     <ns3:foo xmlns:ns3="urn:Test"/>
> > > Thank you very much for the information.
> > >
> > > However, the problem has not been solved completely yet because <foo>
is
> > > renamed to <ns3:foo>. A namespace prefix is a part of XML infoset.
> > >     http://www.w3.org/TR/xml-infoset/#infoitem.element
> > >
> > > Do you have any suggestion on this?
> > >
> > > Best regards,
> > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > >     Internet Technology
> > >     neyama@trl.ibm.co.jp
> > >
> > > ----- Original Message -----
> > > From: "Glen Daniels" <gd...@macromedia.com>
> > > To: <ax...@xml.apache.org>
> > > Sent: Wednesday, October 31, 2001 9:42 PM
> > > Subject: Re: Axis breaks XML infoset
> > >
> > >
> > > > Hi Ryo!
> > > >
> > > > Are you using a recent nightly build?  I believe these issues may
have
> > > been
> > > > resolved.
> > > >
> > > > --Glen
> > > >
> > > > ----- Original Message -----
> > > > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > > > To: <ax...@xml.apache.org>
> > > > Sent: Wednesday, October 31, 2001 12:15 AM
> > > > Subject: Axis breaks XML infoset
> > > >
> > > >
> > > > > Hello,
> > > > >
> > > > > I am struggling with a problem that Axis does not generate
> well-formed
> > > XML
> > > > > documents.
> > > > >
> > > > > The program attached illustrates the problem. -- Here, Client.java
> > > creates
> > > > a
> > > > > DOM element with createElementNS("urn:Test", "foo") and sends it
as
> a
> > > > > SOAPBodyElement to Server.java.  And then, the Server.java sends
the
> > > > > Document object to the Client.java as it is.
> > > > >
> > > > > Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of
> the
> > > > target
> > > > > XML document must be kept along the message path. However, it is
not
> > in
> > > > > Axis.
> > > > >
> > > > > In case of Axis 1.0 alpha-2, the Client.java receives the
following
> > XML
> > > > > document from the Server.java:
> > > > >     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
> > > > >
> > > > > First of all, this is not an well-formed XML document.
> > > > >     1. The attributes "xmlns:ns3" occurs twice.
> > > > >     2. "ns3:ns3:" is not allowed by XML Namespaces.
> > > > > Even if we resolve these problems, renaming the namespace prefixes
> is
> > > > still
> > > > > not allowed by XML infoset. Specifically, the original XML
document
> is
> > > > > qualified by the default namespace. On the otherhand, the received
> XML
> > > > > document is qualified by the namespace associated with the
namespace
> > > > prefix
> > > > > "ns3". This is illegal in XML infoset.
> > > > >
> > > > > This is a serious bug when we are handling a "vanilla" XML
documents
> > > > because
> > > > > we are sensitive in how the XML documents are represented
literally.
> > > > >
> > > > > I hope I have any comments.
> > > > >
> > > > > Best regards,
> > > > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > > > >     Internet Technology
> > > > >     neyama@trl.ibm.co.jp



Re: Axis breaks XML infoset

Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
Glen,

Thank you very much for the suggestion.
I will try it.

Best regards,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp

----- Original Message -----
From: "Glen Daniels" <gd...@macromedia.com>
To: <ax...@xml.apache.org>
Sent: Friday, November 02, 2001 4:07 AM
Subject: Re: Axis breaks XML infoset


>
> Hi, Ryo!
>
> I'm not sure, but isn't defining a document with:
>
> createElementNS("urn:Test", "foo")
>
> and then not putting in any namespace prefix mapping information kind of
bad
> form?  If you take the resultant element and add an attribute to it
thusly:
>
> element.setAttributeNS(Constants.NS_URI_XMLNS, "xmlns:prefix",
"urn:Test");
>
> You should then see
>
> <prefix:foo xmlns:prefix="urn:Test"/>
>
> on both the request and the response.
>
> --Glen
>
> ----- Original Message -----
> From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> To: <ax...@xml.apache.org>
> Sent: Wednesday, October 31, 2001 9:31 PM
> Subject: Re: Axis breaks XML infoset
>
>
> > Hello Glen,
> >
> > I tried a recent nightly build.
> > The Client.java received the following response:
> >     <ns3:foo xmlns:ns3="urn:Test"/>
> > Thank you very much for the information.
> >
> > However, the problem has not been solved completely yet because <foo> is
> > renamed to <ns3:foo>. A namespace prefix is a part of XML infoset.
> >     http://www.w3.org/TR/xml-infoset/#infoitem.element
> >
> > Do you have any suggestion on this?
> >
> > Best regards,
> >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> >     Internet Technology
> >     neyama@trl.ibm.co.jp
> >
> > ----- Original Message -----
> > From: "Glen Daniels" <gd...@macromedia.com>
> > To: <ax...@xml.apache.org>
> > Sent: Wednesday, October 31, 2001 9:42 PM
> > Subject: Re: Axis breaks XML infoset
> >
> >
> > > Hi Ryo!
> > >
> > > Are you using a recent nightly build?  I believe these issues may have
> > been
> > > resolved.
> > >
> > > --Glen
> > >
> > > ----- Original Message -----
> > > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > > To: <ax...@xml.apache.org>
> > > Sent: Wednesday, October 31, 2001 12:15 AM
> > > Subject: Axis breaks XML infoset
> > >
> > >
> > > > Hello,
> > > >
> > > > I am struggling with a problem that Axis does not generate
well-formed
> > XML
> > > > documents.
> > > >
> > > > The program attached illustrates the problem. -- Here, Client.java
> > creates
> > > a
> > > > DOM element with createElementNS("urn:Test", "foo") and sends it as
a
> > > > SOAPBodyElement to Server.java.  And then, the Server.java sends the
> > > > Document object to the Client.java as it is.
> > > >
> > > > Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of
the
> > > target
> > > > XML document must be kept along the message path. However, it is not
> in
> > > > Axis.
> > > >
> > > > In case of Axis 1.0 alpha-2, the Client.java receives the following
> XML
> > > > document from the Server.java:
> > > >     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
> > > >
> > > > First of all, this is not an well-formed XML document.
> > > >     1. The attributes "xmlns:ns3" occurs twice.
> > > >     2. "ns3:ns3:" is not allowed by XML Namespaces.
> > > > Even if we resolve these problems, renaming the namespace prefixes
is
> > > still
> > > > not allowed by XML infoset. Specifically, the original XML document
is
> > > > qualified by the default namespace. On the otherhand, the received
XML
> > > > document is qualified by the namespace associated with the namespace
> > > prefix
> > > > "ns3". This is illegal in XML infoset.
> > > >
> > > > This is a serious bug when we are handling a "vanilla" XML documents
> > > because
> > > > we are sensitive in how the XML documents are represented literally.
> > > >
> > > > I hope I have any comments.
> > > >
> > > > Best regards,
> > > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > > >     Internet Technology
> > > >     neyama@trl.ibm.co.jp
> > > >
> > > >
> > > >
> > >
> > >
> >
>
>


Re: Axis breaks XML infoset

Posted by Glen Daniels <gd...@macromedia.com>.
Hi, Ryo!

I'm not sure, but isn't defining a document with:

createElementNS("urn:Test", "foo")

and then not putting in any namespace prefix mapping information kind of bad
form?  If you take the resultant element and add an attribute to it thusly:

element.setAttributeNS(Constants.NS_URI_XMLNS, "xmlns:prefix", "urn:Test");

You should then see

<prefix:foo xmlns:prefix="urn:Test"/>

on both the request and the response.

--Glen

----- Original Message -----
From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
To: <ax...@xml.apache.org>
Sent: Wednesday, October 31, 2001 9:31 PM
Subject: Re: Axis breaks XML infoset


> Hello Glen,
>
> I tried a recent nightly build.
> The Client.java received the following response:
>     <ns3:foo xmlns:ns3="urn:Test"/>
> Thank you very much for the information.
>
> However, the problem has not been solved completely yet because <foo> is
> renamed to <ns3:foo>. A namespace prefix is a part of XML infoset.
>     http://www.w3.org/TR/xml-infoset/#infoitem.element
>
> Do you have any suggestion on this?
>
> Best regards,
>     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
>     Internet Technology
>     neyama@trl.ibm.co.jp
>
> ----- Original Message -----
> From: "Glen Daniels" <gd...@macromedia.com>
> To: <ax...@xml.apache.org>
> Sent: Wednesday, October 31, 2001 9:42 PM
> Subject: Re: Axis breaks XML infoset
>
>
> > Hi Ryo!
> >
> > Are you using a recent nightly build?  I believe these issues may have
> been
> > resolved.
> >
> > --Glen
> >
> > ----- Original Message -----
> > From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> > To: <ax...@xml.apache.org>
> > Sent: Wednesday, October 31, 2001 12:15 AM
> > Subject: Axis breaks XML infoset
> >
> >
> > > Hello,
> > >
> > > I am struggling with a problem that Axis does not generate well-formed
> XML
> > > documents.
> > >
> > > The program attached illustrates the problem. -- Here, Client.java
> creates
> > a
> > > DOM element with createElementNS("urn:Test", "foo") and sends it as a
> > > SOAPBodyElement to Server.java.  And then, the Server.java sends the
> > > Document object to the Client.java as it is.
> > >
> > > Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of the
> > target
> > > XML document must be kept along the message path. However, it is not
in
> > > Axis.
> > >
> > > In case of Axis 1.0 alpha-2, the Client.java receives the following
XML
> > > document from the Server.java:
> > >     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
> > >
> > > First of all, this is not an well-formed XML document.
> > >     1. The attributes "xmlns:ns3" occurs twice.
> > >     2. "ns3:ns3:" is not allowed by XML Namespaces.
> > > Even if we resolve these problems, renaming the namespace prefixes is
> > still
> > > not allowed by XML infoset. Specifically, the original XML document is
> > > qualified by the default namespace. On the otherhand, the received XML
> > > document is qualified by the namespace associated with the namespace
> > prefix
> > > "ns3". This is illegal in XML infoset.
> > >
> > > This is a serious bug when we are handling a "vanilla" XML documents
> > because
> > > we are sensitive in how the XML documents are represented literally.
> > >
> > > I hope I have any comments.
> > >
> > > Best regards,
> > >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> > >     Internet Technology
> > >     neyama@trl.ibm.co.jp
> > >
> > >
> > >
> >
> >
>


Re: Axis breaks XML infoset

Posted by Ryo Neyama <ne...@trl.ibm.co.jp>.
Hello Glen,

I tried a recent nightly build.
The Client.java received the following response:
    <ns3:foo xmlns:ns3="urn:Test"/>
Thank you very much for the information.

However, the problem has not been solved completely yet because <foo> is
renamed to <ns3:foo>. A namespace prefix is a part of XML infoset.
    http://www.w3.org/TR/xml-infoset/#infoitem.element

Do you have any suggestion on this?

Best regards,
    Ryo Neyama @ IBM Research, Tokyo Research Laboratory
    Internet Technology
    neyama@trl.ibm.co.jp

----- Original Message -----
From: "Glen Daniels" <gd...@macromedia.com>
To: <ax...@xml.apache.org>
Sent: Wednesday, October 31, 2001 9:42 PM
Subject: Re: Axis breaks XML infoset


> Hi Ryo!
>
> Are you using a recent nightly build?  I believe these issues may have
been
> resolved.
>
> --Glen
>
> ----- Original Message -----
> From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
> To: <ax...@xml.apache.org>
> Sent: Wednesday, October 31, 2001 12:15 AM
> Subject: Axis breaks XML infoset
>
>
> > Hello,
> >
> > I am struggling with a problem that Axis does not generate well-formed
XML
> > documents.
> >
> > The program attached illustrates the problem. -- Here, Client.java
creates
> a
> > DOM element with createElementNS("urn:Test", "foo") and sends it as a
> > SOAPBodyElement to Server.java.  And then, the Server.java sends the
> > Document object to the Client.java as it is.
> >
> > Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of the
> target
> > XML document must be kept along the message path. However, it is not in
> > Axis.
> >
> > In case of Axis 1.0 alpha-2, the Client.java receives the following XML
> > document from the Server.java:
> >     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
> >
> > First of all, this is not an well-formed XML document.
> >     1. The attributes "xmlns:ns3" occurs twice.
> >     2. "ns3:ns3:" is not allowed by XML Namespaces.
> > Even if we resolve these problems, renaming the namespace prefixes is
> still
> > not allowed by XML infoset. Specifically, the original XML document is
> > qualified by the default namespace. On the otherhand, the received XML
> > document is qualified by the namespace associated with the namespace
> prefix
> > "ns3". This is illegal in XML infoset.
> >
> > This is a serious bug when we are handling a "vanilla" XML documents
> because
> > we are sensitive in how the XML documents are represented literally.
> >
> > I hope I have any comments.
> >
> > Best regards,
> >     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
> >     Internet Technology
> >     neyama@trl.ibm.co.jp
> >
> >
> >
>
>


Re: Axis breaks XML infoset

Posted by Glen Daniels <gd...@macromedia.com>.
Hi Ryo!

Are you using a recent nightly build?  I believe these issues may have been
resolved.

--Glen

----- Original Message -----
From: "Ryo Neyama" <ne...@trl.ibm.co.jp>
To: <ax...@xml.apache.org>
Sent: Wednesday, October 31, 2001 12:15 AM
Subject: Axis breaks XML infoset


> Hello,
>
> I am struggling with a problem that Axis does not generate well-formed XML
> documents.
>
> The program attached illustrates the problem. -- Here, Client.java creates
a
> DOM element with createElementNS("urn:Test", "foo") and sends it as a
> SOAPBodyElement to Server.java.  And then, the Server.java sends the
> Document object to the Client.java as it is.
>
> Theoretically, XML infoset (http://www.w3.org/TR/xml-infoset/) of the
target
> XML document must be kept along the message path. However, it is not in
> Axis.
>
> In case of Axis 1.0 alpha-2, the Client.java receives the following XML
> document from the Server.java:
>     <ns3:ns3:foo xmlns:ns3="urn:Test" xmlns:ns3="urn:Test"/>
>
> First of all, this is not an well-formed XML document.
>     1. The attributes "xmlns:ns3" occurs twice.
>     2. "ns3:ns3:" is not allowed by XML Namespaces.
> Even if we resolve these problems, renaming the namespace prefixes is
still
> not allowed by XML infoset. Specifically, the original XML document is
> qualified by the default namespace. On the otherhand, the received XML
> document is qualified by the namespace associated with the namespace
prefix
> "ns3". This is illegal in XML infoset.
>
> This is a serious bug when we are handling a "vanilla" XML documents
because
> we are sensitive in how the XML documents are represented literally.
>
> I hope I have any comments.
>
> Best regards,
>     Ryo Neyama @ IBM Research, Tokyo Research Laboratory
>     Internet Technology
>     neyama@trl.ibm.co.jp
>
>
>