Hi,
I have a brief question regarding the .net framework renders class
definitions of schemas to wsdl descritions.
I have observed the following:
1. I have a schema with a mandatory field (in this example a string) in my
schema.
2. When I convert this to a class (using xsd.exe) all is well. There is
nothing in the code that is created to suggest that the field create is
mandatory or otherwise.
3. When I render run the project and inspect the WSDL the minoccurs is set
to 0 (as opposed to 1)
Question
----------
Why the change from minoccurs 1 (in the schema) to minoccurs 0 (in the
wsdl)? I am guessing that there is nothing in the source created to define
"mandatoriness" of elements (fields) to the .Net framwork decides this itself?
4. If I set the nillable attribute to true on an element that has
minoccurs=0 and execute the same procedure as above the minoccurs now is set
to 1
Question
---------
Why is this. To my knowledge there is no necessary connection between
setting the nillable attribute in a schema and the change in minoccurs
setting. If there is a connection coes this mean that it makes no sense
tohave nillable="true" and minoccurs set to 0?
Any replies greatly appreciated.