ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: Xmlschema2 - targetNameSpace being added as the namespaceURI to child schema elements
Date Sun, 06 Jan 2013 03:05:03 GMT
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)

______________________________________________ Date: Sat, 5 Jan 2013 21:32:25 -0500
Subject: Re: Xmlschema2 - targetNameSpace being added as the namespaceURI to child schema

Thank you, Dan, you remember the code I wrote better than I do.

On Sat, Jan 5, 2013 at 9:31 PM, Daniel Kulp <> wrote:

On Jan 5, 2013, at 2:24 AM, Kishanthan Thangarajah <> 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="">

            <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>

When compiling this, we observed that the namespace QName for the element "return", has ""
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.



-- Daniel Kulp -
Talend Community Coder -

View raw message