Consider the following C# webservice code and the corresponding WSDL
generated by .NET:
C# Webservice (Fragment)
================
...
public struct SSS
{
[XmlElement("AAA")] public decimal aaa ;
[XmlElement("BBB")] public string bbb ;
}
....
public int (SSS args) {
WSDL (Fragment)
==============
...
<s:complexType name="SSS">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AAA"
type="s:decimal" />
<s:element minOccurs="0" maxOccurs="1" name="BBB"
type="s:string" />
</s:sequence>
</s:complexType>
...
My problem is: I don't understand why the element AAA is marked as
mandatory while BBB is left as optional on the WSDL description. And
worst,
I don't understand why, despite this, a SOAP request without any AAA
element is
considered Ok by the webservice - I thought the absence of an AAA
element on
the SOAP request would trigger an error.