package org.jxchange.client.tests;
import java.net.UnknownHostException;
import org.jinterop.dcom.common.JIException;
import org.jinterop.dcom.common.JISystem;
import org.jinterop.dcom.core.JIString;
import org.jinterop.dcom.core.JIVariant;
import org.jxchange.client.cdo121.JXCdoException;
import org.jxchange.client.cdo121.JXCdoSession;
public class FirstContact {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
JISystem.setAutoRegisteration(true);
try {
JXCdoSession jxCdoSession = new JXCdoSession("localhost",
"localhost", "vikram", "vikram");
jxCdoSession.Logon(new JIString("vikram_roopchand").Variant,
new JIString("Password").Variant, new JIVariant(false),
new JIVariant(true), new JIVariant(false), new JIVariant(
false), new JIString(
"PUNAXCHEMBPIN02.enterprise.corp.com" + "\n"
+ "vikram_roopchand").Variant);
System.out.println(jxCdoSession.GetCurrentUser());
System.out.println(jxCdoSession.GetCdoClass());
jxCdoSession.Logoff();
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JIException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JXCdoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}