By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,838 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,838 IT Pros & Developers. It's quick & easy.

WSDL Minoccurs changes when nil="true" is set.

P: n/a
Hi,
can someone tell me why the following scneario occurs. With the nillable
attribute set to true on an element that has min occurs set to zero, I
generate a class. As expected this adds the IsNullable=true attribute

<xs:element name="SSN" type="xs:string" minOccurs="0" nillable="true"/>

/// <remarks/>

[System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSche
maForm.Unqualified, IsNullable=true)]

public string SSN;

When I view the WSDL for the service I see the minoccurs is not 1

<s:element minOccurs="1" maxOccurs="1" form="unqualified" name="SSN"
nillable="true" type="s:string" />

My questions are:

1. Why does the minoccurs value change?

2. If I use a SOAPExtension to validate XML returned from a method call
using the WSDL (which can be done), will it fail if there arew no SSN
details provided?

Any help greatly appreciated.


Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.