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

Getting a Rational Team Concert work item as html.

 I can get a printable html version of a Rational Team Concert work item by putting the following URL in my browser:

<o:p> </o:p>

https://<server>:<port>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/<work item number>?_mediaType=text/html&_selector=hover <o:p> </o:p>

This works fine. I can save the browser contents as an html file and parse the html with JSoup. <o:p> </o:p>

The problem occurs when I try to do a get of the URL in JSoup. Rather than the html I expect I get a “Loading…” page which isn’t visible when it gets rendered it in the browser (it goes by too quickly) but is definitely the first post when I do the get. <o:p> </o:p>

My question is, is there a way to turn off the “Loading…” page or another URL that will allow me to get directly to the html? Having to save this to a file seems like a very clunky step to have to go through. <o:p> </o:p>

<o:p>  RTC Version 6.0.3. </o:p>

<o:p>   </o:p>

<o:p>   </o:p>

0 votes



One answer

Permanent link

Before you GET the HTML resource, have you logged on to RTC within JSoup? The only time I see the "Loading..." message is when the log on page needs to be loaded. As far as I can see in the network trace, once logged on, only one request is sent to the server and there is no redirecting.

Why not just use XML format? Adding _mediaType=application/xml in the URL, or add a HTTP header "Accept: application/xml" will give you this. The URL that you currently use shows the Inline Editor presentation of the work item, which may not necessarily contain all the information you  need.

0 votes

Comments

 Thanks for the answer Donald. I have tried logging in with something equivelent to this:


Document document =
 .data("cookieexists", "false") .data("username", "32007702")
 .data("login", "Login") .cookies(loginForm.cookies()) .post();

But with no luck. I'll continue trying the login route, but so far I still get the "Loading..." page. I'm using the html becuase all I really want to do is modify the html by removing tables. That part works well.

I'm talking about logging in to CCM, not your own application. Whatever the script/application you use, you should have a login sequence similar to the below one.
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Appendix_A

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,943

Question asked: Feb 16 '17, 3:56 p.m.

Question was seen: 1,595 times

Last updated: Feb 20 '17, 6:18 p.m.

Confirmation Cancel Confirm