Package org.apache.juddi.datatype.response

Examples of org.apache.juddi.datatype.response.ServiceInfo


    this.maker = maker;
  }

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

    // Attributes
    obj.setServiceKey(element.getAttribute("serviceKey"));
    obj.setBusinessKey(element.getAttribute("businessKey"));

    // Text Node Value
    // {none}

    // Child Elements
    nodeList = XMLUtils.getChildElementsByTagName(element,NameHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(NameHandler.TAG_NAME);
      Name name = (Name )handler.unmarshal((Element)nodeList.elementAt(i));
      if (name != null)
        obj.addName(name);
    }

    return obj;
  }
View Full Code Here


    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    ServiceInfo info = (ServiceInfo)object;
    String generic = getGeneric(null);
    String namespace = getUDDINamespace(generic);
    Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
    AbstractHandler handler = null;

    // required attribute
    String serviceKey = info.getServiceKey();
    element.setAttribute("serviceKey",(serviceKey != null) ? serviceKey : "");

    // required attribute
    String businessKey = info.getBusinessKey();
    element.setAttribute("businessKey",(businessKey != null) ? businessKey : "");

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

    AbstractHandler handler = maker.lookup(RegisteredInfoHandler.TAG_NAME);

    Element parent = XMLUtils.newRootElement();
    Element child = null;

    ServiceInfo sInfo = new ServiceInfo();
    sInfo.addName(new Name("regInfoServNm"));
    sInfo.addName(new Name("regInfoServNm2","en"));
    sInfo.setServiceKey("826e6443-e3c5-442b-9bf8-943071ca83f4");
    sInfo.setBusinessKey("56644a68-8779-46c7-93ce-90eeb7569f3f");

    BusinessInfo bInfo = new BusinessInfo();
    bInfo.setBusinessKey("56644a68-8779-46c7-93ce-90eeb7569f3f");
    bInfo.addName(new Name("regInfoBizNm"));
    bInfo.addName(new Name("regInfoBizNm2","en"));
View Full Code Here

          // easily harvest ServiceInfo data from it.
          BusinessService service = (BusinessService)services.elementAt(i);
          String serviceKey = service.getServiceKey();

          // okay, create a new ServiceInfo
          ServiceInfo info = new ServiceInfo();
          info.setServiceKey(serviceKey);
          info.setBusinessKey(businessKey);
          info.setNameVector(ServiceNameTable.select(serviceKey,connection));

          // add this ServiceInfo to the ServiceInfo vector
          serviceInfoVector.add(info);
        }
      }
View Full Code Here

   *
   */
  public ServiceInfo fetchServiceInfo(String serviceKey)
    throws org.apache.juddi.error.RegistryException
  {
    ServiceInfo info = null;

    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)
      {
        throw new RegistryException(sqlex);
View Full Code Here

          // easily harvest ServiceInfo data from it.
          BusinessService service = (BusinessService)services.elementAt(i);
          String serviceKey = service.getServiceKey();

          // okay, create a new ServiceInfo
          ServiceInfo info = new ServiceInfo();
          info.setServiceKey(serviceKey);
          info.setBusinessKey(businessKey);
          info.setNameVector(ServiceNameTable.select(serviceKey,connection));

          // add this ServiceInfo to the ServiceInfo vector
          serviceInfoVector.add(info);
        }
      }
View Full Code Here

   *
   */
  public ServiceInfo fetchServiceInfo(String serviceKey)
    throws org.apache.juddi.error.RegistryException
  {
    ServiceInfo info = null;

    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)
      {
        throw new RegistryException(sqlex);
View Full Code Here

    handler = ( RegisteredInfoHandler)maker.lookup( RegisteredInfoHandler.TAG_NAME);
  }

  private RegistryObject getRegistryObject()
  {
    ServiceInfo sInfo = new ServiceInfo();
    sInfo.addName(new Name("regInfoServNm"));
    sInfo.addName(new Name("regInfoServNm2","en"));
    sInfo.setServiceKey("826e6443-e3c5-442b-9bf8-943071ca83f4");
    sInfo.setBusinessKey("56644a68-8779-46c7-93ce-90eeb7569f3f");

    BusinessInfo bInfo = new BusinessInfo();
    bInfo.setBusinessKey("56644a68-8779-46c7-93ce-90eeb7569f3f");
    bInfo.addName(new Name("regInfoBizNm"));
    bInfo.addName(new Name("regInfoBizNm2","en"));
View Full Code Here

          // easily harvest ServiceInfo data from it.
          BusinessService service = (BusinessService)services.elementAt(i);
          String serviceKey = service.getServiceKey();

          // okay, create a new ServiceInfo
          ServiceInfo info = new ServiceInfo();
          info.setServiceKey(serviceKey);
          info.setBusinessKey(businessKey);
          info.setNameVector(ServiceNameTable.select(serviceKey,connection));

          // add this ServiceInfo to the ServiceInfo vector
          serviceInfoVector.add(info);
        }
      }
View Full Code Here

   *
   */
  public ServiceInfo fetchServiceInfo(String serviceKey)
    throws org.apache.juddi.error.RegistryException
  {
    ServiceInfo info = null;

    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)
      {
        throw new RegistryException(sqlex);
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.response.ServiceInfo

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.