Nimble Coder

Adventures in Nimble Coding
posts - 76, comments - 39, trackbacks - 0

web services

There are 1 entries for the tag web services
Automatically setting the Specified property in WSDL Generated files

The wsdl.exe tool with Visual Studio can be used to manually generate a code file to use with a project. If you use the nillable or minOccurs attributes in the XSD though, the wsdl.exe tool generates a boolean 'Specified' field that must be set to true in order to transmit the data through the web service. For example: WSDL File (myfile.wsdl)<xs:element name="duedate" type="xs:dateTime" nillable="1" minOccurs="0" maxOccurs="1" /> Generated CS File (wsdl.exe myfile.wsdl)// ... private System.Nullable<System.DateTime> duedateField; private bool duedateFieldSpecified; // ... /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public System.Nullable<System.DateTime> duedate { get { return this.duedateField; } ...

posted @ Tuesday, April 01, 2008 3:51 PM | Feedback (0) | Filed Under [ C# Tools Programming ]

Powered by: