Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcClient.execute()


    {
        try
        {
            XmlRpcClient client = new XmlRpcClient ( url );
            client.setBasicAuthentication(username, password);
            return client.execute(methodName, params);
        }
        catch (Exception e)
        {
            throw new TurbineException("XML-RPC call failed", e);
        }
View Full Code Here


            ESObject esretval = ObjectObject.createObject(evaluator);
            try
            {
                String method = remoteObject == null ? functionName
                        : remoteObject + "." + functionName;
                retval = client.execute(method, v);
                esretval.putProperty("error", ESNull.theNull,
                        "error".hashCode());
                esretval.putProperty("result", FesiRpcUtil.convertJ2E(retval,
                        this.evaluator), "result".hashCode());
            }
View Full Code Here

  private boolean getBatchStubUp(ResourceNode node) {
    XmlRpcClient client = new XmlRpcClient(node.getIpAddr());
    Vector argList = new Vector();

    try {
      return ((Boolean) client.execute("batchstub.isAlive", argList))
          .booleanValue();
    } catch (Exception e) {
      return false;
    }
  }
View Full Code Here

            Vector<String> params = new Vector<String>(3);
            params.add("0");
            params.add(apiUser);
            params.add(apiPassword);

            Object res = cl.execute("blogger.getUsersBlogs", params);
            detected = (res instanceof List && ((List)res).size() > 0);
        } catch (IOException e)
        {
            LOG.log(Level.FINE, ERR_FAILED_TO_CONTACT, e);
            detected = false;
View Full Code Here

            params.add(blog.getUser());
            params.add(blog.getPassword());

            try
            {
                Object res = cl.execute(apiCall, params);
                categories = res == null ? null : parseFetchedCategories(res);
            } catch (IOException e)
            {
                LOG.log(Level.FINE, ERR_FAILED_CATEGORIES, e);
            } catch (XmlRpcException e)
View Full Code Here

            params.add(blog.getUser());
            params.add(blog.getPassword());

            try
            {
                List bs = (List)cl.execute("blogger.getUsersBlogs", params);
                if (bs != null)
                {
                    blogs = new TargetBlog.Blog[bs.size()];
                    for (int i = 0; i < bs.size(); i++)
                    {
View Full Code Here

        params.add(content);
        params.add(post.publish);

        try
        {
            res = cl.execute("metaWeblog.newPost", params);
        } catch (Throwable e)
        {
            throw new WeblogAPIException("Failed to create a post.", e);
        }
View Full Code Here

            params.add(prefs.getPassword());

            try
            {
                params.add(packCategories(post.categories));
                cl.execute("mt.setPostCategories", params);
            } catch (Throwable e)
            {
                throw new WeblogAPIException("Failed to set category to a post.", e);
            }
        }
View Full Code Here

      struct.put("type", "");
      struct.put("bits", readFile());

      params.add(struct);

      struct = (Hashtable)xmlrpc.execute(handler + ".newMediaObject", params);

      System.out.println("URL for media object is " + struct.get("url"));

    } catch (Exception e) {
      throw new BuildException(e);
View Full Code Here

      }
      struct.put("categories", categories);

      params.add(struct);
      params.add(Boolean.TRUE);
      Object postId = xmlrpc.execute(handler + ".newPost", params);

      System.out.println("New post id is " + postId);

    } catch (Exception e) {
      throw new BuildException(e);
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.