Package org.apache.xmlrpc.client

Examples of org.apache.xmlrpc.client.XmlRpcClientConfigImpl


                if( !keys.contains( key ) ) keys.add( key );
        return keys;
    }
   
    private XmlRpcClient getGeoCoderClient(String username, String password) throws MalformedURLException {
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        XmlRpcClient geocoder = new XmlRpcClient();
       
        if(username != null && password != null){
            config.setServerURL(new URL("http://"+username+":"+password+"@geocoder.us/service/xmlrpc")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        }else{
            config.setServerURL(new URL("http://geocoder.us/service/xmlrpc")); //$NON-NLS-1$
        }
        geocoder.setConfig(config);       
       
        return geocoder;
    }
View Full Code Here


        String os = System.getProperty("os.name").toLowerCase();
        if (os.indexOf("win") >= 0)
          windowsEnv = true;
      }
    }
    config = new XmlRpcClientConfigImpl();
    String url = String.format("http://%s:%s/RPC2", serverAddr, serverPort);
    try {
      config.setServerURL(new URL(url));
    } catch (java.net.MalformedURLException ex) {
      throw new LdtpExecutionError(ex.getMessage());
View Full Code Here

public class Client {

    public static void main(String[] args) throws Exception {
        // create configuration
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(new URL("http://localhost:8080/jquantlib-xmlrpc/xmlrpc"));
        config.setEnabledForExtensions(true);
        config.setConnectionTimeout(60 * 1000);
        config.setReplyTimeout(60 * 1000);

        XmlRpcClient client = new XmlRpcClient();

        // use Commons HttpClient as transport
        client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
View Full Code Here

    public org.apache.xmlrpc.client.XmlRpcClient getRpcClient(String url) throws MalformedURLException {
        return getRpcClient(url, null, null);
    }

    public org.apache.xmlrpc.client.XmlRpcClient getRpcClient(String url, String login, String password) throws MalformedURLException {
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(new URL(url));
        if (login != null) {
            config.setBasicUserName(login);
        }
        if (password != null) {
            config.setBasicPassword(password);
        }

        if (keyStoreComponent != null && keyStoreName != null && keyAlias != null) {
            return new XmlRpcClient(config, keyStoreComponent, keyStoreName, keyAlias);
        } else {
View Full Code Here

            URL url = new URL(baseUrl.trim());
            if (StringUtils.hasValue(urlSuffix))
                url = new URL(url, urlSuffix);

            XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
            config.setServerURL(url);
            config.setEnabledForExtensions(true);
            if (username != null && password != null) {
                config.setBasicUserName(username);
                config.setBasicPassword(password);
            }

            XmlRpcClient connection = new XmlRpcClient();
            connection.setConfig(config);
View Full Code Here

            url = new URL(baseUrl, "/xmlrpc/secure");
        } catch (IOException ioe) {
            throw new RuntimeException("Malformed URL " + args[0]);
        }

        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(url);
        config.setBasicUserName(args[1]);
        config.setBasicPassword(args[2]);

        XmlRpcClient client = new XmlRpcClient();
        client.setConfig(config);

        try {
View Full Code Here

        TestBedConfiguration tb = TestBedConfiguration.getInstance();
        this.host = tb.getString("singleton_components.Windows.host");
        this.port = tb.getInt("singleton_components.Windows.port");
        this.client = new XmlRpcClient();
        try {
            XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
           
            config.setServerURL(new URL("http://" + host + ":" + port));
            client.setConfig(config);
        } catch (MalformedURLException ex) {
            logger.fatal("Cannot connect to http://" + host + ":" + port, ex);
            throw new QTasteException(ex.getMessage(), ex);
        }
View Full Code Here

            port = pPort;
        }
        public void run() {
            try {
                XmlRpcClient client = new XmlRpcClient();
                XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
                config.setServerURL(new URL("http://127.0.0.1:" + port + "/"));
                client.setConfig(config);
                for (int i = 0;  i < iterations;  i++) {
                    assertEquals(EIGHT, client.execute("Adder.add", new Object[]{THREE, FIVE}));
                }
            } catch (Throwable t) {
View Full Code Here

    initWebServer();
    return getConfig(new URL("http://127.0.0.1:" + webServer.getPort() + "/"));
  }

  protected XmlRpcClientConfigImpl getConfig(URL pServerURL) throws Exception {
    XmlRpcClientConfigImpl config = super.getConfig();
    config.setServerURL(pServerURL);
    config.setContentLengthOptional(!contentLength);
    return config;
  }
View Full Code Here

  public final XmlRpcClientConfigImpl getConfig() throws Exception {
    return getConfig(new URL("http://127.0.0.1:" + port + "/"));
  }

  protected XmlRpcClientConfigImpl getConfig(URL pServerURL) throws Exception {
    XmlRpcClientConfigImpl config = super.getConfig();
    config.setServerURL(pServerURL);
    config.setContentLengthOptional(!contentLength);
    return config;
  }
View Full Code Here

TOP

Related Classes of org.apache.xmlrpc.client.XmlRpcClientConfigImpl

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.