1

I have imported in visual studio a web reference for a SOAP web service.

Inside the WSDL there is one field XYZ defined as xs:time.

After importing web reference, I see .NET creates in the file Reference.vb the field XYZ as type Date.

When I initialize the web service I need to pass in the field XYZ just the time value, for example 00:00:00.

Because .NET converted into type Date, it adds automatically other values for the date and the final value is 00:00:00.0000000+01:00.

This value generates an error at the web service receiver.

How can I put just 00:00:00 inside this field OR how can I avoid .NET converting the WSDL field xs:time into Date and convert it to Time as is should be?

Thank you very much!

braX
  • 11,506
  • 5
  • 20
  • 33
Stefano
  • 200
  • 4
  • 15
  • There's no `Time` type in .NET. You could try to use [`TimeSpan`](https://msdn.microsoft.com/en-us/library/system.timespan(v=vs.110).aspx) instead of [`DateTime`](https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx), but I don't sure, that it helps. – Alexander Mar 23 '18 at 17:56
  • Ok, thank you. Then forget about the Time type. How can i pass the value "00:00:00" if .net converted the wsdl type to Date ? – Stefano Mar 23 '18 at 18:02

0 Answers0