Package org.apache.juddi.datatype.request

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


    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    AddPublisherAssertions obj = new AddPublisherAssertions();
    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,PublisherAssertionHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      obj.addPublisherAssertion((PublisherAssertion)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here


    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    AddPublisherAssertions request = (AddPublisherAssertions)object;
    String generic = request.getGeneric();
    generic = getGeneric(generic);
    String nameSpace = getUDDINamespace(generic);
   
    Element element = parent.getOwnerDocument().createElementNS(nameSpace,TAG_NAME);

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

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

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

    assertion.setToKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setKeyName("paKeyName");
    assertion.setKeyValue("paKeyValue");
    assertion.setTModelKey("uuid:3379ec11-a509-4668-9fee-19b134d0d09b");

    AddPublisherAssertions service = new AddPublisherAssertions();
    service.setGeneric("2.0");
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion);
    service.addPublisherAssertion(assertion);

    System.out.println();

    RegistryObject regObject = service;
    handler.marshal(regObject,parent);
View Full Code Here

      // create a PublisherAssertion Vector
      Vector assertionVector = new Vector();
      assertionVector.addElement(assertion);

      // create an AddPublisherAssertions request & invoke the server
      AddPublisherAssertions apaReq = new AddPublisherAssertions();
      apaReq.setAuthInfo(new AuthInfo(authInfo));
      apaReq.setPublisherAssertionVector(assertionVector);
      DispositionReport dspRpt1 = (DispositionReport)(new AddPublisherAssertionsFunction(reg).execute(apaReq));
      System.out.println("errno: "+dspRpt1.toString());
      DispositionReport dspRpt2 = (DispositionReport)(new AddPublisherAssertionsFunction(reg).execute(apaReq));
      System.out.println("errno: "+dspRpt2.toString());
View Full Code Here

    assertion.setToKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setKeyName("paKeyName");
    assertion.setKeyValue("paKeyValue");
    assertion.setTModelKey("uuid:3379ec11-a509-4668-9fee-19b134d0d09b");

    AddPublisherAssertions object = new AddPublisherAssertions();
    object.setAuthInfo(authInfo);
    object.addPublisherAssertion(assertion);
    object.addPublisherAssertion(assertion);

    return object;

  }
View Full Code Here

   */
  public RegistryObject execute(RegistryObject regObject)
    throws RegistryException
  {
    // extract individual parameters
    AddPublisherAssertions request = (AddPublisherAssertions)regObject;
    AuthInfo authInfo = request.getAuthInfo();
    Vector assertionVector = request.getPublisherAssertionVector();
    String generic = request.getGeneric();

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

    try
View Full Code Here

      // create a PublisherAssertion Vector
      Vector assertionVector = new Vector();
      assertionVector.addElement(assertion);

      // create an AddPublisherAssertions request & invoke the server
      AddPublisherAssertions apaReq = new AddPublisherAssertions();
      apaReq.setAuthInfo(authInfo1);
      apaReq.setPublisherAssertionVector(assertionVector);
      DispositionReport dspRpt1 = (DispositionReport)reg.execute(apaReq);
      System.out.println("errno: "+dspRpt1.toString());
      System.out.println();
      DispositionReport dspRpt2 = (DispositionReport)reg.execute(apaReq);
      System.out.println("errno: "+dspRpt2.toString());
View Full Code Here

    this.maker = maker;
  }

  public RegistryObject unmarshal(Element element)
  {
    AddPublisherAssertions obj = new AddPublisherAssertions();
    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,PublisherAssertionHandler.TAG_NAME);
    for (int i=0; i<nodeList.size(); i++)
    {
      handler = maker.lookup(PublisherAssertionHandler.TAG_NAME);
      obj.addPublisherAssertion((PublisherAssertion)handler.unmarshal((Element)nodeList.elementAt(i)));
    }

    return obj;
  }
View Full Code Here

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    AddPublisherAssertions request = (AddPublisherAssertions)object;
    Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);

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

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

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

    assertion.setToKey("3379ec11-a509-4668-9fee-19b134d0d09b");
    assertion.setKeyName("paKeyName");
    assertion.setKeyValue("paKeyValue");
    assertion.setTModelKey("uuid:3379ec11-a509-4668-9fee-19b134d0d09b");

    AddPublisherAssertions service = new AddPublisherAssertions();
    service.setGeneric("2.0");
    service.setAuthInfo(authInfo);
    service.addPublisherAssertion(assertion);
    service.addPublisherAssertion(assertion);

    System.out.println();

    RegistryObject regObject = service;
    handler.marshal(regObject,parent);
View Full Code Here

TOP

Related Classes of org.apache.juddi.datatype.request.AddPublisherAssertions

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.