It's all about the answers!

Ask a question

How do I get XML for exceutionresult programmatically ?


swapna das (3324872) | asked Jun 21 '12, 2:27 a.m.


Hi,

I want to get the xml for executionresult progrmmatically.I have used RQMCopyUtil to get the XML.I have passed the URL,userid,password and attributetype as argument.But I am geeting some SAXException at my end.

5 answers



permanent link
Pramod Chandoria (2.1k11220) | answered Jun 21 '12, 4:32 a.m.
JAZZ DEVELOPER
Hi Swapna,
Basically you need to use http GET API and copy util is a good example to do that. What is the exception trace, could you please provide that

permanent link
Vaibhav Srivastava (2861) | answered Jun 21 '12, 7:21 a.m.
JAZZ DEVELOPER

permanent link
Paul Slauenwhite (8.4k12) | answered Jun 21 '12, 7:25 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
In addition, see https://jazz.net/wiki/bin/view/Main/RqmApi#Common_Usage_Scenarios.

Comments
swapna das commented Jun 27 '12, 1:11 a.m.

Thanks a lot Paul.In my java project I have included RQMCopyUtil in the build path.And I have created an instance of RQM Client and I am using the getID method of FeedReader class.For that I am passing the URL,userid,password and attributetype as argument.By passing the argument I am able to get the feedObject which is in html format.When it tries to create an XML object out of the HTML it's thrwoeing SAXException.


permanent link
Pramod Chandoria (2.1k11220) | answered Jun 27 '12, 1:32 a.m.
JAZZ DEVELOPER
Hi Swapna,
You need to pass on header in request to receive xml data, by default server sends html response.
You can set accept-header value to application/xml
Header Name: Accept
Value: application/xml

Alternatively adding a header
name : user-agent
value= <any value of empty value is fine>



permanent link
Paul Slauenwhite (8.4k12) | answered Jun 27 '12, 6:31 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
I would also check the content of the HTML since it may be the RQM login page.  If so (and you are using the Accept=application/xml header), you should check your user ID/password.

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.