A WSDL file from a customer specifies the time data type using this syntax:
I think there is no good solution, so you have to edit the auto generated code.
Create a partial class of the auto generated code and add a string property with the correct formatting in it:
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified,
DataType = "string", ElementName = "I_TIMETO")]
public string I_TIMETO_STR
{
get
{
return this.i_TIMETOField.ToString("HH:mm:ss");
}
set
{
this.i_TIMETOField = DateTime.ParseExact(value, "HH:mm:ss", CultureInfo.InvariantCulture);
}
}
Now go to the auto generated property and add a XmlIgnore:
[System.Xml.Serialization.XmlIgnore]
public System.DateTime I_TIMETO{...