Package org.apache.juddi.v3.client.config

Examples of org.apache.juddi.v3.client.config.UDDIClerkManager


public class UDDIClerkManagerTest {
 
     @Test
     public void testReadingTheConfig() {
       try {
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         manager.start();
         manager.getClientConfig().getUDDINode("default");
         assertEquals(2,manager.getClientConfig().getUDDIClerks().size());
         Thread.sleep(500);
         manager.stop();
       } catch (Exception e) {
         //we should not have any issues reading the config
           e.printStackTrace();
           Assert.fail();
       }
View Full Code Here


     }
    
     @Test
     public void testMultipleClientConfigFiles() {
       try {
         UDDIClerkManager manager = new UDDIClerkManager("META-INF/uddi.xml");
         manager.start();
       assertEquals("test-manager", manager.getName());
      
         UDDIClerkManager manager2 = new UDDIClerkManager("META-INF/uddi2.xml");
         manager2.start();
       assertEquals("second-manager", manager2.getName());
       Thread.sleep(500);
       manager.stop();
       manager2.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     }
    
     @Test
     public void testDefaultConfigFile() {
       try {
         UDDIClerkManager manager = new UDDIClerkManager(null);
         //We're expecting the manager defined in the META-INF/uddi.xml file.
         manager.start();
       assertEquals("test-manager", manager.getName());
       Thread.sleep(500);
       manager.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     public void testDefaultManager() {
       try {   
         //This is a special case where the manager in the META-INF/uddi.xml file is
         //instantiated and started simply by getting it.
         //This functionality was add for backwards compatibility.
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         manager.start();
       assertEquals("test-manager", manager.getName());
       assertEquals("default", manager.getClientConfig().getHomeNode().getName());
       Thread.sleep(500);
       manager.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     }
    
     @Test
     public void testReadingAnnotations() {
       try {
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         Map<String,UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
        AnnotationProcessor ap = new AnnotationProcessor();
        if (clerks.containsKey("default")) {
          UDDIClerk clerk = clerks.get("default");
          BusinessService service = ap.readServiceAnnotations(
              HelloWorldMockup.class.getName(), clerk.getUDDINode().getProperties());
View Full Code Here

         } finally {
             xmlPropertyIS.close() ;
         }

         System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
         manager = new UDDIClerkManager(uddiClientResourceFile.getAbsolutePath());
         // addClerkManager must precede manager.start() to avoid a race in jUDDI, do not change this order.
         UDDIClientContainer.addClerkManager(manager) ;
         manager.start();
   this.managerName = this.manager.getName();
         System.setProperty("org.apache.juddi.v3.client.manager.name", this.manager.getName());
View Full Code Here

    private static UDDINode getUDDINode(final String managerName, final String nodeName)
        throws TransportException
    {
        try
        {
            final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
            return manager.getClientConfig().getUDDINode(nodeName) ;
        }
        catch (final ConfigurationException ce)
        {
            throw new TransportException("Failed to retrieve UDDI node: " + nodeName, ce) ;
        }
View Full Code Here

    private static Properties createEnvironment(final String managerName, final String nodeName)
        throws ConfigurationException
    {
        final Properties jndiEnv = new Properties() ;
        final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
        final UDDINode uddiNode = manager.getClientConfig().getUDDINode(nodeName) ;
        final String initialContextFactory = uddiNode.getFactoryInitial() ;
        final String providerURL = uddiNode.getFactoryNamingProvider() ;
        final String urlPkgPrefixes = uddiNode.getFactoryURLPkgs() ;
       
        if (initialContextFactory != null)
View Full Code Here

    private static UDDINode getUDDINode(final String managerName, final String nodeName)
        throws TransportException
    {
        try
        {
            final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
            return manager.getClientConfig().getUDDINode(nodeName) ;
        }
        catch (final ConfigurationException ce)
        {
            throw new TransportException("Failed to retrieve UDDI node: " + nodeName, ce) ;
        }
View Full Code Here

        final String juddiApiUrl ;
        if (endpointURL == null)
        {
            try
            {
                final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
                juddiApiUrl = manager.getClientConfig().getUDDINode(nodeName).getJuddiApiUrl() ;
            }
            catch (final ConfigurationException ce)
            {
                throw new TransportException("Could not discover juddiApiUrl for node " + nodeName, ce) ;
            }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.config.UDDIClerkManager

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.