Problem using Datetime in SOAP WebService

Problem using Datetime in SOAP WebService


Hello Community,

I need to invoke a webservice, and I have to pass a datetime in an input, but what happens is that the format is not what de webservice is expecting

• The date we are sending is this "2016-10-21T00: 00: 00.0000000 + 01: 00", not returning anything
• A date sent by .net console is this "2016-10-21T00: 00: 00", being returned records
• The date that is so expected to receive, being equal to SOAPUI is this "2016-10-21T14: 08: 46.180Z"

In invoking the method we are sending a date and time is converted into the XML for the 1st example.
How can I handle it?

Best Regards,

Ivan Barroso

Hello Ivan

Let me see if I understood your question. 

The way the platform is sending the date is the 1st example ("2016-10-21T00: 00: 00.0000000 + 01: 00") while the format expected by the service is the 3rd example ("2016-10-21T14: 08: 46.180Z"). 

Is that it?

Hello João,

Yes, that´s it.

But if i could send it like the 2nd example also works, because i have it in a .Net console, and works fine.

Thank you,


Can you change the type of the field in the wsdl to string and convert the dates manually?

Hi João,

No it´s no possible, this WS is external, so we can not change it.

I force the time to 23h and it works, but I´m not confortable with it.

Hello Ivan

Can you test if the webservice accepts the following dates:

  • 2016-10-21T00:00:00.0000000Z
  • 2016-10-21T00:00:00+01:00

Hello João,

I don´t have way to test it.

I think the problem stays in null time, because the WS is expecting a datetime, but we are passing a datetime only with date, because de time is 00:00.

Thank you ver much for your help.

Best Regards



You say you have no way to test it, but surely you can use SoapUI? And are you consuming the WS in Service Studio? If so, then surely you can change the field to text?