Package org.apache.juddi.v3.client.transport

Examples of org.apache.juddi.v3.client.transport.Transport


                clerkManager.start();
                UDDIClerk clerk = clerkManager.getClerk(name);
                // a ClerkManager can be a client to multiple UDDI nodes, so
                // supply the nodeName (defined in your uddi.xml.
                // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
                Transport transport = clerkManager.getTransport(name);
                // Now you create a reference to the UDDI API
                security = transport.getUDDISecurityService();
                publish = transport.getUDDIPublishService();
                inquiry = transport.getUDDIInquiryService();
                juddi = transport.getJUDDIApiService();
                String token = null;
                if (username == null || pass == null) {
                        username = clerk.getPublisher();
                        pass = clerk.getPassword();
                }
View Full Code Here


 
  public static Transport getTransport(ServletContext servletContext)
       throws ConfigurationException, ClassNotFoundException, IllegalArgumentException,
        SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
  {
    Transport transport = (Transport) servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT);
    if (transport==null) {
      UDDIClient client = getUDDIClient(servletContext);
      UDDINode node = client.getClientConfig().getHomeNode();
      Class<?> transportClass = ClassUtil.forName(node.getProxyTransport(), Transport.class);
      transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(client.getName(),node.getName());
View Full Code Here

 
  public static Transport getTransport(ServletContext servletContext, UDDINode remoteNode)
     throws ConfigurationException, ClassNotFoundException, IllegalArgumentException,
      SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
  {
    Transport transport = (Transport) servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT + "-" + remoteNode.getName());
    if (transport==null) {
      UDDIClient manager = getUDDIClient(servletContext);
      Class<?> transportClass = ClassUtil.forName(remoteNode.getProxyTransport(), Transport.class);
      transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(manager.getName(),remoteNode.getName());
      servletContext.setAttribute(JUDDI_CLIENT_TRANSPORT + "-" + remoteNode.getName(), transport);
View Full Code Here

    try {
      String clazz = clientConfig.getHomeNode().getProxyTransport();
      String managerName = clientConfig.getClientName();
      Class<?> transportClass = ClassUtil.forName(clazz, UDDIClient.class);
      if (transportClass!=null) {
        Transport transport = (Transport)
            transportClass.getConstructor(String.class,String.class).newInstance(managerName,nodeName);
        return transport;
      } else {
        throw new ConfigurationException ("ProxyTransport was not defined in the " + clientConfig.getConfigurationFile());
      }
View Full Code Here

          // you can use your config file name
          UDDIClient uddiClient = new UDDIClient("META-INF/hello-world-uddi.xml");
          // a UddiClient can be a client to multiple UDDI nodes, so
          // supply the nodeName (defined in your uddi.xml.
          // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
          Transport transport = uddiClient.getTransport("default");
          // Now you create a reference to the UDDI API
      security = transport.getUDDISecurityService();
    } catch (Exception e) {
      e.printStackTrace();
   
  }
View Full Code Here

          // you can use your config file name
          UDDIClient uddiClient = new UDDIClient("META-INF/simple-publish-uddi.xml");
          // a UddiClient can be a client to multiple UDDI nodes, so
          // supply the nodeName (defined in your uddi.xml.
          // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
          Transport transport = uddiClient.getTransport("default");
          // Now you create a reference to the UDDI API
          security = transport.getUDDISecurityService();
      juddiApi = transport.getJUDDIApiService();
      publish = transport.getUDDIPublishService()
    } catch (Exception e) {
      e.printStackTrace();
   
  }
View Full Code Here

          // you can use your config file name
          UDDIClient client = new UDDIClient("META-INF/simple-browse-uddi.xml");
          // a UDDIClient can be a client to multiple UDDI nodes, so
          // supply the nodeName (defined in your uddi.xml.
          // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
          Transport transport = client.getTransport("default");
          // Now you create a reference to the UDDI API
            security = transport.getUDDISecurityService();
            inquiry = transport.getUDDIInquiryService();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

        // you can use your config file name
        UDDIClient uddiClient = new UDDIClient("META-INF/partition-uddi.xml");
        // a UddiClient can be a client to multiple UDDI nodes, so
        // supply the nodeName (defined in your uddi.xml.
        // The transport can be WS, inVM, RMI etc which is defined in the uddi.xml
        Transport transport = uddiClient.getTransport("default");
        // Now you create a reference to the UDDI API
 
          security = transport.getUDDISecurityService();
          publish = transport.getUDDIPublishService();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

        String subscriptionKey = getSubscriptionResult.getSubscriptionKey();
        Clerk fromClerk = clientSubscriptionInfoMap.get(subscriptionKey).getFromClerk();
        Clerk toClerk = clientSubscriptionInfoMap.get(subscriptionKey).getToClerk();
        String clazz = fromClerk.getNode().getProxyTransport();
        Class<?> transportClass = ClassUtil.forName(clazz, this.getClass());
        Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance(fromClerk.getNode().getName());
        UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService(fromClerk.getNode().getSubscriptionUrl());
        SubscriptionResultsList list = subscriptionService.getSubscriptionResults(getSubscriptionResult);
       
        JAXBContext context = JAXBContext.newInstance(list.getClass());
        Marshaller marshaller = context.createMarshaller();
        StringWriter sw = new StringWriter();
View Full Code Here

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

                logger.debug("Getting auth tokens..");
                try {
                        Transport transport = manager.getTransport();
                        UDDISecurityPortType security = transport.getUDDISecurityService();
                        authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                        authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());

                        //Assert.assertNotNull(authInfoJoe);
                        UDDISubscriptionPortType subscription = transport.getUDDISubscriptionService();

                        publicationJoe = transport.getUDDIPublishService();
                        UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();

                        if (!TckPublisher.isUDDIAuthMode()) {
                                TckSecurity.setCredentials((BindingProvider) publicationJoe, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                                TckSecurity.setCredentials((BindingProvider) subscription, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                        }

                        tckTModelJoe = new TckTModel(publicationJoe, inquiry);
                        tckBusinessJoe = new TckBusiness(publicationJoe, inquiry);
                        tckBusinessServiceJoe = new TckBusinessService(publicationJoe, inquiry);
                        tckBindingTemplateJoe = new TckBindingTemplate(publicationJoe, inquiry);
                        subscriptionJoe = subscription;
                        tckSubscriptionJoe = new TckSubscription(subscription, security, inquiry);


                        transport = manager.getTransport();
                        publicationSam = transport.getUDDIPublishService();
                        inquiry = transport.getUDDIInquiryService();
                        subscription = transport.getUDDISubscriptionService();
                        if (!TckPublisher.isUDDIAuthMode()) {
                                TckSecurity.setCredentials((BindingProvider) publicationSam, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
                                TckSecurity.setCredentials((BindingProvider) subscription, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getSamPublisherId(), TckPublisher.getSamPassword());
                        }
                        tckTModelSam = new TckTModel(publicationSam, inquiry);
                        tckBusinessSam = new TckBusiness(publicationSam, inquiry);
                        tckBusinessServiceSam = new TckBusinessService(publicationSam, inquiry);
                        //tckBindingTemplateSam = new TckBindingTemplate(publicationSam, inquiry);
                        tckSubscriptionSam = new TckSubscription(subscription, security, inquiry);


                        String authInfoUDDI = TckSecurity.getAuthToken(security, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
                        transport = manager.getTransport();
                        UDDIPublicationPortType publication = transport.getUDDIPublishService();
                        inquiry = transport.getUDDIInquiryService();

                        if (!TckPublisher.isUDDIAuthMode()) {
                                TckSecurity.setCredentials((BindingProvider) publication, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());

                                TckSecurity.setCredentials((BindingProvider) inquiry, TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword());
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.transport.Transport

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.