Examples of DeleteSubscription


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

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

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();
View Full Code Here

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

    this.maker = maker;
  }

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

    return obj;
  }
View Full Code Here

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

    return obj;
  }

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

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

    Vector keyVector = request.getSubscriptionKeyVector();
    if ((keyVector!=null) && (keyVector.size() > 0))
    {
      handler = maker.lookup(SubscriptionKeyHandler.TAG_NAME);
      for (int i=0; i<keyVector.size(); i++)
        handler.marshal(new SubscriptionKey((String)keyVector.elementAt(i)),element);
View Full Code Here

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

    Element child = null;

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    DeleteSubscription service = new DeleteSubscription();
    service.setAuthInfo(authInfo);
    service.addSubscriptionKey("1bd50f65-9671-41ae-8d13-b3b5a5afcda0");
    service.addSubscriptionKey(new SubscriptionKey("1fbe67e6-f8b5-4743-a23f-9c13e4273d9f"));

    System.out.println();

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

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

    this.maker = maker;
  }

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

    return obj;
  }
View Full Code Here

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

    return obj;
  }

  public void marshal(RegistryObject object,Element parent)
  {
    DeleteSubscription request = (DeleteSubscription)object;
    Element element = parent.getOwnerDocument().createElementNS(null,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 keyVector = request.getSubscriptionKeyVector();
    if ((keyVector!=null) && (keyVector.size() > 0))
    {
      handler = maker.lookup(SubscriptionKeyHandler.TAG_NAME);
      for (int i=0; i<keyVector.size(); i++)
        handler.marshal(new SubscriptionKey((String)keyVector.elementAt(i)),element);
View Full Code Here

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

    Element child = null;

    AuthInfo authInfo = new AuthInfo();
    authInfo.setValue("6f157513-844e-4a95-a856-d257e6ba9726");

    DeleteSubscription service = new DeleteSubscription();
    service.setAuthInfo(authInfo);
    service.addSubscriptionKey("1bd50f65-9671-41ae-8d13-b3b5a5afcda0");
    service.addSubscriptionKey(new SubscriptionKey("1fbe67e6-f8b5-4743-a23f-9c13e4273d9f"));

    System.out.println();

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

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

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

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

    try
View Full Code Here

Examples of org.uddi.sub_v3.DeleteSubscription

  }
 
  public void deleteSubscription(String authInfo, String subscriptionKey) {
    try {
      // Delete the entity and make sure it is removed
      DeleteSubscription ds = new DeleteSubscription();
      ds.setAuthInfo(authInfo);
     
      ds.getSubscriptionKey().add(subscriptionKey);
      subscription.deleteSubscription(ds);
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
View Full Code Here

Examples of org.uddi.sub_v3.DeleteSubscription

      try {
        UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
        UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
        Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
        UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
        DeleteSubscription deleteSubscription = new DeleteSubscription();
        String authToken = (String) session.getAttribute("token-" + clerk.getName());
        deleteSubscription.setAuthInfo(authToken);
        deleteSubscription.getSubscriptionKey().add(modelSubscription.getSubscriptionKey());
        subscriptionService.deleteSubscription(deleteSubscription);
        logger.info("Deleted Subscription " + modelSubscription.getSubscriptionKey()
            + " from UDDI server " + clerk.getUDDINode().getName());
      } catch (Exception e) {
        error = "Could not delete subscription. Reason: " + e.getMessage();
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.