Class generation is controlled by the XSD web service schema.
To create fields with a null value. The field should be marked as nillable .
<xs:element minOccurs="0" maxOccurs="1" name="created" type="xs:dateTime" nillable="true" />
XML will look as follows.
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <created xsi:nil="true" /> </root>
I believe that this field in your schema looks like this:
<xs:element minOccurs="0" maxOccurs="1" name="created" />
and it would completely drop the element if createdFieldSpecified = false :
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </root>
On the bottom line: the web service schema needs to be updated to generate fields with a null value using svcutil .
source share