.NET XmlSerializer can serialize xs:documentation elements?

A

atong

Id like to know if .NET XmlSerializer can serialize "xs:documentation"
elements.

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 to see the following serialized WSDL as a result (only
desired
fragment is 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 my C# code to have the desired
result?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top