Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcClient


     */
    public void setFileManagerUrl(URL fileManagerUrl) {
        this.fileManagerUrl = fileManagerUrl;

        // reset the client
        this.client = new XmlRpcClient(fileManagerUrl);
    }
View Full Code Here


        //
        try {
            if( P_USE_LITE_CLIENT ) {
                client = new XmlRpcClientLite( P_SERVER_URL );
            } else {
                client = new XmlRpcClient( P_SERVER_URL );
            }
        } catch( MalformedURLException e ) {
            logger.error( "Could not connect to " + P_SERVER_URL + ": " + e.toString() );
            throw new InitableException( "Could not connect to " + P_SERVER_URL + ": " + e.toString() );
        }
View Full Code Here

            logger.debug("Executing ping to '" + pingTarget.getPingUrl() + "' for website '" +
                websiteUrl + "' (" + website.getName() + ")");
        }

        // Send the ping
        XmlRpcClient client = new XmlRpcClient(pingTarget.getPingUrl());
        Hashtable result = (Hashtable) client.execute("weblogUpdates.ping", params);
        PingResult pingResult = new PingResult((Boolean) result.get("flerror"), (String) result.get("message"));
        if (logger.isDebugEnabled()) logger.debug("Ping result is: " + pingResult);
        return pingResult;
    }
View Full Code Here

            blogName = null;
        }

        try
        {
            XmlRpcClient xmlrpc = new XmlRpcClient(m_pingURL);
            Vector<String> params = new Vector<String>();
            params.addElement( "The Butt Ugly Weblog" ); // FIXME: Must be settable
            params.addElement( engine.getURL( WikiContext.VIEW, blogName, null, true ) );

            if( log.isDebugEnabled() )
                log.debug("Pinging weblogs.com with URL: "+engine.getURL( WikiContext.VIEW, blogName, null, true ));

            xmlrpc.executeAsync("weblogUpdates.ping", params,
                                new AsyncCallback()
                                {
                                    public void handleError( Exception ex,
                                                             URL url,
                                                             String method )
View Full Code Here

            blogName = null;
        }

        try
        {
            XmlRpcClient xmlrpc = new XmlRpcClient(m_pingURL);
            Vector<String> params = new Vector<String>();
            params.addElement( "The Butt Ugly Weblog" ); // FIXME: Must be settable
            params.addElement( engine.getURL( WikiContext.VIEW, blogName, null, true ) );

            if( log.isDebugEnabled() )
                log.debug("Pinging weblogs.com with URL: "+engine.getURL( WikiContext.VIEW, blogName, null, true ));

            xmlrpc.executeAsync("weblogUpdates.ping", params,
                                new AsyncCallback()
                                {
                                    public void handleError( Exception ex,
                                                             URL url,
                                                             String method )
View Full Code Here

        String xmlRpcURL = "http://" + hostPort + serviceLocation;
        try {
            if (log.isDebugEnabled()) {
                log.debug("Using URI: '" + xmlRpcURL + "'");
            }
            XmlRpcClient client = new XmlRpcClient(xmlRpcURL);
            if (basicUser != null) {
                client.setBasicAuthentication(basicUser, basicPassword);
            }
            return client;
        } catch (MalformedURLException e) {
            throw new XMLDBException(ErrorCodes.INVALID_URI, e);
        }
View Full Code Here

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

                             Vector params)
        throws TurbineException
    {
        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

        public ESValue doIndirectCall(Evaluator evaluator, ESObject target,
                String functionName, ESValue arguments[])
                throws EcmaScriptException, NoSuchMethodException
        {
            // System.out.println ("doIndirectCall called with "+functionName);
            XmlRpcClient client = new XmlRpcClient(url);
            long now = System.currentTimeMillis();
            Object retval = null;
            int l = arguments.length;
            Vector v = new Vector();
            for (int i = 0; i < l; i++)
            {
                Object arg = FesiRpcUtil.convertE2J(arguments[i]);
                // System.out.println ("converted to J: "+arg.getClass ());
                v.addElement(arg);
            }
            // System.out.println ("spent "+(System.currentTimeMillis ()-now)+" millis in argument conversion");
            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

    return buf.toString();
  }

  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

TOP

Related Classes of org.apache.xmlrpc.XmlRpcClient

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.