It's all about the answers!

Ask a question

Illegal argument thrown when submitting new work item post via REST


Shawn Carroll (36413) | asked Apr 19 '17, 3:17 p.m.

I've been able to create work items through the OSLC REST API but I've started getting Illegal argument errors whenever I try to submit a dateTime field.

This is the line that is breaking on me:
<rtc_ext:project_end_date rdf:datatype=\"http://www.w3.org/2001/XMLSchema#dateTime\">${end_date}</rtc_ext:project_end_date>

I've used 12/34/56, 12-34-56, and 12-34-56T7:89:01 as formats, but that hasn't solved this issue.
I strip the line out, I can create a new work item with the script just fine. Why will this line not execute?

One answer



permanent link
Kevin Ramer (4.5k9186201) | answered Apr 19 '17, 5:01 p.m.

https://www.w3.org/TR/xmlschema-2/#dateTime ?

None of the patterns there match; most have yyyy-mm-ddRHH:MM:SS

not to mention :89: as minute is invalid ( if your example is literal )


Comments
Shawn Carroll commented Apr 20 '17, 1:10 p.m.

I've tried 2001-01-01R01:01:01 as well with the same results.


Donald Nong commented Apr 20 '17, 10:54 p.m.

It should be 2001-01-01T01:01:01. Kevin made a typo there, but the referenced document is very clear on this.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.