Package org.apache.juddi.v3.client.mapping

Examples of org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl


                }
        }

        @Test
        public void test_3_2_3_UDDI_businessService_and_bindingTemplate() throws JAXBException, IOException, ConfigurationException {
                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);

                BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
                PrintUDDI<BusinessService> servicePrinter = new PrintUDDI<BusinessService>();

                Assert.assertEquals(1, businessServices.getBusinessService().size());
View Full Code Here


        }

        @Test
        public void test_3_2_3_UDDI_businessService_and_bindingTemplateLongDescriptions() throws JAXBException, IOException, ConfigurationException {
                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);

                BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinitionLongDescriptions);
                PrintUDDI<BusinessService> servicePrinter = new PrintUDDI<BusinessService>();

                Assert.assertEquals(1, businessServices.getBusinessService().size());
View Full Code Here

      tckTModel.saveJoePublisherTmodel(authInfoJoe);
      tckBusiness.saveJoePublisherBusiness(authInfoJoe);
     
      UDDIClerk clerk = new UDDIClient("META-INF/uddi.xml").getClerk("joe");
      Properties properties = clerk.getUDDINode().getProperties();
      URLLocalizer urlLocalizer = new URLLocalizerDefaultImpl();
     
      //get the wsdl
      Definition wsdlDefinition = new ReadWSDL().readWSDL("wsdl/sample.wsdl");
      //set required properties
      properties.put("keyDomain", "uddi.joepublisher.com");
View Full Code Here

         * @throws ConfigurationException
         */
        public synchronized ServiceLocator getServiceLocator(String clerkName) throws ConfigurationException {
                UDDIClerk clerk = getClerk(clerkName);
                if (!serviceLocators.containsKey(clerk.getName())) {
                        ServiceLocator serviceLocator = new ServiceLocator(clerk, new URLLocalizerDefaultImpl(), properties);
                        serviceLocators.put(clerk.getName(), serviceLocator);
                }
                return serviceLocators.get(clerk.getName());
        }
View Full Code Here

                properties.put("keyDomain", domain);
                properties.put("businessName", domain);
                properties.put("serverName", url.getHost());
                properties.put("serverPort", url.getPort());
                //wsdlURL = wsdlDefinition.getDocumentBaseURI();
                WADL2UDDI wadl2UDDI = new WADL2UDDI(null, new URLLocalizerDefaultImpl(), properties);

                BusinessService businessServices = wadl2UDDI.createBusinessService(new QName(domain, domain), app);

                Set<TModel> portTypeTModels = wadl2UDDI.createWADLPortTypeTModels(pathOrURL, app);
View Full Code Here

                properties.put("keyDomain", domain);
                properties.put("businessName", domain);
                properties.put("serverName", domain);
                properties.put("serverPort", port);
                wsdlURL = wsdlDefinition.getDocumentBaseURI();
                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizerDefaultImpl(), properties);
                BusinessServices businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
                @SuppressWarnings("unchecked")
                Map<QName, PortType> portTypes = (Map<QName, PortType>) wsdlDefinition.getAllPortTypes();
                Set<TModel> portTypeTModels = wsdl2UDDI.createWSDLPortTypeTModels(wsdlURL, portTypes);
                Map allBindings = wsdlDefinition.getAllBindings();
View Full Code Here

    }
    logger.debug("Getting subscriber proxy..");
    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID, TckPublisher.JOE_PUBLISHER_CRED);
             Assert.assertNotNull(authInfoJoe);
             authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID, TckPublisher.SAM_SYNDICATOR_CRED);
             Assert.assertNotNull(authInfoSam);
            
             publication = transport.getUDDIPublishService();
             UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
             UDDISubscriptionPortType subscription = transport.getUDDISubscriptionService();
            
             tckTModel  = new TckTModel(publication, inquiry);
             tckBusiness = new TckBusiness(publication, inquiry);
             tckBusinessService = new TckBusinessService(publication, inquiry);
             tckSubscriptionListener = new TckSubscriptionListener(subscription, publication)
View Full Code Here

    modelNode.setDescription(node.getDescription());
    try {
      UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(clerk.getManagerName());
      String clazz = manager.getClientConfig().getUDDINode(clerk.getUDDINode().getName()).getProxyTransport();
      Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
      Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(clerk.getManagerName(),clerk.getUDDINode().getName())
      String authToken = (String) session.getAttribute("token-" + clerk.getName());

      UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
      List<org.uddi.sub_v3.Subscription> subscriptions = subscriptionService.getSubscriptions(authToken);
      for (org.uddi.sub_v3.Subscription subscription : subscriptions) {
        String expiresAfter = null;
        if (subscription.getExpiresAfter()!=null) expiresAfter = subscription.getExpiresAfter().toString();
        String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(subscription.getSubscriptionFilter()), "org.uddi.sub_v3");
View Full Code Here

          }
        }
      }
     
      logger.info("Updating homeNode server using jUDDI specific API..");
      Transport defaultTransport = WebHelper.getTransport(session.getServletContext());
      JUDDIApiPortType juddiApiService = defaultTransport.getJUDDIApiService();
     
      //making sure our node info is there and up to date.
      SaveNode saveNode = new SaveNode();
      saveNode.setAuthInfo(userAuthToken);
      saveNode.getNode().add(clerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveClerk = new SaveClerk();
      saveClerk.setAuthInfo(userAuthToken);
      saveClerk.getClerk().add(clerk.getApiClerk());
      juddiApiService.saveClerk(saveClerk);
      //making sure our node info is there and up to date.
      SaveNode saveToNode = new SaveNode();
      saveToNode.setAuthInfo(userAuthToken);
      saveToNode.getNode().add(toClerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveToNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveToClerk = new SaveClerk();
      saveToClerk.setAuthInfo(userAuthToken);
      saveToClerk.getClerk().add(toClerk.getApiClerk());
      juddiApiService.saveClerk(saveToClerk);
      logger.debug("Updating default UDDI server completed.");
     
      SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
      saveClientSubscriptionInfo.setAuthInfo(userAuthToken);
      ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
      clientSubscriptionInfo.setSubscriptionKey(modelSubscription.getSubscriptionKey());
      clientSubscriptionInfo.setFromClerk(clerk.getApiClerk());
      clientSubscriptionInfo.setToClerk(toClerk.getApiClerk());
     
      saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo);
      //save clientSubscription to the listening UDDI default server.
      juddiApiService.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
      logger.debug("Saved ClientSubscriptionInfo to the default UDDI server");
     
      //the listening server is ready; now add the subscription
      Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
      UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
      List<org.uddi.sub_v3.Subscription> subscriptionList = new ArrayList<org.uddi.sub_v3.Subscription>();
      org.uddi.sub_v3.Subscription subscription = new org.uddi.sub_v3.Subscription();
      if (!"".equals(modelSubscription.getBindingKey())) {
        subscription.setBindingKey(modelSubscription.getBindingKey());
      }
View Full Code Here

    try {
   
      try {
        UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
        UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
        Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
        UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
        DeleteSubscription deleteSubscription = new DeleteSubscription();
        String authToken = (String) session.getAttribute("token-" + clerk.getName());
        deleteSubscription.setAuthInfo(authToken);
        deleteSubscription.getSubscriptionKey().add(modelSubscription.getSubscriptionKey());
        subscriptionService.deleteSubscription(deleteSubscription);
        logger.info("Deleted Subscription " + modelSubscription.getSubscriptionKey()
            + " from UDDI server " + clerk.getUDDINode().getName());
      } catch (Exception e) {
        error = "Could not delete subscription. Reason: " + e.getMessage();
        logger.error(error, e);
      }
      try {
        //now remove it from the listener UDDI server too
        Transport transport = WebHelper.getTransport(session.getServletContext());
        JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
       
        DeleteClientSubscriptionInfo deleteClientSubscriptionInfo = new DeleteClientSubscriptionInfo();
        deleteClientSubscriptionInfo.setAuthInfo(userAuthToken);
        deleteClientSubscriptionInfo.getSubscriptionKey().add(modelSubscription.getSubscriptionKey());
        //remove the clientSubscription to the listening UDDI default server.
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.mapping.URLLocalizerDefaultImpl

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.