Examples of SaveService


Examples of org.apache.juddi.datatype.request.SaveService

    service.addName(new Name("serviceNm"));
    service.addName(new Name("serviceNm2","en"));
    service.addDescription(new Description("service whatever"));
    service.addDescription(new Description("service whatever too","it"));

    SaveService object = new SaveService();
    object.setAuthInfo(authInfo);
    object.addBusinessService(service);
    object.addBusinessService(service);

    return object;

  }
View Full Code Here

Examples of org.apache.juddi.datatype.request.SaveService

   *
   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    SaveService request = (SaveService)regObject;
    String generic = request.getGeneric();
    AuthInfo authInfo = request.getAuthInfo();
    Vector serviceVector = request.getBusinessServiceVector();
    UUIDGen uuidgen = UUIDGenFactory.getUUIDGen();

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

View Full Code Here

Examples of org.apache.juddi.datatype.request.SaveService

   *
   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    SaveService request = (SaveService)regObject;
    String generic = request.getGeneric();
    AuthInfo authInfo = request.getAuthInfo();
    Vector serviceVector = request.getBusinessServiceVector();
    UUIDGen uuidgen = UUIDGenFactory.getUUIDGen();

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

View Full Code Here

Examples of org.apache.juddi.datatype.request.SaveService

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    SaveService obj = new SaveService();
    Vector nodeList = null;
    AbstractHandler handler = null;

    // Attributes
    String generic = element.getAttribute("generic");
    if ((generic != null && (generic.trim().length() > 0)))
      obj.setGeneric(generic);

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,AuthInfoHandler.TAG_NAME);
    if (nodeList.size() > 0)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      obj.setAuthInfo((AuthInfo)handler.unmarshal((Element)nodeList.elementAt(0)));
    }

    nodeList = XMLUtils.getChildElementsByTagName(element,BusinessServiceHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(BusinessServiceHandler.TAG_NAME);
      obj.addBusinessService((BusinessService)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

Examples of org.apache.juddi.datatype.request.SaveService

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    SaveService request = (SaveService)object;
    Element element = parent.getOwnerDocument().createElement(TAG_NAME);
    AbstractHandler handler = null;

    String generic = request.getGeneric();
    if (generic != null)
      element.setAttribute("generic",generic);

    AuthInfo authInfo = request.getAuthInfo();
    if (authInfo != null)
    {
      handler = maker.lookup(AuthInfoHandler.TAG_NAME);
      handler.marshal(authInfo,element);
    }

    Vector vector = request.getBusinessServiceVector();
    if ((vector!=null) && (vector.size() > 0))
    {
      handler = maker.lookup(BusinessServiceHandler.TAG_NAME);
      for (int i=0; i<vector.size(); i++)
        handler.marshal((BusinessService)vector.elementAt(i),element);
View Full Code Here

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

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

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

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

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

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

   * @exception RegistryException;
   */
  public ServiceDetail saveService(String authInfo,
      BusinessService[] serviceArray) throws RegistryException {
    SaveServiceDocument doc = SaveServiceDocument.Factory.newInstance();
    SaveService request = doc.addNewSaveService();

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

    if (serviceArray != null) {
      request.setBusinessServiceArray(serviceArray);
    }

        ServiceDetail sd;
        XmlObject o = execute(doc, this.getPublishURI()).changeType(
                ServiceDetailDocument.type);
View Full Code Here

Examples of org.uddi.api_v2.SaveService

                r.getBusinessEntity().addAll(MapBusinessList(body.getBusinessEntity(), null));
                return r;
        }
       
        public static SaveService MapSaveService(org.uddi.api_v3.SaveService body) {
                SaveService r = new SaveService();
                r.setGeneric(VERSION);
               
                r.setAuthInfo(body.getAuthInfo());
                r.getBusinessService().addAll(MapService(body.getBusinessService()));
                return r;
        }
View Full Code Here

Examples of org.uddi.api_v3.SaveService

      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
        SaveService ss = new SaveService();
        ss.setAuthInfo(authInfo);
        bsIn.getName().get(0).setValue(serviceName + "-" + i);
       
        bsIn.setServiceKey(serviceKey + "-" + i);
        bsIn.getBindingTemplates().getBindingTemplate().get(0).setBindingKey(bindingKey + "-" + i);
        ss.getBusinessService().add(bsIn);
        publication.saveService(ss);
        logger.debug("Add service with key " + bsIn.getServiceKey());
      }
    }
    catch(Exception e) {
View Full Code Here

Examples of org.uddi.api_v3.SaveService

 
 
  public void saveService(String authInfo, String serviceXML, String serviceKey) {
    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");
      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
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.