how to connect from c# to IBM RQM
How do i connect from c# to IBM RQM ?
When i used HP ALM i had some dlls which where registered on the client machine, and then i would be using the c# using directive wih the name of the .dll "using TDAPIOLELib;" Ps: my plan is to use REST APIs ...to get : -projects -users -testcases -testscritps and then to modify test script steps and upload it to the server... I guess its possible but i am stuck at logging in ... I digged in about OAuth but i couldnt find any code samples... |
5 answers
You can look at the authentication code of the RQM sample utilities (written in Java) that show the required requests for both basic and form authentication. For example, see com.ibm.rqm.ct.client.internal.JFSHttpsClient.login(String, String) in the RQM Copy Utility (see https://jazz.net/wiki/bin/view/Main/RQMCopyUtility#Accessing_the_Source).
|
I have found some source code :
http://blog.boriskuschel.com/2012/02/c-with-visual-studio-and-rational-team.html?showComment=1399373273027#c2233627067206926337 but unfortunately fails when trying to login if ((header != null) && header.Equals("authrequired")) { documentResponse.GetResponseStream().Flush(); documentResponse.Close(); // The server requires an authentication: Create the login form HttpWebRequest formPost = (HttpWebRequest)WebRequest.Create(serverURI + "/j_security_check"); formPost.Method = "POST"; formPost.Timeout = 30000; formPost.CookieContainer = request.CookieContainer; formPost.ContentType = "application/x-www-form-urlencoded"; String output = "j_username=" + login + "&j_password=" + password; Byte[] outputBuffer = Encoding.UTF8.GetBytes(output); formPost.ContentLength = outputBuffer.Length; Stream stream = formPost.GetRequestStream(); stream.Write(outputBuffer, 0, outputBuffer.Length); stream.Close(); // Step (2): The client submits the login form if (DEBUG) Console.WriteLine(">> POST " + formPost.RequestUri); HttpWebResponse formResponse = (HttpWebResponse)formPost.GetResponse(); } The code throws an exception :Error: The remote server returned an error: (408) Request Timeout. I wonder whats wrong... |
Hi George,
have you checked this blog post already ? It gives you some C# authentication sample code - here in the context of querying RTC WIs. http://nkumar83.wordpress.com/2013/06/13/consuming-rtc-rational-team-concert-oslc-apis-using-c-post-1-authentication/ Regards, Stéphane Comments
george claud
commented May 06 '14, 9:12 a.m.
The code is useless as expected...
...??...
sam detweiler
commented May 06 '14, 9:21 a.m.
> 9443/jazz/
george claud
commented May 06 '14, 11:48 a.m.
i dont understand your question George, what Sam suggested is that you may need to adapt the sample to your own case (e.g. the URL for accessing the Jazz server).
george claud
commented May 09 '14, 6:31 a.m.
I tried changing the adresses and it didnt work ...obviously
Have you checked the URL by entering it in a web browser (e.g. should not be an HTTP 404 error...) ?
showing 5 of 6
show 1 more comments
|
I will try , but so far working with IBM technology is a nightmare -_-...
I guess IBM never heard about c#...only Java crap...-_-'' |
I completely agree with you george claud. I would never consider myself moving to IBM technology. Everything is in JAVA :( We are also planning to move to IBM RTC. I could not find any samples to access RQM. Is your code working now? Could you share me the working sample, would be great helpful for me? I am doing PoC. It's very urgent.Could you help me? 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.