You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Kishanthan Thangarajah <ks...@gmail.com> on 2013/01/05 08:24:20 UTC
Xmlschema2 - targetNameSpace being added as the namespaceURI to child
schema elements
Hi Devs,
We are now in the process of moving to xmlschema2 in axis2 [1]. The issue
we note that the targetNameSpace of the parent element in a schema is
getting added as the namespaceURI to the child elements.
For example, consider the following schema.
<xs:schema attributeFormDefault="qualified"
elementFormDefault="unqualified" targetNamespace="
http://fastinfoset.axis2.apache.org">
<xs:element name="addStrings">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="val1"
nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="val2"
nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addStringsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return"
nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
When compiling this, we observed that the namespace QName for the element
"return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI.
But this was not the case when we compared the same schema compilation with
xmlschema1. In there, the namespaceURI was an empty ("") value.
Is this a expected behavior or are we doing something wrong here?
Thanks,
Kishanthan.
[1] https://issues.apache.org/jira/browse/AXIS2-5239
RE: Xmlschema2 - targetNameSpace being added as the namespaceURI to
child schema elements
Posted by Martin Gainty <mg...@hotmail.com>.
http://ws.apache.org/commons/xmlschema20/xmlschema-core/apidocs/org/apache/ws/commons/schema/XmlSchemaElement.html#getWireName() The name of this item as it is sent 'over the wire' or stored in an XML file. If the form is unqualified, this has "" for a namespaceURI. Otherwise, it is the same as getQName(). does parent element (or any element) have uber priority to break the unqualified="true" (to write namespaces in QName)
Martin
______________________________________________ Date: Sat, 5 Jan 2013 21:32:25 -0500
Subject: Re: Xmlschema2 - targetNameSpace being added as the namespaceURI to child schema elements
From: bimargulies@gmail.com
To: dev@ws.apache.org
CC: kshanth2101@gmail.com
Thank you, Dan, you remember the code I wrote better than I do.
On Sat, Jan 5, 2013 at 9:31 PM, Daniel Kulp <dk...@apache.org> wrote:
On Jan 5, 2013, at 2:24 AM, Kishanthan Thangarajah <ks...@gmail.com> wrote:
Hi Devs,We are now in the process of moving to xmlschema2 in axis2 [1]. The issue we note that the targetNameSpace of the parent element in a schema is getting added as the namespaceURI to the child elements.
For example, consider the following schema.
<xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://fastinfoset.axis2.apache.org">
<xs:element name="addStrings"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="val1" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="val2" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType>
</xs:element> <xs:element name="addStringsResponse"> <xs:complexType> <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType>
</xs:element></xs:schema>
When compiling this, we observed that the namespace QName for the element "return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI. But this was not the case when we compared the same schema compilation with xmlschema1. In there, the namespaceURI was an empty ("") value.
Is this a expected behavior or are we doing something wrong here?
There is a getWireName() method on XmlSchemaElement that should be used for determining the properly qualified/unqualified QName that should be used when writing stuff out on the wire.
Dan
Thanks,Kishanthan.[1] https://issues.apache.org/jira/browse/AXIS2-5239
-- Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Xmlschema2 - targetNameSpace being added as the namespaceURI to
child schema elements
Posted by Benson Margulies <bi...@gmail.com>.
Thank you, Dan, you remember the code I wrote better than I do.
On Sat, Jan 5, 2013 at 9:31 PM, Daniel Kulp <dk...@apache.org> wrote:
>
>
>
>
> On Jan 5, 2013, at 2:24 AM, Kishanthan Thangarajah <ks...@gmail.com>
> wrote:
>
> Hi Devs,
> We are now in the process of moving to xmlschema2 in axis2 [1]. The issue
> we note that the targetNameSpace of the parent element in a schema is
> getting added as the namespaceURI to the child elements.
>
> For example, consider the following schema.
>
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="unqualified" targetNamespace="
> http://fastinfoset.axis2.apache.org">
> <xs:element name="addStrings">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="val1"
> nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="val2"
> nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="addStringsResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="return"
> nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> When compiling this, we observed that the namespace QName for the element
> "return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI.
> But this was not the case when we compared the same schema compilation with
> xmlschema1. In there, the namespaceURI was an empty ("") value.
>
> Is this a expected behavior or are we doing something wrong here?
>
>
> There is a getWireName() method on XmlSchemaElement that should be used
> for determining the properly qualified/unqualified QName that should be
> used when writing stuff out on the wire.
>
> Dan
>
>
>
> Thanks,
> Kishanthan.
> [1] https://issues.apache.org/jira/browse/AXIS2-5239
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
Re: Xmlschema2 - targetNameSpace being added as the namespaceURI to
child schema elements
Posted by Kishanthan Thangarajah <ks...@gmail.com>.
On Sun, Jan 6, 2013 at 8:01 AM, Daniel Kulp <dk...@apache.org> wrote:
>
>
>
>
> On Jan 5, 2013, at 2:24 AM, Kishanthan Thangarajah <ks...@gmail.com>
> wrote:
>
> Hi Devs,
> We are now in the process of moving to xmlschema2 in axis2 [1]. The issue
> we note that the targetNameSpace of the parent element in a schema is
> getting added as the namespaceURI to the child elements.
>
> For example, consider the following schema.
>
> <xs:schema attributeFormDefault="qualified"
> elementFormDefault="unqualified" targetNamespace="
> http://fastinfoset.axis2.apache.org">
> <xs:element name="addStrings">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="val1"
> nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="val2"
> nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="addStringsResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="return"
> nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> When compiling this, we observed that the namespace QName for the element
> "return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI.
> But this was not the case when we compared the same schema compilation with
> xmlschema1. In there, the namespaceURI was an empty ("") value.
>
> Is this a expected behavior or are we doing something wrong here?
>
>
> There is a getWireName() method on XmlSchemaElement that should be used
> for determining the properly qualified/unqualified QName that should be
> used when writing stuff out on the wire.
>
Yes, getWireName gives the correct QName. Thanks for the Info.
Kishanthan.
>
> Dan
>
>
>
> Thanks,
> Kishanthan.
> [1] https://issues.apache.org/jira/browse/AXIS2-5239
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
Re: Xmlschema2 - targetNameSpace being added as the namespaceURI to child schema elements
Posted by Daniel Kulp <dk...@apache.org>.
On Jan 5, 2013, at 2:24 AM, Kishanthan Thangarajah <ks...@gmail.com> wrote:
> Hi Devs,
> We are now in the process of moving to xmlschema2 in axis2 [1]. The issue we note that the targetNameSpace of the parent element in a schema is getting added as the namespaceURI to the child elements.
>
> For example, consider the following schema.
>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://fastinfoset.axis2.apache.org">
> <xs:element name="addStrings">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="val1" nillable="true" type="xs:string"/>
> <xs:element minOccurs="0" name="val2" nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="addStringsResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> When compiling this, we observed that the namespace QName for the element "return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI. But this was not the case when we compared the same schema compilation with xmlschema1. In there, the namespaceURI was an empty ("") value.
>
> Is this a expected behavior or are we doing something wrong here?
There is a getWireName() method on XmlSchemaElement that should be used for determining the properly qualified/unqualified QName that should be used when writing stuff out on the wire.
Dan
>
> Thanks,
> Kishanthan.
> [1] https://issues.apache.org/jira/browse/AXIS2-5239
>
>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
RE: Xmlschema2 - targetNameSpace being added as the namespaceURI to
child schema elements
Posted by Martin Gainty <mg...@hotmail.com>.
from my experience (and what i've read) element namespaces are hidden from the Instance when elementForm="unqualified" http://www.xfront.com/HideVersusExpose.html Good Catch,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
From: kshanth2101@gmail.com
Date: Sat, 5 Jan 2013 12:54:20 +0530
Subject: Xmlschema2 - targetNameSpace being added as the namespaceURI to child schema elements
To: dev@ws.apache.org
Hi Devs,We are now in the process of moving to xmlschema2 in axis2 [1]. The issue we note that the targetNameSpace of the parent element in a schema is getting added as the namespaceURI to the child elements.
For example, consider the following schema.
<xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://fastinfoset.axis2.apache.org">
<xs:element name="addStrings"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="val1" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="val2" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType>
</xs:element> <xs:element name="addStringsResponse"> <xs:complexType> <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType>
</xs:element></xs:schema>
When compiling this, we observed that the namespace QName for the element "return", has "http://fastinfoset.axis2.apache.org" as the namespaceURI. But this was not the case when we compared the same schema compilation with xmlschema1. In there, the namespaceURI was an empty ("") value.
Is this a expected behavior or are we doing something wrong here?
Thanks,Kishanthan.[1] https://issues.apache.org/jira/browse/AXIS2-5239