You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Susantha Kumara <su...@opensource.lk> on 2004/08/11 07:53:00 UTC

XML Schema question

Hi,
 
I found following schema section of a WSDL and doubt that something
wrong with it. Please help me.
 
There is a ComplexType defined as follows,
 
<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction"
type="typens:flowDirectionType"/>  <!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>
<!-- passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>
 
Following 2 elements referring to the complexType StringParameter is OK,
 
<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />
 
But I feel following line is wrong,
 
<xsd:attribute name="parmAttr" type="typens:StringParameter" />
 
Because the complexType StringParameter contains attributes.
 
Your help for me to understand this is verymuch appreciated.
 
Thanks,
 
Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453
 

Re: XML Schema question

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
You're right .. that's a bug in the XSD: Attributes cannot be of
complex types!

Sanjiva.
----- Original Message ----- 
From: Susantha Kumara
To: 'Apache AXIS C Developers List'
Cc: axis-dev@ws.apache.org
Sent: Wednesday, August 11, 2004 11:53 AM
Subject: XML Schema question


Hi,

I found following schema section of a WSDL and doubt that something wrong
with it. Please help me.

There is a ComplexType defined as follows,

<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction" type="typens:flowDirectionType"/>
<!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>  <!-- 
passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>

Following 2 elements referring to the complexType StringParameter is OK,

<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />

But I feel following line is wrong,

<xsd:attribute name="parmAttr" type="typens:StringParameter" />

Because the complexType StringParameter contains attributes.

Your help for me to understand this is verymuch appreciated.

Thanks,

Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453



Re: XML Schema question

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
You're right .. that's a bug in the XSD: Attributes cannot be of
complex types!

Sanjiva.
----- Original Message ----- 
From: Susantha Kumara
To: 'Apache AXIS C Developers List'
Cc: axis-dev@ws.apache.org
Sent: Wednesday, August 11, 2004 11:53 AM
Subject: XML Schema question


Hi,

I found following schema section of a WSDL and doubt that something wrong
with it. Please help me.

There is a ComplexType defined as follows,

<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction" type="typens:flowDirectionType"/>
<!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>  <!-- 
passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>

Following 2 elements referring to the complexType StringParameter is OK,

<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />

But I feel following line is wrong,

<xsd:attribute name="parmAttr" type="typens:StringParameter" />

Because the complexType StringParameter contains attributes.

Your help for me to understand this is verymuch appreciated.

Thanks,

Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453



Re: XML Schema question

Posted by Jochen Wiedmann <jo...@freenet.de>.
Susantha Kumara wrote:

>http://www.w3.org/2001/03/webdata/xsv validates. It does not show any
>problems with the complexType StringParameter.
>  
>

Doesn't matter, an attributes type has to be simple anyways.

Jochen


RE: XML Schema question

Posted by Susantha Kumara <su...@opensource.lk>.
http://www.w3.org/2001/03/webdata/xsv validates. It does not show any
problems with the complexType StringParameter.

Susantha.
---

> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:sanjiva@opensource.lk]
> Sent: Wednesday, August 11, 2004 12:12 PM
> To: axis-dev@ws.apache.org; 'Apache AXIS C Developers List'
> Cc: axis-dev@ws.apache.org
> Subject: Re: XML Schema question
> 
> Wait, I replied saying it was broken but now I'm not sure :).
> What does it mean for a complexType to be defined using
> simpleContent and then for it to have attributes? That
> doesn't seem right.
> 
> Have u tried this with XSV? See:
>     http://www.w3.org/2001/03/webdata/xsv
> 
> Sanjiva.
> 
> ----- Original Message -----
> From: Susantha Kumara
> To: 'Apache AXIS C Developers List'
> Cc: axis-dev@ws.apache.org
> Sent: Wednesday, August 11, 2004 11:53 AM
> Subject: XML Schema question
> 
> 
> Hi,
> 
> I found following schema section of a WSDL and doubt that something
wrong
> with it. Please help me.
> 
> There is a ComplexType defined as follows,
> 
> <xsd:complexType name="StringParameter">
>    <xsd:simpleContent>
>       <xsd:extension base="xsd:string">
>         <xsd:attribute name="numBytes" type="soapenc:int"/>
>         <xsd:attribute name="storageEncoding" type="xsd:string"/>
>         <xsd:attribute name="direction"
type="typens:flowDirectionType"/>
> <!-- in, out, or inOut -->
>         <xsd:attribute name="passMode" type="typens:passModeType"/>
<!--
> passByValue or passByReference -->
>         <xsd:attribute name="description" type="xsd:string"/>
>       </xsd:extension>
>    </xsd:simpleContent>
> </xsd:complexType>
> 
> Following 2 elements referring to the complexType StringParameter is
OK,
> 
> <xsd:element name="parm" type="typens:StringParameter" />
> <xsd:element name="StringParameter" type="typens:StringParameter" />
> 
> But I feel following line is wrong,
> 
> <xsd:attribute name="parmAttr" type="typens:StringParameter" />
> 
> Because the complexType StringParameter contains attributes.
> 
> Your help for me to understand this is verymuch appreciated.
> 
> Thanks,
> 
> Susantha Kumara
> Virtusa (pvt) Ltd.
> Office : +94112714385
> Mobile : +94777420453
> 



Re: XML Schema question

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Wait, I replied saying it was broken but now I'm not sure :).
What does it mean for a complexType to be defined using
simpleContent and then for it to have attributes? That
doesn't seem right.

Have u tried this with XSV? See:
    http://www.w3.org/2001/03/webdata/xsv

Sanjiva.

----- Original Message ----- 
From: Susantha Kumara
To: 'Apache AXIS C Developers List'
Cc: axis-dev@ws.apache.org
Sent: Wednesday, August 11, 2004 11:53 AM
Subject: XML Schema question


Hi,

I found following schema section of a WSDL and doubt that something wrong
with it. Please help me.

There is a ComplexType defined as follows,

<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction" type="typens:flowDirectionType"/>
<!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>  <!-- 
passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>

Following 2 elements referring to the complexType StringParameter is OK,

<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />

But I feel following line is wrong,

<xsd:attribute name="parmAttr" type="typens:StringParameter" />

Because the complexType StringParameter contains attributes.

Your help for me to understand this is verymuch appreciated.

Thanks,

Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453



Re: XML Schema question

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Wait, I replied saying it was broken but now I'm not sure :).
What does it mean for a complexType to be defined using
simpleContent and then for it to have attributes? That
doesn't seem right.

Have u tried this with XSV? See:
    http://www.w3.org/2001/03/webdata/xsv

Sanjiva.

----- Original Message ----- 
From: Susantha Kumara
To: 'Apache AXIS C Developers List'
Cc: axis-dev@ws.apache.org
Sent: Wednesday, August 11, 2004 11:53 AM
Subject: XML Schema question


Hi,

I found following schema section of a WSDL and doubt that something wrong
with it. Please help me.

There is a ComplexType defined as follows,

<xsd:complexType name="StringParameter">
   <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="numBytes" type="soapenc:int"/>
        <xsd:attribute name="storageEncoding" type="xsd:string"/>
        <xsd:attribute name="direction" type="typens:flowDirectionType"/>
<!-- in, out, or inOut -->
        <xsd:attribute name="passMode" type="typens:passModeType"/>  <!-- 
passByValue or passByReference -->
        <xsd:attribute name="description" type="xsd:string"/>
      </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>

Following 2 elements referring to the complexType StringParameter is OK,

<xsd:element name="parm" type="typens:StringParameter" />
<xsd:element name="StringParameter" type="typens:StringParameter" />

But I feel following line is wrong,

<xsd:attribute name="parmAttr" type="typens:StringParameter" />

Because the complexType StringParameter contains attributes.

Your help for me to understand this is verymuch appreciated.

Thanks,

Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453