Package xregistry.client

Examples of xregistry.client.DocumentRegistryClient


       
        ProxyRenewer renewer = new ProxyRenewer("hperea","hperera1234",MyProxy.DEFAULT_PORT,14400,"portal.leadproject.org");
        GlobalContext context = new GlobalContext(true);
        context.setHostcertsKeyFile("/etc/lead/certificates/hostcertkey.pem.hperera");
        //context.setCredential(renewer.renewProxy());
        DocumentRegistryClient client = new DocumentRegistryClient(context,regsitryURL);
        DocData[] data;
        data  = client.findHosts("");
        if(data != null){
            for(DocData host:data){
              verifyAllFeildsNotNull(host);
              assertNotNull(client.getHostDesc(host.name.toString()));
          }
        }
        data = client.findServiceDesc("");
        if(data != null){
            for(DocData item:data){
              verifyAllFeildsNotNull(item);
              assertNotNull(client.getServiceDesc(item.name));
          }
        }
        data = client.findServiceInstance("");
        if(data != null){
            for(DocData item:data){
              verifyAllFeildsNotNull(item);
              assertNotNull(client.getConcreateWsdl(item.name));
          }
        }
        AppData[] appdata = client.findAppDesc("");
        if(data != null){
            for(AppData item:appdata){
              verifyAllFeildsNotNull(item);
              assertNotNull(client.getAppDesc(item.name.toString(),item.secondryName));
          }
        }       
        data = client.findResource("");
        if(data != null){
            for(DocData item:data){
              verifyAllFeildsNotNull(item);
              assertNotNull(client.getResource(item.name));
          }
        }
       
        QName nonExisitsResource = new QName("nonExisitsResource");
        assertNull(client.getAppDesc(nonExisitsResource.toString(), "foo"));
        assertNull(client.getHostDesc("foo123456"));
        assertNull(client.getServiceDesc(nonExisitsResource));
        assertNull(client.getConcreateWsdl(nonExisitsResource));
        assertNull(client.getResource(nonExisitsResource));

//        //client.registerResource(new QName("AFoo"), "bar");
//        //System.out.println(client.getResource(new QName("AFoo")));
//        client.removeResource(new QName("AFoo"));
//        DocData[] data = client.findResource("");
View Full Code Here


//    }
   
   
    public void testAddremoveDocTest() throws Exception{
        GlobalContext context =  new GlobalContext(true);
        DocumentRegistryClient client = new DocumentRegistryClient(context,"http://linbox3.extreme.indiana.edu:6666/xregistry?wsdl");
        //DocumentRegistryClient client = new DocumentRegistryClient(context,"https://tyr14.cs.indiana.edu:6666/xregistry?wsdl");
        String user = "/C=US/O=National Center for Supercomputing Applications/CN=Hemapani Srinath Perera";
        String otherUser = "/C=US/O=National Center for Supercomputing Applications/CN=Suresh Marru";
        //String[] hostList;
       
       
        //System.out.println(client.registerConcreteWsdl(Utils.readFile("/u/hperera/temp/xregistry.wsdl"), 60*60));
       
        String[] hosts = client.app2Hosts("{http://www.extreme.indiana.edu/lead}TestApp-1");
        TestUtils.printList(hosts);
//        String hostName = "rainier.extreme.indiana.edu";
//       client.registerHostDesc(Utils.readFile("samples/hosts/rainier.xml"));
//        String hostDesc = client.getHostDesc("rainier.extreme.indiana.edu");
//        System.out.println(hostDesc);
//        assertNotNull(hostDesc);
//        hostList = client.findHosts( "rainier.extreme.indiana.edu");
//        TestUtils.testCantainment(hostList, "rainier.extreme.indiana.edu");
//       
        DocData[] hostList = client.findHosts("");
        client.findAppDesc("");
        client.findServiceDesc("");
        client.findServiceInstance("");
       
        for(DocData host:hostList){
            System.out.println(host.name +" "+ host.owner);
        }
//        TestUtils.testCantainment(hostList, "rainier.extreme.indiana.edu");
View Full Code Here

     * @param args
     * @throws XregistryException
     */
    public static void main(String[] args) throws Exception {
        GlobalContext globalContext = new GlobalContext(true);
        DocumentRegistryClient client = new DocumentRegistryClient(globalContext,"https://tyr15.cs.indiana.edu:6666/xregistry?wsdl");
        client.registerConcreteWsdl(GfacUtils.readFile("/u/hperera/temp/cwsdls/AdderService.wsdl"), 99999999);
       
       
        System.out.println(Utils.canonicalizeDN("O=LEAD Project,OU=portal.leadprojec t.org,OU=cs.indiana.edu,CN=hperera/Email=hperera@cs.indiana.edu,CN=proxy"));
       
//        String actorsToAddStr = "#U/C=US/O=National Center for Supercomputing Applications/CN=Suresh Marru$Read";
View Full Code Here

        globalContext.setHostcertsKeyFile(credential.getHostcertsKeyFile());
      } else if (credential != null) {
          globalContext.setCredential(gssCredential);
        }
    }
    return registryClient = new DocumentRegistryClient(globalContext, registryURL);
  }
View Full Code Here

TOP

Related Classes of xregistry.client.DocumentRegistryClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.