How do we login to Jazz server programmatically
![]()
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
![]()
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. |
![]()
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.. |
![]() Hello FEng Liu,
|
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.