Help : Authentication using c# code
Hi,
I am trying to use REST API from C# code. I facing issue while authenticating with rational integration service. Please provide me correct way to autheticate with rational quality manager . Below code i am using for connection. Thanks, Avinash string result = string.Empty; string url = @"https://adtjazz3052.accenture.com/jazz/service/com.ibm.rqm.integration.service.IIntegrationService/resources/SANDBOX/testscript/urn:com.ibm.rqm:testscript:119"; HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest; //req.Headers.Add("Accept","application/xml"); req.Accept = "application/xml"; req.ContentType = "text/xml"; //CredentialCache creds = new CredentialCache(); NetworkCredential nc = new NetworkCredential("xxxxxx", "xxxx"); //creds.Add(url req.Credentials = CredentialCache.DefaultCredentials; req.PreAuthenticate = true; using (HttpWebResponse resp = req.GetResponse() as HttpWebResponse) { StreamReader reader = new StreamReader(resp.GetResponseStream()); result = reader.ReadToEnd(); } Console.Write(result); |
6 answers
Hi @avinashchilke,
you can refer to the logic in the URLutility sample source code which is written in java. https://jazz.net/downloads/rational-quality-manager/milestones/4.0RC2/RQM-Extras-RQMUrlUtil-4.0RC2.zip Hi, |
Hi Hao Wan ,
I have download RQMURLUtil , but i did not find any souce code there. As i am .net developer, i donot know how to open jar file. Can you please provide me sample code on this. Thanks, Hi @avinashchilke, Hi, |
hi @avinashchilke,
you can just use 7-zip to unzip the jar file then you can see the java source code, it's similar to the C# Hi Hao Wan , Hi @avinashchilke, Hi, |
Thanks ....:)
Issue is resolve. Regard's Avinash Hi @avinashchilke, Hi, |
Hi, I blocked by the same issue. Would you please to share how to solve it?
Thanks in advance?
|
Hi,
I am also facing the same issue. Could you share the sample? Thanks in Advance! |
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.