G
Glenn
I am writing a Web Service in C# ASP.NET 2.0 that takes two optional
parameters. One is an int and the other is a string. Below is the
definition of the Web Method:
[WebMethod]
public List<ModelFamily> ModelFamilySearch(Nullable<int> id, string name)
{
MyBusinessObject mbo = new MyBusinessObject();
return mbo.Search(id, name);
}
However, the WSDL indicates that the minOccurs="1" for the "id"
parameter. Below is a fragment of the WSDL:
<s:element name="ModelFamilySearch">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="id" nillable="true"
type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="name"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
Is there anyway to force the minOccurs="0" in the WSDL?
Thanks,
Glenn
parameters. One is an int and the other is a string. Below is the
definition of the Web Method:
[WebMethod]
public List<ModelFamily> ModelFamilySearch(Nullable<int> id, string name)
{
MyBusinessObject mbo = new MyBusinessObject();
return mbo.Search(id, name);
}
However, the WSDL indicates that the minOccurs="1" for the "id"
parameter. Below is a fragment of the WSDL:
<s:element name="ModelFamilySearch">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="id" nillable="true"
type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="name"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
Is there anyway to force the minOccurs="0" in the WSDL?
Thanks,
Glenn