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

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


        private static UDDIClient manager;

        @BeforeClass
        public static void startRegistry() throws ConfigurationException {

                manager = new UDDIClient();
                manager.start();

                try {
                        Transport transport = manager.getTransport();
                        inquiry = transport.getUDDIInquiryService();
View Full Code Here


      return secure(uddiReq, nodeName, clientName);
  }

  public Node secure(Element uddiReq, String nodeName, String clientName) throws Exception
  {
      UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
      String clazz = client.getClientConfig().getUDDINode(nodeName).getProxyTransport();
            Class<?> transportClass = ClassUtil.forName(clazz, this.getClass());
            Transport transport = (Transport) transportClass.getConstructor(String.class, String.class).newInstance(clientName, nodeName);
      UDDISecurityPortType security = transport.getUDDISecurityService();

      //new RequestHandler on it's own thread
View Full Code Here

                manager.stop();
        }

        @BeforeClass
        public static void startManager() throws ConfigurationException {
                manager = new UDDIClient();
                manager.start();

                logger.debug("Getting auth tokens..");
                try {
                        Transport transport = manager.getTransport();
View Full Code Here

    @Test
    public void Test1_NoAutoRegister() throws Exception {
        log.info("Test1_NoAutoRegister");

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");
        // TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:org.apache.juddi:test:keygenerator", "Test domain", "en");
        //clerk.register(createKeyGenator);
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        Assert.assertNotNull(start);
        Assert.assertNotNull(start);
        //Assert.assertNotNull(start.getBindingKey());
        SubscriptionCallbackListener.stop(c, "default", start.getBindingKey());
        c.stop();

    }
View Full Code Here

    @Test
    public void Test2_NoAutoRegisterAndShortCircuitReceive() throws Exception {
        log.info("Test2_NoAutoRegisterAndShortCircuitReceive");
        Test2_NoAutoRegisterAndShortCircuitReceive_ = false;
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");
        // TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:org.apache.juddi:test:keygenerator", "Test domain", "en");
        //clerk.register(createKeyGenator);
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        Assert.assertNotNull(start);
        //Assert.assertNotNull(start.getBindingKey());
        SubscriptionCallbackListener.registerCallback(this);
        Assert.assertNotNull(SubscriptionCallbackListener.getInstance());
        SubscriptionCallbackListener.getInstance().notifySubscriptionListener(new NotifySubscriptionListener());

        SubscriptionCallbackListener.stop(c, "default", start.getBindingKey());
        c.stop();
        Assert.assertTrue(Test2_NoAutoRegisterAndShortCircuitReceive_);
    }
View Full Code Here

    }

    @Test(expected = ServiceAlreadyStartedException.class)
    public void Test3_StartWhenAlreadyStarted() throws Exception {
        log.info("Test3_StartWhenAlreadyStarted");
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");
        // TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:org.apache.juddi:test:keygenerator", "Test domain", "en");
        //clerk.register(createKeyGenator);
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        try {
            BindingTemplate start1 = SubscriptionCallbackListener.start(c, "default");
        } catch (ServiceAlreadyStartedException x) {
            SubscriptionCallbackListener.stop(c, "default", null);
            c.stop();
            throw x;
        }


    }
View Full Code Here

    @Test
    public void Test4_NotifyEndpointStopped() throws Exception {
        log.info("Test4_NotifyEndpointStopped");
        //reset
        Test4_NotifyEndpointStopped_ = false;
        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        c.start();
        UDDIClerk clerk = c.getClerk("default");

        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        SubscriptionCallbackListener.registerCallback(this);

        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
        Assert.assertTrue(Test4_NotifyEndpointStopped_);


    }
View Full Code Here

    @Test
    public void Test5_RegisterNullCallback() throws ConfigurationException {
        log.info("Test5_RegisterNullCallback");

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");
        SubscriptionCallbackListener.registerCallback(null);

        SubscriptionCallbackListener.unRegisterCallback(null);

        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
    }
View Full Code Here

    @Test
    public void Test6_UnRegisterUnRegisteredCallback() throws ConfigurationException, ServiceAlreadyStartedException {
        log.info("Test6_UnRegisterUnRegisteredCallback");

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.xml");

        SubscriptionCallbackListener.unregisterAllCallbacks();

        SubscriptionCallbackListener.unRegisterCallback(new ISubscriptionCallback() {
            @Override
            public void HandleCallback(SubscriptionResultsList body) {
            }

            @Override
            public void NotifyEndpointStopped() {
            }
        });

        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
    }
View Full Code Here

    @Test
    public void Test7_NullCallbackAddress() throws Exception {
        log.info("Test7_NullCallbackAddress");

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback2.xml");
        BindingTemplate start = SubscriptionCallbackListener.start(c, "default");
        Assert.assertNotNull(start);
        Assert.assertNotNull(SubscriptionCallbackListener.getCallbackURL());
        Assert.assertNotNull(start.getAccessPoint());
        Assert.assertNotNull(start.getAccessPoint().getValue());
        log.log(Level.INFO, "AP url: {0} EP url: {1}", new Object[]{start.getAccessPoint().getValue(), SubscriptionCallbackListener.getCallbackURL()});
        Assert.assertEquals(start.getAccessPoint().getValue(), SubscriptionCallbackListener.getCallbackURL());
        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
    }
View Full Code Here

TOP

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

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.