Need help with calling RQM REST APIs through .NET
Hi All,
I am battling with this problem since a couple of days. Here is what i am trying to achieve - Fetch a work item details (summary, description )into a .NET client through the REST API's This is the code i have written so far in a console .NET app namespace ConsoleApplication1 { class Program { static void Main(string[] args) { //ServicePointManager.ServerCertificateValidationCallback ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback( delegate( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; }); HttpWebRequest request = WebRequest.Create("https://pdbvwmaprat.nw.lbps.com:9443/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/workitem/7341") as HttpWebRequest; ///com.ibm.rqm.integration.service.IIntegrationService/resources/Quality+Manager/workitem/7341 //request.Method = "GET"; // request.ContentType = "application/xml"; //request.Accept ="Accept"; request.ContentType = "application/xml"; string result = null; request.Credentials = CredentialCache.DefaultCredentials; using (HttpWebResponse resp = request.GetResponse() as HttpWebResponse) { // string ReUri = // resp.ContentType = "application/xml"; StreamReader reader = new StreamReader(resp.GetResponseStream()); result = reader.ReadToEnd(); } } } } I am expecting to get the XML atleast of the login page since that is the page that has to be displayed on hitting the url specified above However , the result that i always get is that of html and is <DOCTYPE> <Licensed> <html> <head> <meta> <meta> <title></title> <link> <link> <style> #net-jazz-ajax-NoScriptMessage { width: 100%; color: #D0D0D0; font-size: 2em; text-align: center; position: absolute; top: 1%; z-index: 999; } </style> </head> <body> <noscript><div>Javascript is either disabled or not available in your Browser</div></noscript> <div>Loading...</div> <div></div> <script> djConfig = { isDebug: false, usePlainJson: true, baseUrl: "/jazz/web/dojo/", locale: "en-us", localizationComplete: true }; /*null*/ net = {jazz: {ajax: {}}}; net.jazz.ajax._contextRoot = "/jazz"; net.jazz.ajax._webuiPrefix = "/web/"; </script> <script></script> <script> /* <CDATA> */ </script> <script> /* <CDATA> */ </script> </body> </html> I am stuck at this point and not able to get further ideas. Any help is highly appreicated Thanks |
11 answers
Note, the workitem resource is not supported for fields selection/filtering (see https://jazz.net/wiki/bin/view/Main/RqmApi#SupportedFieldsResources).
|
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.