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

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


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

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback3.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


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

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.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.registerCallback(new ISubscriptionCallback() {
            @Override
            public void HandleCallback(SubscriptionResultsList body) {
                log.info("bogus callback received");
            }

            @Override
            public void NotifyEndpointStopped() {
                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }
        });
        SubscriptionCallbackListener.getInstance().notifySubscriptionListener(new NotifySubscriptionListener());
        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
    }
View Full Code Here

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

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.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.registerCallback(new ISubscriptionCallback() {
            @Override
            public void HandleCallback(SubscriptionResultsList body) {
                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }

            @Override
            public void NotifyEndpointStopped() {
                log.info("bogus callback received");

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

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

        UDDIClient c = new UDDIClient("META-INF/uddi-subcallback1.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);
        SubscriptionCallbackListener.stop(c, "default", null);
        c.stop();
        c.stop();
    }
View Full Code Here

 
  public UDDIInquiryPortType getUDDIInquiryService(String endpointURL) throws TransportException {
    if (inquiryService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getInquiryUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        inquiryService = (UDDIInquiryPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
View Full Code Here

 
  public UDDISecurityPortType getUDDISecurityService(String endpointURL) throws TransportException {
    if (securityService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getSecurityUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        securityService = (UDDISecurityPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
View Full Code Here

 
  public UDDIPublicationPortType getUDDIPublishService(String endpointURL) throws TransportException {
    if (publishService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getPublishUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        publishService = (UDDIPublicationPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
View Full Code Here

 
  public UDDISubscriptionPortType getUDDISubscriptionService(String endpointURL) throws TransportException {
    if (subscriptionService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getSubscriptionUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        subscriptionService = (UDDISubscriptionPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
View Full Code Here

 
  public UDDISubscriptionListenerPortType getUDDISubscriptionListenerService(String endpointURL) throws TransportException {
    if (subscriptionListenerService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getSubscriptionListenerUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        subscriptionListenerService = (UDDISubscriptionListenerPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
View Full Code Here

 
  public UDDICustodyTransferPortType getUDDICustodyTransferService(String endpointURL) throws TransportException {
    if (custodyTransferService==null) {
      try {
        if (endpointURL==null) {
          UDDIClient client = UDDIClientContainer.getUDDIClient(clientName);
          endpointURL = client.getClientConfig().getUDDINode(nodeName).getCustodyTransferUrl();
        }
        Class<?> c = Class.forName(endpointURL);
        custodyTransferService = (UDDICustodyTransferPortType) c.newInstance();
      } catch (Exception e) {
        throw new TransportException(e.getMessage(), e);
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.