Package org.apache.xmlrpc.client

Examples of org.apache.xmlrpc.client.XmlRpcClientConfigImpl


    if(args.length < 1)
      usage();
    String docName = (args.length == 2) ? args[1] : args[0];

        XmlRpcClient client = new XmlRpcClient();
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(new URL(uri));
        config.setBasicUserName("admin");
        config.setBasicPassword("");
        client.setConfig(config);

    // read the file into a string
    BufferedReader f = new BufferedReader(new FileReader(args[0]));
    String line;
View Full Code Here


        String filename="macbeth.xml";
       
        try {
            // Setup xmlrpc client
            XmlRpcClient client = new XmlRpcClient();
            XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
            config.setServerURL(new URL(url));
            config.setBasicUserName("guest");
            config.setBasicPassword("guest");
            client.setConfig(config);

            // Setup xml serializer
            Hashtable<String, String> options = new Hashtable<String, String>();
            options.put("indent", "no");
View Full Code Here

        if (!endpoint.endsWith("/rpc/xmlrpc")) {
            endpoint += "/rpc/xmlrpc";
        }

        XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
        clientConfig.setServerURL(new URL(endpoint));

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

        this.cache = new HashMap();
View Full Code Here

            {
                oneEndPoint = oneXmlRpcEnv;
            }
        }

        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

        try
        {
            config.setServerURL(new URL(oneEndPoint));
        }
        catch (MalformedURLException e)
        {
            throw new ClientConfigurationException(
                    "The URL "+oneEndPoint+" is malformed.");
View Full Code Here

    private String loginToken;
    private Map issueParams;

    public JiraIssueCreator(final String propFile) {
        loadPropFile(propFile);
        initializeXmlRpcClient(new XmlRpcClient(), new XmlRpcClientConfigImpl());
    }
View Full Code Here

    this.xmlRpcClient = new XmlRpcClient();
   
    // application configuration
    final CompositeConfiguration appConfig = this.createApplicationConfiguration();
    // XML-RPC client specific configuration, using the application configuration
    final XmlRpcClientConfigImpl config = this.createXmlRpcClientConfiguration( url, appConfig );
    this.xmlRpcClient.setConfig(config);
   
    this.testProjectService = new TestProjectService( xmlRpcClient, devKey );
    this.testPlanService = new TestPlanService( xmlRpcClient, devKey );
    this.miscService = new MiscService( xmlRpcClient, devKey );
View Full Code Here

   * @param appConfig Application composite configuration.
   * @return XML-RPC client configuration.
   */
  private XmlRpcClientConfigImpl createXmlRpcClientConfiguration( URL url, CompositeConfiguration appConfig )
  {
    final XmlRpcClientConfigImpl xmlRpcClientConfig = new XmlRpcClientConfigImpl();
   
    xmlRpcClientConfig.setServerURL( url );
    xmlRpcClientConfig.setEnabledForExtensions( true );
   
    xmlRpcClientConfig.setBasicEncoding( appConfig.getString(XMLRPC_BASIC_ENCODING) );
    xmlRpcClientConfig.setBasicPassword( appConfig.getString(XMLRPC_BASIC_PASSWORD) );
    xmlRpcClientConfig.setBasicUserName( appConfig.getString(XMLRPC_BASIC_USERNAME) );
   
    try
    {
      xmlRpcClientConfig.setConnectionTimeout( appConfig.getInt(XMLRPC_CONNECTION_TIMEOUT) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce );
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    try
    {
      xmlRpcClientConfig.setContentLengthOptional( appConfig.getBoolean(XMLRPC_CONTENT_LENGTH_OPTIONAL) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce );
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    try
    {
      xmlRpcClientConfig.setEnabledForExceptions( appConfig.getBoolean(XMLRPC_ENABLED_FOR_EXCEPTIONS) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce );
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    xmlRpcClientConfig.setEncoding( appConfig.getString(XMLRPC_ENCODING) );
   
    try
    {
      xmlRpcClientConfig.setGzipCompressing( appConfig.getBoolean(XMLRPC_GZIP_COMPRESSION) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce );
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    try
    {
      xmlRpcClientConfig.setGzipRequesting( appConfig.getBoolean(XMLRPC_GZIP_REQUESTING) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce);
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    try
    {
      xmlRpcClientConfig.setReplyTimeout( appConfig.getInt(XMLRPC_REPLY_TIMEOUT) );
    }
    catch ( ConversionException ce )
    {
      this.debug( ce );
    }
    catch ( NoSuchElementException nsee )
    {
      this.debug( nsee );
    }
   
    xmlRpcClientConfig.setUserAgent( appConfig.getString(XMLRPC_USER_AGENT) );
   
    return xmlRpcClientConfig;
  }
View Full Code Here

        // application configuration
        final CompositeConfiguration appConfig = this.createApplicationConfiguration();
        // XML-RPC client specific configuration, using the application
        // configuration
        final XmlRpcClientConfigImpl config = this.createXmlRpcClientConfiguration(url, appConfig);
        this.xmlRpcClient.setConfig(config);

        this.testProjectService = new TestProjectService(xmlRpcClient, devKey);
        this.testPlanService = new TestPlanService(xmlRpcClient, devKey);
        this.miscService = new MiscService(xmlRpcClient, devKey);
View Full Code Here

     * @param url Application URL.
     * @param appConfig Application composite configuration.
     * @return XML-RPC client configuration.
     */
    private XmlRpcClientConfigImpl createXmlRpcClientConfiguration(URL url, CompositeConfiguration appConfig) {
        final XmlRpcClientConfigImpl xmlRpcClientConfig = new XmlRpcClientConfigImpl();

        xmlRpcClientConfig.setServerURL(url);
        xmlRpcClientConfig.setEnabledForExtensions(true);

        xmlRpcClientConfig.setBasicEncoding(appConfig.getString(XMLRPC_BASIC_ENCODING));
        xmlRpcClientConfig.setBasicPassword(appConfig.getString(XMLRPC_BASIC_PASSWORD));
        xmlRpcClientConfig.setBasicUserName(appConfig.getString(XMLRPC_BASIC_USERNAME));

        try {
            xmlRpcClientConfig.setConnectionTimeout(appConfig.getInt(XMLRPC_CONNECTION_TIMEOUT));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        try {
            xmlRpcClientConfig.setContentLengthOptional(appConfig.getBoolean(XMLRPC_CONTENT_LENGTH_OPTIONAL));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        try {
            xmlRpcClientConfig.setEnabledForExceptions(appConfig.getBoolean(XMLRPC_ENABLED_FOR_EXCEPTIONS));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        xmlRpcClientConfig.setEncoding(appConfig.getString(XMLRPC_ENCODING));

        try {
            xmlRpcClientConfig.setGzipCompressing(appConfig.getBoolean(XMLRPC_GZIP_COMPRESSION));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        try {
            xmlRpcClientConfig.setGzipRequesting(appConfig.getBoolean(XMLRPC_GZIP_REQUESTING));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        try {
            xmlRpcClientConfig.setReplyTimeout(appConfig.getInt(XMLRPC_REPLY_TIMEOUT));
        } catch (ConversionException ce) {
            this.debug(ce);
        } catch (NoSuchElementException nsee) {
            this.debug(nsee);
        }

        xmlRpcClientConfig.setUserAgent(appConfig.getString(XMLRPC_USER_AGENT));

        return xmlRpcClientConfig;
    }
View Full Code Here

        this( serviceUrl, null, null );
    }

    public ContinuumXmlRpcClient( URL serviceUrl, String login, String password )
    {
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl()
        {
            public boolean isEnabledForExtensions()
            {
                return true;
            }
        };

        if ( login != null )
        {
            config.setBasicUserName( login );
            config.setBasicPassword( password );
        }
        config.setServerURL( serviceUrl );

        XmlRpcClient client = new XmlRpcClient();
        client.setConfig( config );
        ClientFactory factory = new ClientFactory( client );
        continuum = (ContinuumService) factory.newInstance( ContinuumService.class );
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.