I'm connecting to a java web service that defines the following complex type
in the wsdl
<xs:complexType name="employee">
<xs:sequence>
<xs:element minOccurs="0" name="firstName" type="xs:string" />
<xs:element minOccurs="0" name="hireDate" type="xs:date" />
<xs:element minOccurs="0" name="lastName" type="xs:string" />
<xs:element minOccurs="0" name="terminationDate" type="xs:date" />
</xs:sequence>
</xs:complexType>
When the type is marshalled to my VS2005 generated proxy the java web
service will omit the terminationDate in the soap message. The proxy then
throws the "string not recognized as valid datetime" error. The proxy code
for the field is copied below. How can I get the proxy to marshal this
type? Shouldn't it set the terminationDateField to 0 and set
terminationDateSpecified=false?
[System.Xml.Serialization.XmlElementAttribute(Form= System.Xml.Schema.XmlSchemaForm.Unqualified,
DataType="date")]
public System.DateTime terminationDate {
get {return this.terminationDateField;}
set {this.terminationDateField = value;}
}
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool terminationDateSpecified {
get {
return this.terminationDateFieldSpecified;
}
set {
this.terminationDateFieldSpecified = value;
}
}