cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid date value in SOAP Response

SOLVED
Occasional Contributor

Invalid date value in SOAP Response

Hi,

 

I've got difficulties to use properties in a soap response. 

When using this syntax:

<ns:currentTime>2019-01-29T14:45:32.345Z</ns:currentTime>, no problems the syntax is Valid regarding the wdsl file given to SoapUI.

 

I try to replace the fixed string 2019-01-29T14:45:32.345Z by a project property defined as:

Name = dateTime and Value = 2019-01-29T14:45:32.345Z

 

And use it like this

<ns:currentTime>${Project#dateTime}</ns:currentTime>

 

The result is Invalid date value: ${Project#dateTime}

 

ns:currentTime is an xml s:dateTime

 

Where do I make a mistake ? Thanks.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Invalid date value in SOAP Response

Trivial error.
Use - ${#Project#dateTime}


Regards,
Rao.

View solution in original post

12 REPLIES 12
Community Hero

Re: Invalid date value in SOAP Response

Trivial error.
Use - ${#Project#dateTime}


Regards,
Rao.

View solution in original post

Highlighted
Occasional Contributor

Re: Invalid date value in SOAP Response

 

Unfortunately it doesn't work either. Invalid date value: ${#Project#dateTime}

 

<ns:bootNotificationResponse>
<ns:status>Rejected</ns:status>
<ns:currentTime>${#Project#dateTime}</ns:currentTime>
<ns:heartbeatInterval>60</ns:heartbeatInterval>
</ns:bootNotificationResponse>

 

Community Hero

Re: Invalid date value in SOAP Response

@xavier1,
Can you please show it with screen shots? How it is saved in properties, how it is placed in the request, and actual error from server side.


Regards,
Rao.
Occasional Contributor

Re: Invalid date value in SOAP Response

 

Hi,

 

The SOAP mock response

image.png

 

The test case

 

image.png

 

The overview of the project. I've tried different syntax for "dateTime" and nothing seems to work.

"2019-01-29T14:45:32.345Z" => Invalid date value

'2019-01-29T14:45:32.345Z' => Invalid date value

2019-01-29T14:45:32.345Z => Invalid date value

 

image.png

 

 

Community Hero

Re: Invalid date value in SOAP Response

Can you try below? which would return current time if that is ok for you.

${= java.time.OffsetDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('yyyy-MM-dd\'T\'HH:mm:ssZ'))}


Regards,
Rao.
Occasional Contributor

Re: Invalid date value in SOAP Response

 

Thanks for your help but I still have the same error message with this syntax.

I've also tried with the other value like heartBeatInterval and I also have the same kind of error.

 

What does SoapUI check to say thsi is an invalid date value ?

 

 

image.png

 

Regards,

Xavier

Community Hero

Re: Invalid date value in SOAP Response

When do you get that error?


Regards,
Rao.
Community Hero

Re: Invalid date value in SOAP Response

Getting error on validate? What if you hit the mock service without validating it?


Regards,
Rao.
Occasional Contributor

Re: Invalid date value in SOAP Response

 

Yes the error is when I use Validate.

 

I've cheked, if I don't use validate the mock service works and I can see the current date time.