Examples, again, sorry

Help
jhertz
2009-06-18
2013-04-17
  • jhertz

    jhertz - 2009-06-18

    Hi,

    I have read the post asking for examples, and the replies saying that you can download them via SVN. That’s all good, but all I am saying is that people are generally lazy (that includes me) and it would be good if you could just download a zip with the example code in plus it would be easier to find.

     
    • Adrien Combecau

      Adrien Combecau - 2009-06-19

      hi, i ve downloaded via svn:

      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("HOSTNAMEorIP", "HOSTNAMEorIP", "vikram@exchange", "password");
                  jxCdoSession.Logon(new JIString("vikram_user").Variant, new JIString("password").Variant, new JIVariant(false),
                          new JIVariant(true), new JIVariant(false), new JIVariant(
                                  false), null);//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();
              }

          }

      }
      to run that example i needed to dl the jinterop.jar project too.. but still throwing exceptions.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks