It's all about the answers!

Ask a question

How do we login to Jazz server programmatically


Feng Liu (511125) | asked Apr 22 '09, 9:21 a.m.
Hi,

I want to login to Jazz server programmatically by invoking authenticating service provided by Jazz server. Now I can login to the runtime Jetty server but can not login to a server running on Tomcat. The server version is 1.0.1. I found a link related with this problem here:
https://jazz.net/forums/viewtopic.php?p=13813&sid=17e55770593bf031c13971f0e2ee157e
but there is no solution for this...

Could anyone please give some sample code to show this? Thanks very much!

ps, my code to login to the Jazz server is: sending a POST https request to the server and url is https://hostname:port/jazz/j_security_check. and attach user name and password as the parameters. also set some properties for the https connection and establish the connection.

3 answers



permanent link
Terry Krause (101138) | answered Apr 24 '09, 3:55 p.m.
JAZZ DEVELOPER
You should be able to download the Java plain client libraries for this. There is a Java example of how to log in programmatically.
https://jazz.net/downloads/rational-team-concert/releases/1.0.1.1?p=allDownloads

Click the link for "Java Plain Client Libraries". There is snippet code in there to show you how to log in this way.

permanent link
Feng Liu (511125) | answered Apr 29 '09, 1:52 a.m.
Thanks for this information.

I've checked out the Java plain client code and it seems this client library is not my need.. let me make my requirement more clearly..

Thinking of we have two Jazz servers, we can name them as RTC1 and RTC2. Now what I would like to do is that invoke a REST service running on RTC1 from the RTC2. For example, the RTC2 tries to invoke the IRestService running on the RTC1 to retrieve some workitems which are stored in RTC1 repository. I guess for invoking the REST service on another server we should login to that server firstly. But it seems I can NOT login to the server by programmatically although I've set the cookie for the HTTP connection..

I heared from other article and known that it seems because the Tomcat doesn't allow the "drive-by" style login. So, is there any method to enable login like as I mentioned above?

Thanks very much for your help..

permanent link
Reem Kadadihi (133) | answered Oct 12 '17, 6:51 a.m.

Hello FEng Liu,

I m trying to access the jazz server from my java code and I tried the way using a post request with the user name and pw for the login but I have a problem regarding the certificate. I tried to import it to my keystore but it didnt solve the problem.
Would you please tell me how did you solve the problem if you faced it?
Thanks and regards.

Your answer


Register or to post your answer.