It's all about the answers!

Ask a question

Unable to attach files to ClearQuest record via OSLC


Josh Brown (134) | asked Oct 22 '13, 1:21 p.m.
edited Oct 22 '13, 1:24 p.m.

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

One answer



permanent link
Markus Rummler (1) | answered Apr 17 '14, 3:17 a.m.
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!

Your answer


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