Monday, January 27, 2014

WSDL nillable=true and minOccurs=1

In WSDL to mention the value of the element can be empty by using nillable=true.

XSD:
 <xs:element name="Gender" nillable="true" type="xs:string"/>

XML Data:
<Gender></Gender>

Above xml data is valid. Because gender value is empty which satisfies following conditions
1.  nillable=true
2. Default value of minOccurs=1, hence <Gender> element is accepted here.

No comments:

Post a Comment