Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Unable to attach files to ClearQuest record via OSLC

I am trying to add attachments to a record after performing a creationDialog through a .NET WebBrowser control.  The cause for this solution is that the ClearQuest Web attachments tab fails when inside of the WebBrowser control.  So my workaround will be to use the OSLC API to post the attachments after the record is saved.  I am performing this using a HttpWebRequest in .NET 4.0.

However, I am receiving this error when trying to POST attachments:

<Error xmlns="http://open-services.net/xmlns/cm/1.0/" xmlns:cq="http://www.ibm.com/xmlns/prod/rational/clearquest/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <message>CRRCM9964E: Attachments were not specified while posting to the Attachment context.</message>
  <statusCode>400</statusCode>
</Error>
Here are the details of my request:
POST http://...:.../cqweb/oslc/repo/.../db/.../record/...-.../field/Attachments/attachment
Accept: application/xml
Content-Type: multipart/form-data; boundary=MimeSection
Content-Length: 398


--MimeSection
Content-Disposition: form-data; name="description"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit 

Test Description
--MimeSection
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: application/octet-stream; charset=ISO-8859-1
Content-Transfer-Encoding: binary

this is a test attachment file.
--MimeSection--


The example which I am working from is: https://jazz.net/forum/questions/45682/accessing-clearquest-programatically

0 votes



One answer

Permanent link
Hello Josh,

it seems that this is not supported yet: http://pic.dhe.ibm.com/infocenter/cqhelp/v8m0r1/index.jsp?topic=%2Fcom.ibm.rational.clearquest.oslc_cmrest_api.doc%2Ftopics%2Fc_cq_oslc_rest_api_ovw.htm

However there is a thread here where someone describes how they achieved it:
https://jazz.net/forum/questions/45682/accessing-clearquest-programatically?sort=votes&page=1

Good luck!

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,922
× 515

Question asked: Oct 22 '13, 1:21 p.m.

Question was seen: 6,844 times

Last updated: Apr 17 '14, 3:17 a.m.

Confirmation Cancel Confirm