therockrahul

need help:need to Consume Clarity Web Services with Apache Axis

Discussion created by therockrahul on Oct 20, 2011
Latest reply on Oct 25, 2011 by Chris_Hackett
I am trying to consume Clarity Users -Login WebService. I am trying to retrieve session id value by providing username and password. For valid Credential m getting Session id as null. Please let me know on this. help me to resolve the problem ASAP. I am new on this.

Below is code Snippet:

package com.niku.www.xog.Object;


public class WebServiceClient {

/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {

//user Login To Clarity
String strUrl = "http://XXXX:8000/niku/xog";
Login login = new Login("admin","Infy123+");
/*login.setUsername("admin");
login.setPassword("Infy123+");*/

UsersServiceLocator serviceLocator = new UsersServiceLocator();
serviceLocator.setUsersServiceEndpointAddress(strUrl);
UsersPort port = serviceLocator.getUsersService();
System.out.println("PORT::"+port);

String sessionId = null;
sessionId = port.login(login.getUsername(),login.getPassword());
System.out.println("Session Id::-"+sessionId);
}
}

Outcomes