Remove Supplemental Markings using CWS/REST API ?
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
I just gave it a quick try, on my end (Using latest release code), and I was able to remove all the markings by doing this:
String[] supMarks = null; rmscCli.SetItemSuppMarks(ref otAuth, 26605, supMarks);
If a null string array doesn't work for you, it might be time to take a look at the Content Server thread logs. It may be the error is bubbling up from the OScript. Depending on your version, make sure you either have WANTLAPILogs configured in your OT.ini, or you've configured that webservice errors are logged in the Configure Log Settings page. If it doesn't work, no matter what you do, and you can't make sense of the logs, don't hesitate to log a support ticket with your threads reproducing the issue. May be a known issue or similar.
If you need to set only specific ones, I found that if I referenced the RMSecSuppMarkInfo[] Array's SuppMark string, I could get the marking name.
Then, I could set it back like this:
String[] supMarks = { "SUPMARK1" }; rmscCli.SetItemSuppMarks(ref otAuth, 26605, supMarks);
CWS can do this, from what I can tell. The RMSecManagementClient has both GetItemSuppMarks and SetItemSuppMarks, requiring you pass back string[] suppMarks for the latter. I'd suggest grabbing what GetItemSuppMarks returns on an item you wish you manipulate, look for the suppMarks feature therein, and remove the particular mark you wish to remove, and then pass it back with SetItemSuppMarks.
This requires that you have RMSecManagement setup for CWS, it isn't rolled into CWS by default, so your admin will need to either add it to the web.config file, copying over any relevant assemblies for IIS, or deploying it to another application. If you're using tomcat, the relevant war file is cs-services-rmsecmanagement.war.
Thanks Nizar. CWS is already configured and i am able to assign Supplemental Marking but if i want to remove the assigned Supplemental Marking then what should i pass to 'SetItemSuppMarks'
I tried passing blank string or even NULL, it thrown me an error saying "<?xml version='1.0' encoding='UTF-8'?>a:RMSecMan.ErrorCould not start transaction"