public static void main(String[] args) {
    System.setProperty(
        "gov.nih.nci.security.cgmm.syncgts.file",
        "C:/Vijay/software/jboss-4.0.5.GA/server/default/cgmm_config/sync-description.xml");
    System.setProperty(
        "gov.nih.nci.security.cgmm.properties.file",
        "C:/Vijay/software/jboss-4.0.5.GA/server/default/cgmm_config/cgmm-properties.xml");
    System.setProperty(
        "gov.nih.nci.security.cgmm.login.config.file",
        "C:/Vijay/software/jboss-4.0.5.GA/server/default/cgmm_config/cgmm.login.config");
    System.setProperty(
        "gov.nih.nci.security.configFile",
        "C:/Vijay/software/jboss-4.0.5.GA/server/default/cgmm_config/ApplicationSecurityConfig.xml");

    //		Get AuthenticationService URL Info.
    CGMMManager cgmmManager = null;
    try {
      cgmmManager = new CGMMManagerImpl();
    } catch (CGMMConfigurationException e) {
      e.printStackTrace();
    }

    SortedMap authenticationServiceURLMap = null;
    try {
      authenticationServiceURLMap = cgmmManager.getAuthenticationServiceURLMap();
      if (authenticationServiceURLMap == null) System.out.println(" Map is null");
      else {
        System.out.println(" Got Map");
      }

    } catch (CGMMConfigurationException e) {
      e.printStackTrace();
    }
  }
  public static void main(String[] args) {

    GridAuthHelper gah = null;
    try {
      gah = new GridAuthHelper();
    } catch (CGMMConfigurationException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
    try {
      //		GlobusCredential gc = 	gah.authenticate("parmarv",
      // "Parmarv123!","https://dorian.training.cagrid.org:8443/wsrf/services/cagrid/Dorian");
      GlobusCredential gc =
          gah.authenticate(
              "cgmmtmpuser2",
              "Abcdefgh123!",
              "https://dorian.training.cagrid.org:8443/wsrf/services/cagrid/Dorian");
      if (gc == null) System.out.println("GC is null");
      System.out.println("Got GC!!");

      CGMMUser user = new CGMMUser();

      user.setAddress1("address1");
      user.setAddress2("address2");
      user.setCity("rockville");
      user.setCountry("US");
      user.setFirstName("Temp");
      user.setLastName("TempLastName");
      user.setOrganization("ncicb");
      user.setPasswordGrid("Abcdefgh123!");
      user.setPhoneNumber("301-451-2214");
      user.setState("MD");
      user.setLoginIDGrid("cgmmtmpuser2");
      user.setZipcode("20850");
      user.setEmailId("*****@*****.**");

      String a = null;
      try {
        a =
            gah.createDorianAccount(
                user, "https://dorian.training.cagrid.org:8443/wsrf/services/cagrid/Dorian");
      } catch (CGMMException e) {

        e.printStackTrace();
      }
      System.out.println("Created Dorian Account!!");
      System.out.println(a);
    } catch (CGMMConfigurationException e) {
      e.printStackTrace();
    } catch (CGMMInputException e) {
      e.printStackTrace();
    } catch (CGMMGridDorianException e) {
      e.printStackTrace();
    } catch (CGMMGridAuthenticationServiceException e) {
      e.printStackTrace();
    } catch (CGMMAuthenticationURLException e) {
      e.printStackTrace();
    }
  }