Examples of BusinessService


Examples of org.apache.juddi.datatype.service.BusinessService

    if ((serviceKey != null) && (connection != null))
    {
      try
      {
        BusinessService service = BusinessServiceTable.select(serviceKey,connection);
        if (service != null)
        {
          info = new ServiceInfo();
          info.setServiceKey(service.getServiceKey());
          info.setBusinessKey(service.getBusinessKey());
          info.setNameVector(ServiceNameTable.select(serviceKey,connection));
        }
      }
      catch(java.sql.SQLException sqlex)
      {
View Full Code Here

Examples of org.apache.ws.scout.model.uddi.v2.BusinessService

        return pa;
    }

  public static BusinessService getBusinessServiceFromJAXRService(
      Service service) throws JAXRException {
    BusinessService bs = objectFactory.createBusinessService();
    try {
      InternationalString iname = service.getName();
           
      addNames(bs.getName(), iname);
          
            InternationalString idesc = service.getDescription();
   
           addDescriptions(bs.getDescription(), idesc);

            Organization o = service.getProvidingOrganization();

            /*
             * there may not always be a key...
             */
            if (o != null) {
                Key k = o.getKey();

        if (k != null && k.getId() != null) {
                    bs.setBusinessKey(k.getId());
                }
                   
      } else {
                /*
                 * gmj - I *think* this is the right thing to do
                 */
        throw new JAXRException(
            "Service has no associated organization");
            }

      if (service.getKey() != null && service.getKey().getId() != null) {
                bs.setServiceKey(service.getKey().getId());
            } else {
                bs.setServiceKey("");
            }

            CategoryBag catBag = getCategoryBagFromClassifications(service.getClassifications());
            if (catBag!=null) {
                bs.setCategoryBag(catBag);
            }

            //Add the ServiceBinding information
            BindingTemplates bt = getBindingTemplates(service.getServiceBindings());
            if (bt != null) {
                bs.setBindingTemplates(bt);
            }
          
            log.debug("BusinessService=" + bs.toString());
    } catch (Exception ud) {
            throw new JAXRException("Apache JAXR Impl:", ud);
        }
        return bs;
    }
View Full Code Here

Examples of org.apache.ws.scout.uddi.BusinessService

        return pa;
    }

  public static BusinessService getBusinessServiceFromJAXRService(
      Service serve) throws JAXRException {
    BusinessService bs = BusinessService.Factory.newInstance();
    try {
      InternationalString iname = ((RegistryObject) serve).getName();
           
      for (LocalizedString locName : iname.getLocalizedStrings()) {
          Name name = bs.addNewName();
          name.setStringValue(locName.getValue());
          name.setLang(locName.getLocale().getLanguage());               
      }
          
            InternationalString idesc = ((RegistryObject) serve).getDescription();
   
            if (idesc != null) {
                for (LocalizedString locName : idesc.getLocalizedStrings()) {
                    Description desc = bs.addNewDescription();
                    desc.setStringValue(locName.getValue());
                    desc.setLang(locName.getLocale().getLanguage());               
                }
            }

            Organization o = serve.getProvidingOrganization();

            /*
             * there may not always be a key...
             */
            if (o != null) {
                Key k = o.getKey();

        if (k != null && k.getId() != null) {
                    bs.setBusinessKey(k.getId());
                }
                   
      } else {
                /*
                 * gmj - I *think* this is the right thing to do
                 */
        throw new JAXRException(
            "Service has no associated organization");
            }

      if (serve.getKey() != null && serve.getKey().getId() != null) {
                bs.setServiceKey(serve.getKey().getId());
            } else {
                bs.setServiceKey("");
            }

            CategoryBag catBag = getCategoryBagFromClassifications(serve.getClassifications());
            if (catBag!=null) {
                bs.setCategoryBag(catBag);
            }

            //Add the ServiceBinding information
            BindingTemplates bt = getBindingTemplates(serve.getServiceBindings());
            if (bt != null) {
                bs.setBindingTemplates(bt);
            }
          
            log.debug("BusinessService=" + bs.toString());
    } catch (Exception ud) {
            throw new JAXRException("Apache JAXR Impl:", ud);
        }
        return bs;
    }
View Full Code Here

Examples of org.springframework.integration.samples.voldemort.service.BusinessService

    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);

    final BusinessService service = context.getBean(BusinessService.class);

    if (LOGGER.isInfoEnabled()) {
      LOGGER.info("\n========================================================="
            + "\n                                                         "
            + "\n    Please press 'q + Enter' to quit the application.    "
            + "\n                                                         "
            + "\n=========================================================" );
    }

    System.out.print("Please enter a string and press <enter>: ");

    final String key = "hello";

    while (true) {

      final String data = scanner.nextLine();

      if("q".equals(data.trim())) {
        break;
      }

      try {

        System.out.println(String.format("Persisting String: '%s' with key '%s'.", data, key));
        service.saveData(key, data);

      } catch (Exception e) {
        LOGGER.error("An exception was caught: " + e);
      }
View Full Code Here

Examples of org.springframework.security.access.annotation.BusinessService

    }

    // SEC-1387
    @Test(expected=AuthenticationCredentialsNotFoundException.class)
    public void targetIsSerializableBeforeUse() throws Exception {
        BusinessService chompedTarget = (BusinessService) serializeAndDeserialize(target);
        chompedTarget.someAdminMethod();
    }
View Full Code Here

Examples of org.springframework.security.access.annotation.BusinessService

            target.someAdminMethod();
        } catch (AuthenticationCredentialsNotFoundException expected) {
        }
        SecurityContextHolder.getContext().setAuthentication(new TestingAuthenticationToken("u","p","ROLE_A"));

        BusinessService chompedTarget = (BusinessService) serializeAndDeserialize(target);
        chompedTarget.someAdminMethod();
    }
View Full Code Here

Examples of org.uddi.api_v2.BusinessService

       
        public static org.uddi.api_v2.BusinessService MapService(org.uddi.api_v3.BusinessService be) {
                if (be == null) {
                        return null;
                }
                BusinessService item = new org.uddi.api_v2.BusinessService();
                item.setCategoryBag(MapCategoryBag(be.getCategoryBag()));
                item.getDescription().addAll(MapDescription(be.getDescription()));
                item.setBusinessKey(be.getBusinessKey());
                item.setServiceKey(be.getServiceKey());
                item.getName().addAll(MapName(be.getName()));
                if (be.getBindingTemplates() != null && !be.getBindingTemplates().getBindingTemplate().isEmpty()) {
                        item.setBindingTemplates(new BindingTemplates());
                        item.getBindingTemplates().getBindingTemplate().addAll(MapBinding(be.getBindingTemplates().getBindingTemplate()));
                }
                return item;
        }
View Full Code Here

Examples of org.uddi.api_v3.BusinessService

  }
  /**
   * Copies the Service from one UDDI to another UDDI.
   */
  public void xRegisterService() {
    BusinessService businessService;
    try {
      businessService = fromClerk.findService(entityKey,fromClerk.getUDDINode().getApiNode());
      log.info("xregister service " + businessService.getName().get(0).getValue() + " + from "
          + fromClerk.getName() + " to " + toClerk.getName());
      businessService.setBindingTemplates(null);
      toClerk.register(businessService,toClerk.getUDDINode().getApiNode());
    } catch (Exception e) {
      log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e);
    }
  }
View Full Code Here

Examples of org.uddi.api_v3.BusinessService

  }
  /**
   * Copies the Service from one UDDI to another UDDI along with all the bindingTemplates.
   */
  public void xRegisterServiceAndBindings() {
    BusinessService businessService;
    try {
      businessService = fromClerk.findService(entityKey,fromClerk.getUDDINode().getApiNode());
      log.info("xregister service " + businessService.getName().get(0).getValue() + " + from "
          + fromClerk.getName() + " to " + toClerk.getName());
      toClerk.register(businessService,toClerk.getUDDINode().getApiNode());
    } catch (Exception e) {
      log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e);
    }
View Full Code Here

Examples of org.uddi.api_v3.BusinessService

                clerk.unRegisterBinding(bindingTemplate.getBindingKey(), clerk.getUDDINode().getApiNode());
              }
            }
            if (removeServiceWithNoBindingTemplates) {
              try {
                BusinessService existingService = clerk.findService(businessService.getServiceKey(), clerk.getUDDINode().getApiNode());
                if (existingService.getBindingTemplates()==null || existingService.getBindingTemplates().getBindingTemplate().size()==0) {
                  clerk.unRegisterService(businessService.getServiceKey(),clerk.getUDDINode().getApiNode());
                }
              } catch (Exception e) {
                log.error(e.getMessage(),e);
              }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.