It's all about the answers!

Ask a question

Retrieving attachment contents using oslc


1
1
Akshata Kulkarni (37320) | asked Jun 09 '15, 8:24 a.m.
edited Jun 09 '15, 9:26 a.m. by Ralph Schoon (63.6k33646)
Hi,
I have attached a pdf to a workitem .How can i  read the pdf contents using oslc?
Thanks in advance !

3 answers



permanent link
Ralph Schoon (63.6k33646) | answered Jun 09 '15, 9:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
See this discussion. Maybe that helps: https://jazz.net/forum/questions/150849/how-to-upload-an-attachment-to-a-work-item-via-rest-api it is for upload, but maybe there is a similar approach.

I only have code for uploading and downloading using Java in

https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/

and

https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/


permanent link
Donald Nong (14.5k614) | answered Jun 09 '15, 10:40 p.m.
Not quite sure it's doable as it seems to be blocked in my environment. Here are the steps that I use.
1. Access the work item shortcut /ccm/resource/itemName/com.ibm.team.workitem.WorkItem/###
2. Locate the attachment in the XML presentation, which is the <rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment> tag.
3. Access the attachment link /ccm/resource/itemOid/com.ibm.team.workitem.Attachment/xxxxxxxxxxxxx. The response contains details about the attachment, such as file type, file size and etc. The link to the actual file content is the <rtc_cm:content> tag.
4. Try to access the content link but I get this warning.
You have followed a direct link to content hosted in a Jazz server.  This page has been presented to ensure that a malicious website cannot use cleverly crafted content to circumvent security. If you would like to access the content, please use the link below.

permanent link
Beth Beese (312) | answered Jul 22 '15, 12:06 p.m.
 Hi Donald-

You can’t actually see attachments using OSLC integration. Not only can you not read/retrieve the attachment, you don’t even know it’s there. The rich hover & Adapter UI functionality does not show attachments.

To retrieve an attachment, you could use the Rational Lifecycle Integration Adapters-Tasktop Edition (RLIA-TE), you can learn more about RLIA-TE here:

http://www-304.ibm.com/partnerworld/gsd/solutiondetails.do?&solution=46335&lc=en

Please feel free to reach out to me if you have any questions!
Thanks and Best
b

Beth Beese 
| Business Development Manager | Tasktop Technologies
phone: 647-938-3759| web: task top.com | skype: beth.beese-tasktop 

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.