Package org.apache.juddi.v3.client.compare

Examples of org.apache.juddi.v3.client.compare.TModelInstanceDetailsComparatorTest


        registrationInfo.setPortName(portName);
        registrationInfo.setServiceUrl(serviceUrl);
        registrationInfo.setWsdlUrl(wsdlURL);
        registrationInfo.setWsdlDefinition(wsdlDefinition);
        registrationInfo.setRegistrationType(RegistrationType.BPEL);
        registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
        Thread thread = new Thread(registration);
        thread.start();
      } catch (Exception e) {
        log.error("Unable to register service " + serviceQName
            + " ." + e.getMessage(),e);
View Full Code Here


   * @param wsdlRef
   */
  public void unRegisterBPELEPR(QName serviceName, String portName, URL serviceURL) {
    if (selfRegister) {
      try {
        BPEL2UDDI bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
        String serviceKey = bpel2UDDI.unRegister(serviceName, portName, serviceURL);
        if (registration.getServiceLocator(bpelClerk.getName())!=null) {
          registration.getServiceLocator(bpelClerk.getName()).removeService(serviceKey);
        }
      } catch (Exception e) {
        log.error("Unable to unRegister EPR for " + serviceName
View Full Code Here

  public void registerBPELProcess(QName serviceQName, String version, String portName, URL serviceUrl,
      URL wsdlURL, Definition wsdlDefinition) {
    if (selfRegister) {
     
      try {
        RegistrationInfo registrationInfo = new RegistrationInfo();
        registrationInfo.setServiceQName(serviceQName);
        registrationInfo.setVersion(version);
        registrationInfo.setPortName(portName);
        registrationInfo.setServiceUrl(serviceUrl);
        registrationInfo.setWsdlUrl(wsdlURL);
        registrationInfo.setWsdlDefinition(wsdlDefinition);
        registrationInfo.setRegistrationType(RegistrationType.BPEL);
        registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
        Thread thread = new Thread(registration);
        thread.start();
      } catch (Exception e) {
        log.error("Unable to register service " + serviceQName
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

     public void testAuthToken() {
       try {
         String clazz = UDDIClientContainer.getDefaultTransportClass();
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType securityService = transport.getUDDISecurityService();
             GetAuthToken getAuthToken = new GetAuthToken();
             getAuthToken.setUserID("root");
             getAuthToken.setCred("");
             AuthToken authToken = securityService.getAuthToken(getAuthToken);
             System.out.println(authToken.getAuthInfo());
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.compare.TModelInstanceDetailsComparatorTest

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.