java连接lotus的代码

| No Comments | No TrackBacks

//需要把lotus里的notes.jar,ncso.jar放入classpath
**
*

Title: 图形化设计


*

Description:


*

Copyright: Copyright (c) 2004


*

Company:


* @author zhongweihai newwei2001@yahoo.com.cn
* @version 1.0
*/
import lotus.domino.*;

public class ConnDomino {

public Session getSession(String sip,String username,String password)
{
lotus.domino.Session s;
String sior;
try {
sior =NotesFactory.getIOR(sip+":63148");
s = NotesFactory.createSessionWithIOR(sior,username,password);
}
catch (Exception ex) {
s = null;
}
return s;
}

public static void main(String[] args)
{
String host="10.81.3.11";
String user="admin";
String pwd="domino";
Session s;
ConnDomino conn = new ConnDomino();
s = conn.getSession(host,user,pwd);
try{
System.out.println(s.getUserName());
}
catch(Exception e){}
}
}

No TrackBacks

TrackBack URL: http://www.wujianrong.com/mt-tb.cgi/177

Leave a comment

About this Entry

This page contains a single entry by kevinwu published on September 12, 2005 11:51 AM.

有用的国外开源项目网址 was the previous entry in this blog.

VU - Pale Blue Eyes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.