Home All Groups Group Topic Archive Search About

How to Serialize XS:DOCUMENTATION

Author
19 Nov 2007 2:30 PM
rt.64
Id like to know if .NET XmlSerializer can to serialize comments to
"xs:documentation".

For example, consider the following code fragment written in C#:

public class class1 : WebService
{

    public struct SampleStructure
    {
        [XmlElement("NAME1")]  public  string S1;
        [XmlElement("NAME2")]  public string S2;
    }

    [WebMethod]
    public Dataset SampleMethod
    (
        [XmlElement("NAME3")]  SampleStructure     request
    )
    {
           .....
    }

.....
}

I would like that the following serialized WSDL (only desired
fragnment shown):

......
<s:complexType name="NAME3">
   <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="NAME1"
type="s:string" >
            <s:annotation>
                   <xs:documentation>Commentes Here</xs:documentation>
            </s:annotation>
       </s:element>
      <s:element minOccurs="0" maxOccurs="1" name="NAME2"
type="s:string" />
   </s:sequence>
</s:complexType>
......


So, is there anything I could place on the C# code to have the
xs:documentation serialized?

AddThis Social Bookmark Button