2016-07-29 1 views

답변

0

연결하려는 Agile PLM 버전에 대한 AgileAPI.jar 파일에 대한 참조를 추가해야합니다. 그런 다음 시작 설명서에서 참조한 것과 같이 상용구를 사용하여 Agile 인스턴스에 대한 연결을 만듭니다.

private IAgileSession login(String username, String password) throws APIException 
{ 
    //Create the params variable to hold login parameters 
    HashMap params = new HashMap(); 

    //Put username and password values into params   
    params.put(AgileSessionFactory.USERNAME, username); 
    params.put(AgileSessionFactory.PASSWORD, password); 

    // Get an Agile server instance. ("agileserver" is the name of the Agile  
    // proxy server, and "virtualPath" is the name of the virtual path used 
    // for the Agile system.) 

    AgileSessionFactory instance = 
     AgileSessionFactory.getInstance("http://<agileserver>/<virtualPath>"); 

    //Create the Agile PLM session and log in 
    return instance.createSession(params); 
}