wcf - add service reference not generating specified field for optional value type -
i have next in xsd -
<xsd:complextype name="ispermissablerq_type"> <xsd:sequence> <xsd:element name="accnr" type="objectid_type" minoccurs="0" maxoccurs="1"/> <xsd:element name="banknr" type="banknr_type" minoccurs="0" maxoccurs="1"/> </xsd:sequence> </xsd:complextype> <xsd:simpletype name="banknr_type"> <xsd:restriction base="xsd:long"> <xsd:totaldigits value="10"/> </xsd:restriction> </xsd:simpletype>
generated reference -
[system.diagnostics.debuggerstepthroughattribute()] [system.codedom.compiler.generatedcodeattribute("system.servicemodel", "4.0.0.0")] [system.componentmodel.editorbrowsableattribute(system.componentmodel.editorbrowsablestate.advanced)] [system.servicemodel.messagecontractattribute(wrappername="ispermissablerq", wrappernamespace="http://contracts.co.za/transactionmgmnt", iswrapped=true)] public partial class ispermissablerequest { [system.servicemodel.messageheaderattribute(namespace="http://contracts.co.za/infrastructure/2008/09/enterprisecontext")] public services.svc2014.enterprisecontext_type enterprisecontext; [system.servicemodel.messagebodymemberattribute(namespace="http://contracts.co.za/services/2014-12-16/transactionmgmnt", order=0)] public string accnr; [system.servicemodel.messagebodymemberattribute(namespace="http://contracts.co.za/services/2014-12-16/transactionmgmnt", order=1)] public long banknr; public ispermissablerequest() { } public ispermissablerequest(services.svc2014.enterprisecontext_type enterprisecontext, string accnr, long banknr) { this.enterprisecontext = enterprisecontext; this.accnr= accnr; this.banknr = banknr; } }
when add together service reference using vs 2013, expect specified field generated banknr, since minoccurs 0, not happen. ideas? field needs take null.
wcf visual-studio service-reference xsd.exe
No comments:
Post a Comment