Examples of IRegistry


Examples of org.apache.juddi.IRegistry

                                     Collection classifications,
                                     Collection specificationa) throws JAXRException
    {
        BulkResponseImpl blkRes = new BulkResponseImpl();

        IRegistry iRegistry = registryService.getRegistry();
        FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers);
        Vector juddiNames = mapNamePatterns(namePatterns);

        try
        {
            /*
             * hit the registry.  The key is not required for UDDI2
             */

            String id = null;

            if (orgKey != null) {
                id = orgKey.getId();
            }

            ServiceList l = iRegistry.findService(id, juddiNames,
                    null, null, juddiFindQualifiers, registryService.getMaxRows());

            /*
             * now convert  from jUDDI ServiceInfo objects to JAXR Services
             */
 
View Full Code Here

Examples of org.apache.juddi.IRegistry

        throw new UnsupportedCapabilityException();
    }

    public RegistryObject getRegistryObject(String id, String objectType) throws JAXRException
    {
        IRegistry registry = registryService.getRegistry();
        BusinessLifeCycleManager lcm = registryService.getBusinessLifeCycleManager();

        if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType)) {

            try {

                TModelDetail tmodeldetail = registry.getTModelDetail(id);
                if(tmodeldetail != null && tmodeldetail.getTModelVector().size() > 0)
                {
                  TModel tmodel = (TModel)tmodeldetail.getTModelVector().elementAt(0);
                  ClassificationSchemeImpl scheme = new ClassificationSchemeImpl(lcm);
                  boolean uddiBased = isUDDIBasedTModel(tmodel);
                    if(uddiBased)
                    {
                      scheme.setName(new InternationalStringImpl(tmodel.getName()));
                      Vector descVect = tmodel.getDescriptionVector();
                      if(descVect != null && descVect.size() > 0)
                      {
                        Description d = (Description)descVect.elementAt(0);
                        scheme.setDescription(new InternationalStringImpl(d.getValue()));
                      }
                      scheme.setExternalLinks(ScoutUddiJaxrHelper.getExternalLinks(tmodel.getOverviewDoc()
                                                        ,lcm));
                      scheme.setExternalIdentifiers(ScoutUddiJaxrHelper.getExternalIdentifiers(tmodel.getIdentifierBag()
                                                        ,lcm))
                      scheme.setClassifications(ScoutUddiJaxrHelper.getClassifications(tmodel.getCategoryBag(),lcm));
                    }
                    else
                    {
                      Concept c = ScoutUddiJaxrHelper.getConcept(tmodeldetail, lcm);

                        /*
                         * now turn into a concrete ClassificationScheme
                         */
                        scheme.setName(c.getName());
                        scheme.setDescription(c.getDescription());
                        scheme.setKey(c.getKey());
                    }

                    return scheme;
                }
            }
            catch (RegistryException e) {
              log.error("RegistryException::",e);
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType)) {

            try
            {
                BusinessDetail orgdetail = registry.getBusinessDetail(id);
                return ScoutUddiJaxrHelper.getOrganization(orgdetail, lcm);
            }
            catch (RegistryException e) {
              log.error("RegistryException::",e);
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType)) {

            try
            {
                TModelDetail tmodeldetail = registry.getTModelDetail(id);
                return ScoutUddiJaxrHelper.getConcept(tmodeldetail, lcm);
            }
            catch (RegistryException e) {
              log.error("RegistryException::",e);
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.SERVICE.equalsIgnoreCase(objectType)) {

            try {

              
                ServiceDetail sd = registry.getServiceDetail(id);

                if (sd != null) {

                    Vector v = sd.getBusinessServiceVector();

View Full Code Here

Examples of org.apache.juddi.IRegistry

        throw new UnsupportedCapabilityException();
    }

    public BulkResponse getRegistryObjects(Collection objectKeys, String objectType) throws JAXRException
    {
        IRegistry registry = registryService.getRegistry();
        //Convert into a vector of strings
        Vector keys = new Vector();
        Iterator iter = objectKeys.iterator();
        while(iter.hasNext())
        {
            Key key = (Key)iter.next();
            keys.add(key.getId());
        }
        Collection col = new ArrayList();
        LifeCycleManager lcm = registryService.getLifeCycleManagerImpl();

        if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType))
        {
            try
            {
                TModelDetail tmodeldetail = registry.getTModelDetail(keys);
                Vector tmvect = tmodeldetail.getTModelVector();
                for (int i = 0; tmvect != null && i < tmvect.size(); i++)
                {
                    col.add(ScoutUddiJaxrHelper.getConcept((TModel) tmvect.elementAt(i), lcm));
                }

            } catch (RegistryException e)
            {
              log.error("RegistryException::",e);
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
        {
            //Get the Organization from the uddi registry
            try
            {
                BusinessDetail orgdetail = registry.getBusinessDetail(keys);
                Vector bizvect = orgdetail.getBusinessEntityVector();
                for (int i = 0; bizvect != null && i < bizvect.size(); i++)
                {
                    col.add(ScoutUddiJaxrHelper.getOrganization((BusinessEntity) bizvect.elementAt(i), lcm));
                }
            } catch (RegistryException e)
            {
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType))
        {
            try {
                TModelDetail tmodeldetail = registry.getTModelDetail(keys);
                Vector tmvect = tmodeldetail.getTModelVector();
                for (int i = 0; tmvect != null && i < tmvect.size(); i++)
                {
                    col.add(ScoutUddiJaxrHelper.getConcept((TModel) tmvect.elementAt(i), lcm));
                }

            }
            catch (RegistryException e)
            {
              log.error("RegistryException::",e);
                throw new JAXRException(e.getLocalizedMessage());
            }
        }
        else if (LifeCycleManager.SERVICE.equalsIgnoreCase(objectType)) {

            try {
                ServiceDetail serviceDetail = registry.getServiceDetail(keys);

                if (serviceDetail != null) {

                    Vector v = serviceDetail.getBusinessServiceVector();
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    String userID = "sviens";
    String password = "password";

    try
    {
      // execute a GetAuthToken request
      AuthToken authToken = registry.getAuthToken(userID,password);
      AuthInfo authInfo = authToken.getAuthInfo();
      System.out.println("AuthToken: "+authInfo.getValue());
    }
    catch (RegistryException regex)
    {
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    try
    {
      RegistryInfo regInfo = registry.getRegistryInfo();
      Properties regProps = regInfo.getProperties();
      Enumeration keys = regProps.keys();

      while(keys.hasMoreElements())
      {
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);

    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
View Full Code Here

Examples of org.apache.juddi.IRegistry

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);

    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    String userID = "sviens";
    String password = "password";

    try
    {
      // execute a GetAuthToken request
      AuthToken token = registry.getAuthToken(userID,password);
      AuthInfo authInfo = token.getAuthInfo();

      // create a publisher with administrative privileges
      Publisher publisher = new Publisher("BlueNoteIdentifier", "Blue Note", true);
      publisher.setEnabled(true);
      // create a publisher to remove
      Publisher perisher = new Publisher("removeMe", "Remove Me", false);
      // put the Publisher objects into a Vector
      Vector vector = new Vector(2);
      vector.add(publisher);
      vector.add(perisher);

      // make the request
      PublisherDetail detail = registry.savePublisher(authInfo, vector);

      System.out.println("publishers saved = " + detail.getPublisherVector().size());

      // get an authToken using the publisher with administrative privileges
      token = registry.getAuthToken("BlueNoteIdentifier", "password");
      authInfo = token.getAuthInfo();

      // create a vector of strings containing the
      String publisherID = "removeMe";
      vector = new Vector(1);
      vector.add(publisherID);
      registry.deletePublisher(authInfo, vector);
    }
    catch(Exception ex)
    {
      ex.printStackTrace();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.