Package org.uddi.api_v2

Examples of org.uddi.api_v2.SaveBusiness


                return r;
        }
       
        private static TModelInstanceDetails MapTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails tModelInstanceDetails) {
                if (tModelInstanceDetails == null) {
                        return new TModelInstanceDetails();
                }
                TModelInstanceDetails r = new TModelInstanceDetails();
                r.getTModelInstanceInfo().addAll(MapTModelInstanceInfo(tModelInstanceDetails.getTModelInstanceInfo()));
                return r;
        }
View Full Code Here


                List<TModelInstanceInfo> r = new ArrayList<TModelInstanceInfo>();
                if (tModelInstanceInfo == null) {
                        return r;
                }
                for (int i = 0; i < tModelInstanceInfo.size(); i++) {
                        TModelInstanceInfo t = new TModelInstanceInfo();
                        t.setTModelKey(tModelInstanceInfo.get(i).getTModelKey());
                        t.getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getDescription()));
                        if (tModelInstanceInfo.get(i).getInstanceDetails() != null) {
                                t.setInstanceDetails(new InstanceDetails());
                                t.getInstanceDetails().getDescription().addAll(MapDescription(tModelInstanceInfo.get(i).getInstanceDetails().getDescription()));
                                t.getInstanceDetails().setInstanceParms(StringEscapeUtils.escapeXml(tModelInstanceInfo.get(i).getInstanceDetails().getInstanceParms()));
                                t.getInstanceDetails().setOverviewDoc(MapOverviewDoc(tModelInstanceInfo.get(i).getInstanceDetails().getOverviewDoc()));
                        }
                        r.add(t);
                }
                return r;
        }
View Full Code Here

                return r;
               
        }
       
        public static TModelList MapTModelListElement(org.uddi.api_v3.TModelList findTModel, String operator) {
                TModelList r = new TModelList();
                r.setGeneric(VERSION);
                r.setOperator(operator);
                r.setTModelInfos(new TModelInfos());
                if (findTModel == null) {
                        r.setTruncated(Truncated.FALSE);
                        return r;
                }
               
                if (findTModel.isTruncated() != null && findTModel.isTruncated()) {
                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                if (findTModel.getTModelInfos() != null) {
                       
                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(findTModel.getTModelInfos().getTModelInfo()));
                }
               
                return r;
        }
View Full Code Here

    BusinessEntity businessEntity=null;
    log.info("Registering business " + business.getName().get(0).getValue()
        + " with key " + business.getBusinessKey());
    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveBusiness saveBusiness = new SaveBusiness();
      saveBusiness.setAuthInfo(authToken);
      saveBusiness.getBusinessEntity().add(business);
      BusinessDetail businessDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBusiness(saveBusiness);
      businessEntity = businessDetail.getBusinessEntity().get(0);
    } catch (Exception e) {
      log.error("Unable to register business " + business.getName().get(0).getValue()
          + " ." + e.getMessage(),e);
View Full Code Here

  public void saveBusinesses(String authInfo, String businessXML, String businessKey, int numberOfCopies) {
    try {     
      BusinessEntity beIn = (BusinessEntity)EntityCreator.buildFromDoc(businessXML, "org.uddi.api_v3");
      String businessName = beIn.getName().get(0).getValue();
      for (int i=0; i<numberOfCopies; i++) {
        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authInfo);
        beIn.getName().get(0).setValue(businessName + "-" + i);
        beIn.setBusinessKey(businessKey + "-" + i);
        sb.getBusinessEntity().add(beIn);
        publication.saveBusiness(sb);
        logger.debug("Saved business with key " + businessName + "-" + i);
      }
     
    } catch(Throwable e) {
View Full Code Here

    }
  }
   
  public void saveBusiness(String authInfo, String businessXML, String businessKey) {
    try {
      SaveBusiness sb = new SaveBusiness();
      sb.setAuthInfo(authInfo);

     
      BusinessEntity beIn = (BusinessEntity)EntityCreator.buildFromDoc(businessXML, "org.uddi.api_v3");
      sb.getBusinessEntity().add(beIn);
      publication.saveBusiness(sb);
 
      // Now get the entity and check the values
      GetBusinessDetail gb = new GetBusinessDetail();
      gb.getBusinessKey().add(businessKey);
View Full Code Here

      BusinessEntity beOut = beOutList.get(0);
      //We are expecting 2 services
      assertEquals(2,beOut.getBusinessServices().getBusinessService().size());
     
      //Now updating the business by adding another description
      SaveBusiness sb = new SaveBusiness();
      sb.setAuthInfo(authInfo);
      BusinessEntity beIn = beOut;
      Description desc2= new Description();
      desc2.setLang("nl");
      desc2.setValue("Omschrijving");
      beIn.getDescription().add(desc2);
      sb.getBusinessEntity().add(beIn);
      publication.saveBusiness(sb);
 
      // Now get the entity and check the values
      BusinessDetail bdnew = inquiry.getBusinessDetail(gb);
      List<BusinessEntity> beOutListNew = bdnew.getBusinessEntity();
View Full Code Here

        }
        if (method.equalsIgnoreCase("saveBinding")) {
            JAXB.marshal(new SaveBinding(), sw);
        }
        if (method.equalsIgnoreCase("saveBusiness")) {
            JAXB.marshal(new SaveBusiness(), sw);
        }
        if (method.equalsIgnoreCase("saveTModel")) {
            JAXB.marshal(new SaveTModel(), sw);
        }
        if (method.equalsIgnoreCase("saveService")) {
View Full Code Here

    businessEntity.getName().add(name);
    businessEntity.getDescription().add(description);
    businessEntity.setContacts(contacts);
       
    //Pass Entity to SaveBussiness object and publish.
    SaveBusiness saveBusiness = new SaveBusiness();
    saveBusiness.setAuthInfo(authenticationToken.getAuthInfo());
    saveBusiness.getBusinessEntity().add(businessEntity);
   
    //Business Details are returned.
    businessDetail = publishService.saveBusiness(saveBusiness);
   
  }
View Full Code Here

        public void saveBusinesses(String authInfo, String businessXML, String businessKey, int numberOfCopies) {
                try {
                        BusinessEntity beIn = (BusinessEntity) EntityCreator.buildFromDoc(businessXML, "org.uddi.api_v3");
                        String businessName = beIn.getName().get(0).getValue();
                        for (int i = 0; i < numberOfCopies; i++) {
                                SaveBusiness sb = new SaveBusiness();
                                sb.setAuthInfo(authInfo);
                                beIn.getName().get(0).setValue(businessName + "-" + i);
                                beIn.setBusinessKey(businessKey + "-" + i);
                                sb.getBusinessEntity().add(beIn);
                                publication.saveBusiness(sb);
                                logger.info("Saved business with key " + businessName + "-" + i);
                        }

                } catch (Throwable e) {
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.SaveBusiness

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.