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

Examples of org.apache.juddi.v3.client.mapping.wsdl.ReadWSDL


            System.out.println("Skipping test for a remote WSDL due to connectivity problems");
        }


        org.junit.Assume.assumeTrue(b);
        ReadWSDL readWSDL = new ReadWSDL();
        Definition definition = null;
        try {
            definition = readWSDL.readWSDL(new URL("http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl"));
            Assert.assertNotNull(definition);
        } catch (UnknownHostException ex) {
        }

View Full Code Here


    }

    @Test
    public void readFromJar() throws WSDLException, URISyntaxException, Exception {

        ReadWSDL readWSDL = new ReadWSDL();
        Definition definition = readWSDL.readWSDL("uddi_v3_service.wsdl");
        Assert.assertNotNull(definition);
    }
View Full Code Here

      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");
      properties.put(org.apache.juddi.v3.client.config.Property.BUSINESS_KEY, "uddi:uddi.joepublisher.com:businessone");
      properties.put("nodeName", "api.example.org_80");
      WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(clerk, urlLocalizer, properties);
View Full Code Here

                //step three, we have two options
                //1) import the wsdl's services into a brand new business
                //2) import the wsdl's services into an existing business
                //in either case, we're going to have to parse the WSDL
                ReadWSDL rw = new ReadWSDL();
                Definition wsdlDefinition = null;
                if (pathOrURL.startsWith("http")) {
                        wsdlDefinition = rw.readWSDL(new URL(pathOrURL));
                } else {
                        wsdlDefinition = rw.readWSDL(pathOrURL);
                }

                if (wsdlDefinition == null) {
                        System.out.println("There was an error parsing the WSDL!");
                        return;
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

      String authToken = (String) session.getAttribute("token-" + modelSubscription.getFromClerkName());
      getSubscriptionResults.setAuthInfo(authToken);
            SyncSubscription syncSubscription = new SyncSubscription();
            syncSubscription.getGetSubscriptionResultsList().add(getSubscriptionResults);
     
          Transport transport = WebHelper.getTransport(session.getServletContext());
             JUDDIApiPortType apiService = transport.getJUDDIApiService();
     
             syncSubscription.setAuthInfo(userAuthToken);
             SyncSubscriptionDetail detail = apiService.invokeSyncSubscription(syncSubscription);
      SubscriptionResultsList list = detail.getSubscriptionResultsList().get(0);
      System.out.println("list=" + list);
View Full Code Here

    }
    logger.debug("Getting auth tokens..");
    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoTom = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
             Assert.assertNotNull(authInfoTom);
            
             UDDIPublicationPortType publication = transport.getUDDIPublishService();
             inquiry = transport.getUDDIInquiryService();
            
             tckTModel  = new TckTModel(publication, inquiry);
             tckTModel01 = new TckTModel(publication, inquiry);
             tckTModel02 = new TckTModel(publication, inquiry);
             tckBusiness = new TckBusiness(publication, inquiry);
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.mapping.wsdl.ReadWSDL

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.