how to 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
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...
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
The code is useless as expected...
I get the exception :
Error : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
on line:
var _serverResponse1 = _webClient.DownloadString(“https://localhost:9443/jazz/authenticated/identity”);
...??...
> 9443/jazz/
that is the old pre-3.0 context. isn't it
9443/jts/ now for authentication?
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).
You must see those URLs in your browser already. So should be easy to check/fix...
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...) ?
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!