It's all about the answers!

Ask a question

How to create a Task WorkItem using OSLC 2.0

Chandan M B (1133470) | asked Apr 16 '15, 2:46 a.m.
I need to create a new Task using Java. Should i use POST/PUT and can you provide me syntax of url format and body to create a Task Work Item.
Sample code helps me a lot :)


One answer

permanent link
Karthik Krishnan (8825115162) | answered Apr 16 '15, 8:35 a.m.
With Java you may also use the RTC Java API to manipulate work items

With OSLC refer -

With Java API --> Refer this blog by @ralphschoon  You will find lots of examples

Chandan M B commented Apr 16 '15, 11:08 p.m.

Hi Karthik,

I tried using Rest Client.
URL : https://localhost:9443/ccm/oslc/contexts/_7zrIUNj9EeS7ButJuJdZ2w/workitems/task

Added the Headers.
I did PUT
Its not working.

405 Method Not Allowed

Donald Nong commented Apr 17 '15, 4:44 a.m.

To avoid the "405 Method not allowed" error, you need to add a proper "Accept" header.

Your answer

Register or to post your answer.