OSLC REST API: How to set a "drop down list" attribute programmatically, for ex: "Severity", for a RTC WI.
String sStartOSLC = "<oslc_cm:ChangeRequest";
String sEndOSLC = "</oslc_cm:ChangeRequest>";
String xmlNS = " xmlns:dc=\"http://purl.org/dc/terms/\" xmlns:rtc_cm=\"https://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:oslc_cm=\"http://open-services.net/xmlns/cm/1.0/\" xmlns:oslc_cmx=\"http://open-services.net/ns/cm-x#\">";
String sType = "<rtc_cm:type rdf:resource=\""+sType_data+"\"/>";
String sTitle = "<dc:title>"+"A New Defect for OSLC_5"+"</dc:title>";
String sSeverity = "<oslc_cmx:severity>"+"severity.literal.l3"+"</oslc_cmx:severity>";
String sPriority = "<oslc_cmx:priority>"+"priority.literal.l3"+"</oslc_cmx:priority>";
String sProjectArea = "<dc:projectarea>"+"Test RTC (Project)"+"</dc:projectarea>";
String steamArea = "<dc:teamarea>"+"Test RTC (Project)"+"</dc:teamarea>";
String sDescrption = "<dc:description>"+"OSLC Rest Service Test Defect Creation_5"+"</dc:description>";
String sOslcXML = sStartOSLC+xmlNS+sTitle+sType+sSeverity+sPriority+sProjectArea+steamArea+sDescrption+sEndOSLC;
HttpEntity myEntity = new StringEntity(sOslcXML);
httppost.setEntity(myEntity);
Using the above code I am able to create a workitem programmatically. The problem is only Text area fields like Title, Description are populated but it could not populate Drop down values like Severity,
One answer
https://jazz.net/library/article/1001
https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20