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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -