Hi,
I have created web service, it's practically finished, but I wanted to do some improvements in generated wsdl:
- For string parameters i get element tag such as this in wsdl:
<s:element minOccurs="0" maxOccurs="1" name="xml" type="s:string"/>
1.) For some of those parameters i want to make it mandatory, changing minOccurs to 1:
<s:element minOccurs="1" maxOccurs="1" name="xml" type="s:string"/>
2.) In case of other string parameter I wanted to keep it optional, but set some default value:
<s:element minOccurs="0" maxOccurs="1" default="defaultValue" name="xml" type="s:string"/>
3.) Set max length of string, but from what i've found on this forum it seems it's not possible
- For int parameter i got such tag:
<s:element minOccurs="1" maxOccurs="1" name="size" type="s:int"/>
4.) Here I wanted to do change in opposite way -- make this parameter optional, and additionally set default value:
<s:element minOccurs="0" maxOccurs="1" default=10 name="size" type="s:int"/>
My question is can I do such modifications in web service code (such as it's possible to set e.g. methods, parameters names and types using classes from System.Xml.Serialization), or I have to do those changes in wsdl definition by hand, and use custom wsdl for web service. System.Xml.Serialization namespace is the only thing that I found that enables any wsdl modifications from web service code, but it doesn't seem allow to modify what i need.
I would be grateful for any reply.
Regards,
Lehu