c# - WCF DataContract DataMember as simpleType in XSD? -
using wcf , datacontract serializer, how can represent data member reflect simpletype when viewing xsd. example:
[datacontract(namespace="http://mydomain.xyz/example")] public class mytype { [datamember(isrequired=true)] public somebasicdatatype basicattribute { get; set; } [datamember(isrequired=true)] public somecomplextype complexelement { get; set; } }
basically, want somebasicdatatype <xs:simpletype name="somebasicdatatype ">
in the accompanying xsd instead of <xs:complextype name="somebasicdatatype">
xsd not allow simple types contain either elements or attributes defined elsewhere in schema.
simple types created deriving them existing simple types (built-in data types , other derived simple types)
simple types derived restriction, can derived list or union.
Comments
Post a Comment