How to update enumeration attributes in ELM UI using Java OSLC API?
Hi Team,
We are trying to update one attribute having enumeration by using HTTP PUT request like below.
String workitemUrl = cnfprop.getWebContextUrl() + "/oslc/workitems/" + workitemid + ".json";
HttpPut httpput = new HttpPut(workitemUrl);
httpput.setHeader("Content-Type", "application/x-oslc-cm-change-request+json");
// Planned For
HttpEntity myEntity = new StringEntity("{\"rtc_cm:foundIn\":{\"rdf:resource\":\"" + ActionItemType + "\"}}");
While updating we are getting one error like below:
HTTP/1.1 409 Conflict, create or update a resource that already exists or has conflicting information.
So please share any links or document to update attributes having enumeration using OSLC API
Thanks in Advance
Thanks in Advance
One answer
There is simply not enough information to even start to try to answer. In general, which API is used? Documentation referenced? OSLC? Reportable REST? Which method? Which URL, which headers and additional parameters?
Your workitemUrl is probably not a valid URL. EWM has only limited support for JSON. I am unsure what API you refer to. The public API supported by EWM for updarting work items is OSLC (and the Java API).
"Content-Type", "application/x-oslc-cm-change-request+json" is most likely not a valid content type.
Is there an IF-Match header? Rest of the OSLC headers.