1: [XmlRoot(ElementName="MetadataSection", Namespace="http://schemas.xmlsoap.org/ws/2004/09/mex")]
2: public class MetadataSection
3: {
4: //其他成员
5: public MetadataSection();
6: public MetadataSection(string dialect, string identifier, object metadata);
7:
8: [XmlAnyAttribute]
9: public Collection<XmlAttribute> Attributes { get; }
10: [XmlAttribute]
11: public string Dialect { get; set; }
12: [XmlAttribute]
13: public string Identifier { get; set; }
14: [XmlElement("Location", typeof(MetadataLocation), Namespace="http://schemas.xmlsoap.org/ws/2004/09/mex")]
15: [XmlElement("MetadataReference", typeof(MetadataReference), Namespace="http://schemas.xmlsoap.org/ws/2004/09/mex")]
16: [XmlElement("Metadata", typeof(MetadataSet), Namespace="http://schemas.xmlsoap.org/ws/2004/09/mex")]
17: [XmlElement("schema", typeof(XmlSchema), Namespace = "http://www.w3.org/2001/XMLSchema")]
18: [XmlElement("definitions", typeof(ServiceDescription), Namespace = "http://schemas.xmlsoap.org/wsdl/")]
19: [XmlAnyElement]
20: public object Metadata { get; set; }
21:
22: //四种预定义元数据方言(Dialect)
23: //MEX:http://schemas.xmlsoap.org/ws/2004/09/mex
24: public static string MetadataExchangeDialect { get; }
25: //WS-Policy:http://schemas.xmlsoap.org/ws/2004/09/policy
26: public static string PolicyDialect { get; }
27: //WSDL:http://schemas.xmlsoap.org/wsdl/
28: public static string ServiceDescriptionDialect { get; }
29: //XML Schema:http://www.w3.org/2001/XMLSchema
30: public static string XmlSchemaDialect { get; }
31: }