Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Key


        fail("Save Organization failed");
      }
     
      Collection sourceKeys = br.getCollection();
      Iterator iter = sourceKeys.iterator();
      Key savekey = null;
      while (iter.hasNext())
      {
        savekey = (Key) iter.next();
      }
      String sourceid  = savekey.getId();
      Organization queried = (Organization) bqm.getRegistryObject(sourceid, LifeCycleManager.ORGANIZATION);
      assertNotNull("Source Org", queried.getName().getValue());
           
      Collection orgstwo = new ArrayList();
      orgstwo.add(target);
            br = blm2.saveOrganizations(orgstwo);
            if (br.getExceptions() != null)
      {
              fail("Save Organizations failed");
            }
            Collection targetKeys = br.getCollection();
            iter = targetKeys.iterator();
            while (iter.hasNext())
            {
              savekey = (Key) iter.next();
            }
           
            String targetid = savekey.getId();
            Organization targetOrg = (Organization) bqm2.getRegistryObject(targetid, LifeCycleManager.ORGANIZATION);
            assertNotNull("Target Org", targetOrg.getName().getValue());

            Concept associationType = null;           
            ClassificationScheme associationTypes =
View Full Code Here


                System.out.println("Classification Saved");
                Collection coll = br.getCollection();
                Iterator iter = coll.iterator();
                while (iter.hasNext())
                {
                    Key key = (Key) iter.next();
                    System.out.println("Saved Key=" + key.getId());
                    cScheme.setKey(key);
                    remover.removeClassificationScheme(cScheme);
                }//end while
            } else {
                System.err.println("JAXRExceptions " +
View Full Code Here

            bqm = rs.getBusinessQueryManager();
            Finder finder = new Finder(bqm, uddiversion);

            System.out.println("\nCreating temporary organization...\n");
            Organization tmpOrg = createTempOrg();
            Key tmpOrgKey = tmpOrg.getKey();
           
            System.out.println("\nCreating service...\n");
            Service tmpSvc = createTempService(tmpOrg);
            Key tmpSvcKey = tmpSvc.getKey();
           
            System.out.println("\nCreating service binding...\n");
            Key sbKey = createServiceBinding(tmpSvc);
                      
           
            SpecificationLink specLink = blm.createSpecificationLink();           
            Concept concept = null;
            if ("3.0".equals(uddiversion)) {
View Full Code Here

        }
    }


    private Key createServiceBinding(Service tmpSvc) throws JAXRException {
      Key key = null;
        ServiceBinding serviceBinding = blm.createServiceBinding();
        serviceBinding.setName(getIString(serviceBindingName));
        serviceBinding.setDescription(getIString("UDDI service binding"));
        tmpSvc.addServiceBinding(serviceBinding);
       
        SpecificationLink specLink = blm.createSpecificationLink();
        ExternalLink externalLink = blm.createExternalLink("http://localhost:8080/jmx-console", "Scout test");
        Collection<ExternalLink> externalLinks = new ArrayList<ExternalLink>();
        externalLinks.add(externalLink);
        specLink.setExternalLinks(externalLinks);
       
        RegistryService rs = connection.getRegistryService();
        bqm = rs.getBusinessQueryManager();
        Concept concept = null;
        if ("3.0".equals(uddiversion)) {       
          concept = (Concept)bqm.getRegistryObject("uddi:uddi.org:findqualifier:orlikekeys", BusinessLifeCycleManager.CONCEPT);
        } else {
          concept = (Concept)bqm.getRegistryObject("uuid:AD61DE98-4DB8-31B2-A299-A2373DC97212",BusinessLifeCycleManager.CONCEPT);
        }
       
        specLink.setSpecificationObject(concept);
       
        serviceBinding.addSpecificationLink(specLink);
        ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
        serviceBindings.add(serviceBinding);

        BulkResponse br = blm.saveServiceBindings(serviceBindings);
        if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
        {
            System.out.println("Service Binding Saved");
            key = (Key) br.getCollection().iterator().next();
            System.out.println("Saved Key=" + key.getId());
        } else
        {
            System.err.println("JAXRExceptions " +
                    "occurred during save:");
            Collection exceptions = br.getExceptions();
View Full Code Here

        BulkResponse br = blm.saveServices(services);
        if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
        {
            System.out.println("Service Saved");
            Key key = (Key) br.getCollection().iterator().next();
            System.out.println("Saved Key=" + key.getId());
            service.setKey(key);
        } else
        {
            System.err.println("JAXRExceptions " +
                    "occurred during save:");
View Full Code Here

      }
    }
   
    private Organization createTempOrg() throws JAXRException {

        Key orgKey = null;
        Organization org = blm.createOrganization(getIString(tempOrgName));
        org.setDescription(getIString("Temporary organization to test saveService()"));

        Collection<Organization> orgs = new ArrayList<Organization>();
        orgs.add(org);
        BulkResponse br = blm.saveOrganizations(orgs);
       
        if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
        {
          orgKey = (Key) br.getCollection().iterator().next();
            System.out.println("Temporary Organization Created with id=" + orgKey.getId());
            org.setKey(orgKey);
        else
        {
            System.err.println("JAXRExceptions " +
                    "occurred during creation of temporary organization:");
View Full Code Here

      Collection exceptions = response.getExceptions();
      if (exceptions == null) {
        Collection retKeys = response.getCollection();
        Iterator keyIter = retKeys.iterator();
        Key orgKey = null;
        if (keyIter.hasNext()) {
          orgKey =
            (javax.xml.registry.infomodel.Key) keyIter.next();
          id = orgKey.getId();
          System.out.println("Organization with ID=" + id + " was deleted");
        }
      }
    }
View Full Code Here

        return blm.createInternationalString(str);
    }

   
    private Organization createTempOrg(String tempOrgName, BusinessLifeCycleManager blm) throws JAXRException {
        Key orgKey = null;
        Organization org = blm.createOrganization(getIString(tempOrgName));
        org.setDescription(getIString("Temporary organization to test saveService()"));

        Collection<Organization> orgs = new ArrayList<Organization>();
        orgs.add(org);
        BulkResponse br = blm.saveOrganizations(orgs);

        if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
        {
            orgKey = (Key) br.getCollection().iterator().next();
            System.out.println("Temporary Organization Created with id=" + orgKey.getId());
            org.setKey(orgKey);
        else
        {
            System.err.println("JAXRExceptions " +
                    "occurred during creation of temporary organization:");
View Full Code Here

        Collection exceptions = response.getExceptions();
        if (exceptions == null) {
                Collection retKeys = response.getCollection();
                Iterator keyIter = retKeys.iterator();
                Key orgKey = null;
                if (keyIter.hasNext()) {
                        orgKey =
                                (javax.xml.registry.infomodel.Key) keyIter.next();
                        id = orgKey.getId();
                        System.out.println("Organization with ID=" + id + " was deleted");
                }
        }
    }
View Full Code Here

     
              if (value != null)
                keyr.setKeyValue(value);
             
              if (scheme != null) {
                Key key = scheme.getKey();
                if (key != null && key.getId() != null)
                  keyr.setTModelKey(key.getId());
              }
            }
                }
      }
      return cbag;
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.Key

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.