• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Schema and WSDL

 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got small doubt ,i have one element in XML schema file,which is as follows:-

IN XML SCHEMA
*********************************************************
<xsd:complexType name="Xyz_T">
<xsd:sequence>
<xsd:element ref="xt:name"/>
<xsd:element ref="xt escription"/>
</xsd:sequence>
</xsd:complexType>

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

But when i deploy the code as web service in WSAD,I get the WSDL with following under types:-

IN WSDL
**********************************************************
<complexType name="Xyz_T">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="description" nillable="true" type="xsd:string"/>
</sequence>
</complexType>

Here as per WSDL,my element become nullable(as nillable="true").so i just wanted to why there is a difference,this means any client who will look at the WSDL file only will assume that name and description elements can be nullable/empty but actually they are mandatory in schema.

Let me know if you need any information.

[Ajith edited this post to disable smilies so that the xml tags appear normally ]
[ May 11, 2005: Message edited by: Ajith Kallambella ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you provide the definition of the name and description elements ? Also which namespace does the xt prefix refer to ?
[ May 10, 2005: Message edited by: Valentin Crettaz ]
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Information you asked is as follows:-

xmlns:xt="http://xmlns.personaldev.com/systems/dev/2005/05/types"

<xsd:element name="description" type="xt escription_T"/>
<xsd:element name="name" type="xt:Name_T"/>

********************************************************************
<xsd:simpleType name="Description_T">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="40"/>
</xsd:restriction>
</xsd:simpleType>
*****************************************************************
<xsd:simpleType name="Name_T">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
******************************************************************

Let me know if you need any other information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic