Package org.uddi.api_v2

Examples of org.uddi.api_v2.SaveService


  public void deleteSamSyndicatorServices(String authInfoSam, int businessInt, int numberOfCopies) {
    deleteServices(authInfoSam, businessInt, SAM_SERVICE_KEY, numberOfCopies);
  }
 
  public void saveServices(String authInfo, int businessInt, String serviceXML, String serviceKey, int numberOfCopies, String parentBusinessKey) {
    SaveService ss = null;
    try {
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
      String serviceName = bsIn.getName().get(0).getValue();
      String bindingKey = bsIn.getBindingTemplates().getBindingTemplate().get(0).getBindingKey();
      for (int i=0; i<numberOfCopies; i++) {
          // save the entity
        ss = new SaveService();
        ss.setAuthInfo(authInfo);
        bsIn.getName().get(0).setValue(serviceName + "-" + i);
        bsIn.setBusinessKey(parentBusinessKey);
        bsIn.setServiceKey(serviceKey + "-" + businessInt + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setBindingKey(bindingKey + "-" + businessInt + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setServiceKey(serviceKey + "-" + businessInt + "-" + i);
        ss.getBusinessService().add(bsIn);
       
        BindingTemplate bt = bsIn.getBindingTemplates().getBindingTemplate().get(0);
        if (! bt.getServiceKey().equals(serviceKey + "-" + businessInt + "-" + i)) {
          System.out.println("not the same");
        }
View Full Code Here


 
  public String saveService(String authInfo, String serviceXML, String serviceKey, String description) {
    try {
                        logger.info("saving service key " + serviceKey + " from " + serviceXML);
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
     
      if (description!=null) bsIn.getDescription().get(0).setValue("updated description");
        ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

  }
 
  public void saveService2(String authInfo, String serviceKey, String serviceXML2,  String serviceKey2) {
    try {
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML2, "org.uddi.api_v3");
      ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

    businessService.setBindingTemplates(bindingTemplates);
    businessService.getName().add(name);
    businessService.getDescription().add(description);

    //Pass service to the SaveService object and publish
    SaveService saveService = new SaveService();
    saveService.setAuthInfo(authenticationToken.getAuthInfo());
    saveService.getBusinessService().add(businessService);

    // execute the SaveService operation and get back the ServiceDetail
    serviceDetail = publishService.saveService(saveService);

   
View Full Code Here

   *
   * @exception RegistryV3Exception;
   */
  public ServiceDetail saveService(String authInfo,
      BusinessService[] serviceArray) throws RegistryV3Exception {
    SaveService request = this.objectFactory.createSaveService();

    if (authInfo != null) {
      request.setAuthInfo(authInfo);
    }

    if (serviceArray != null) {
      request.getBusinessService().addAll(Arrays.asList(serviceArray));
    }

        ServiceDetail sd = null;
        JAXBElement<?> o = execute(this.objectFactory.createSaveService(request),
            this.getPublishURI());
View Full Code Here

  public void deleteSamSyndicatorServices(String authInfoSam, int businessInt, int numberOfCopies) {
    deleteServices(authInfoSam, businessInt, SAM_SERVICE_KEY, numberOfCopies);
  }
 
  public void saveServices(String authInfo, int businessInt, String serviceXML, String serviceKey, int numberOfCopies) {
    SaveService ss = null;
    try {
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
      String serviceName = bsIn.getName().get(0).getValue();
      String bindingKey = bsIn.getBindingTemplates().getBindingTemplate().get(0).getBindingKey();
      for (int i=0; i<numberOfCopies; i++) {
          // save the entity
        ss = new SaveService();
        ss.setAuthInfo(authInfo);
        bsIn.getName().get(0).setValue(serviceName + "-" + i);
        bsIn.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY + "-" + businessInt);
        bsIn.setServiceKey(serviceKey + "-" + businessInt + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setBindingKey(bindingKey + "-" + businessInt + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setServiceKey(serviceKey + "-" + businessInt + "-" + i);
        ss.getBusinessService().add(bsIn);
       
        BindingTemplate bt = bsIn.getBindingTemplates().getBindingTemplate().get(0);
        if (! bt.getServiceKey().equals(serviceKey + "-" + businessInt + "-" + i)) {
          System.out.println("not the same");
        }
View Full Code Here

  }
 
  public void saveService(String authInfo, String serviceXML, String serviceKey, String description) {
    try {
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML, "org.uddi.api_v3");
     
      if (description!=null) bsIn.getDescription().get(0).setValue("updated description");
        ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

  }
 
  public void saveService2(String authInfo, String serviceKey, String serviceXML2,  String serviceKey2) {
    try {
      // First save the entity
      SaveService ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(serviceXML2, "org.uddi.api_v3");
      ss.getBusinessService().add(bsIn);
      publication.saveService(ss);
     
      // Now get the entity and check the values
      GetServiceDetail gs = new GetServiceDetail();
      gs.getServiceKey().add(serviceKey);
View Full Code Here

    BusinessService businessService=null;
    log.info("Registering service " + service.getName().get(0).getValue()
        + " with key " + service.getServiceKey());
    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveService saveService = new SaveService();
      saveService.setAuthInfo(authToken);
      saveService.getBusinessService().add(service);
      ServiceDetail serviceDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveService(saveService);
      businessService = serviceDetail.getBusinessService().get(0);
      if (log.isDebugEnabled()) log.debug("Registering service " + service.getName().get(0).getValue() + " completed.");
    } catch (Exception e) {
      log.error("Unable to register service " + service.getName().get(0).getValue()
View Full Code Here

  }
 
  public void saveService(String authInfo, String listenerService, Integer port) {
    try {
      // First save the entity
      ss = new SaveService();
      ss.setAuthInfo(authInfo);
     
      org.uddi.api_v3.BusinessService bsIn = (org.uddi.api_v3.BusinessService)EntityCreator.buildFromDoc(listenerService, "org.uddi.api_v3");
      if (port > 0) {
        for (BindingTemplate btIn: bsIn.getBindingTemplates().getBindingTemplate()) {
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.SaveService

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.