Tabnine Logo
XmlRpcCommonsTransportFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
XmlRpcCommonsTransportFactory
in
org.apache.xmlrpc.client

Best Java code snippets using org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory (Showing top 20 results out of 315)

origin: org.nuiton.topia/topia-soa

public Object invoke(Object proxy, Method method, Object[] args)
    throws Throwable {
  Object result = null;
  logger.debug("Invoke : " + clazz.getName() + "." + method.getName()
      + "(" + Arrays.toString(args) + ")");
  logger.debug("XML-RPC , Using uri = http:" + this.serviceLocation);
  //Le client XMLRPC de crispy est en version < 3
  XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
  try {
    config.setServerURL(new URL("http:" + this.serviceLocation));
    XmlRpcClient client = new XmlRpcClient();
    client
        .setTransportFactory(new XmlRpcCommonsTransportFactory(
            client));
    client.setConfig(config);
    result = client.execute(clazz.getName() + "." + method.getName(),
        args);
  } catch (java.net.MalformedURLException e) {
    System.out.println("Caught MalformedURLException\n");
    e.printStackTrace();
  } catch (XmlRpcException e) {
    System.out.println("Caught XmlRpcException\n");
    e.printStackTrace();
  }
  return result;
}
origin: net.exogeni.orca.core/shirako

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
f.setHttpClient(h);
client.setTransportFactory(f);
origin: org.apache.xmlrpc/xmlrpc-client

/** Creates a new instance.
 * @param pFactory The factory, which created this transport.
 */
public XmlRpcCommonsTransport(XmlRpcCommonsTransportFactory pFactory) {
  super(pFactory.getClient(), userAgent);
  HttpClient httpClient = pFactory.getHttpClient();
  if (httpClient == null) {
    httpClient = newHttpClient();
  }
  client = httpClient;
 }
origin: edu.illinois.cs.cogcomp/illinois-entity-similarity

config.setReplyTimeout(60*1000);
XmlRpcClient client = new XmlRpcClient();
client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
client.setConfig(config);
origin: bsorrentino/maven-confluence-plugin

protected Confluence(String endpoint, ConfluenceProxy proxyInfo ) throws URISyntaxException, MalformedURLException {
  this(new XmlRpcClient());
if (endpoint.endsWith("/")) {
    endpoint = endpoint.substring(0, endpoint.length() - 1);
  }
  endpoint = ConfluenceService.Protocol.XMLRPC.addTo(endpoint);

  final java.net.URI serviceURI = new java.net.URI(endpoint);
  XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
  clientConfig.setServerURL(serviceURI.toURL() );
  clientConfig.setEnabledForExtensions(true); // add this to support attachment upload
  client.setConfig( clientConfig );
  if( isProxyEnabled(proxyInfo, serviceURI) ) {
    
    final XmlRpcCommonsTransportFactory transportFactory = new XmlRpcCommonsTransportFactory( client );
    final HttpClient httpClient = new HttpClient();
    final HostConfiguration hostConfiguration = httpClient.getHostConfiguration();
    hostConfiguration.setProxy( proxyInfo.host, proxyInfo.port );
    hostConfiguration.setHost(serviceURI.getHost(), serviceURI.getPort(), serviceURI.toURL().getProtocol());
    if( !isNullOrEmpty(proxyInfo.userName) && !isNullOrEmpty(proxyInfo.password) ) {
      Credentials cred = new UsernamePasswordCredentials(proxyInfo.userName,proxyInfo.password);
      httpClient.getState().setProxyCredentials(AuthScope.ANY, cred);
    }
    transportFactory.setHttpClient( httpClient );
    client.setTransportFactory( transportFactory );
  }
}
// Would have been nicer to have a constructor with clientConfig and optionally a transport
origin: rosjava/rosjava_core

/** Creates a new instance.
 * @param pFactory The factory, which created this transport.
 */
public XmlRpcCommonsTransport(XmlRpcCommonsTransportFactory pFactory) {
  super(pFactory.getClient(), userAgent);
  HttpClient httpClient = pFactory.getHttpClient();
  if (httpClient == null) {
    httpClient = newHttpClient();
  }
  client = httpClient;
 }
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: org.bsc.maven/maven-confluence-core

protected Confluence(String endpoint, ConfluenceProxy proxyInfo ) throws URISyntaxException, MalformedURLException {
  this(new XmlRpcClient());
if (endpoint.endsWith("/")) {
    endpoint = endpoint.substring(0, endpoint.length() - 1);
  }
  endpoint = ConfluenceService.Protocol.XMLRPC.addTo(endpoint);

  final java.net.URI serviceURI = new java.net.URI(endpoint);
  XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
  clientConfig.setServerURL(serviceURI.toURL() );
  clientConfig.setEnabledForExtensions(true); // add this to support attachment upload
  client.setConfig( clientConfig );
  if( isProxyEnabled(proxyInfo, serviceURI) ) {
    
    final XmlRpcCommonsTransportFactory transportFactory = new XmlRpcCommonsTransportFactory( client );
    final HttpClient httpClient = new HttpClient();
    final HostConfiguration hostConfiguration = httpClient.getHostConfiguration();
    hostConfiguration.setProxy( proxyInfo.host, proxyInfo.port );
    hostConfiguration.setHost(serviceURI.getHost(), serviceURI.getPort(), serviceURI.toURL().getProtocol());
    if( !isNullOrEmpty(proxyInfo.userName) && !isNullOrEmpty(proxyInfo.password) ) {
      Credentials cred = new UsernamePasswordCredentials(proxyInfo.userName,proxyInfo.password);
      httpClient.getState().setProxyCredentials(AuthScope.ANY, cred);
    }
    transportFactory.setHttpClient( httpClient );
    client.setTransportFactory( transportFactory );
  }
}
// Would have been nicer to have a constructor with clientConfig and optionally a transport
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: net.exogeni.orca.core/shirako

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
f.setHttpClient(h);
client.setTransportFactory(f);
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: net.exogeni.orca.core/shirako

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
f.setHttpClient(h);
client.setTransportFactory(f);
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: net.exogeni.orca.core/shirako

protected TalkToRegistry() {
  super();
  // We use our own HttpClient with an HttpConnectionManager
  // configured with timeouts, so we don't block the liveness
  // thread forever.
  // Connect timeout, 10 seconds; Read timeout, 5 seconds; Close timeout, 3 seconds.
  connMgr = new SimpleHttpConnectionManager(true);
  connMgr.getParams().setConnectionTimeout(10*1000);
  connMgr.getParams().setSoTimeout(5*1000);
  connMgr.getParams().setLinger(3);
  httpClient = new HttpClient(connMgr);
  // We use XmlRpcCommonsTransportFactory, initialized
  // using the HttpClient from above, so that SSLContexts
  // work.
  xmlrpcClient = new XmlRpcClient();
  xmlrpcClientConfig = new XmlRpcClientConfigImpl();
  transportFactory =
    new XmlRpcCommonsTransportFactory(xmlrpcClient);
  transportFactory.setHttpClient(httpClient);
  xmlrpcClient.setTransportFactory(transportFactory);
  // Finally - since the SimpleHttpConnectionManager only
  // provides one backend HttpConnection, ensure that the
  // XmlRpcClient only has one backend worker available to
  // consume it.
  xmlrpcClient.setMaxThreads(1);
}
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: org.apache.continuum/continuum-distributed-commons

  private XmlRpcClient getXmlRpcClient( URL url, ConnectionInfo connectionInfo )
  {
    XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
    clientConfig.setServerURL( url );
    clientConfig.setEnabledForExceptions( true );

    if ( connectionInfo != null )
    {
      clientConfig.setBasicUserName( connectionInfo.getUsername() );
      clientConfig.setBasicPassword( connectionInfo.getPassword() );
      clientConfig.setBasicEncoding( connectionInfo.getEncoding() );
      clientConfig.setGzipCompressing( connectionInfo.isGzip() );
      clientConfig.setGzipRequesting( connectionInfo.isGzip() );
      clientConfig.setReplyTimeout( connectionInfo.getTimeout() );
      clientConfig.setConnectionTimeout( connectionInfo.getTimeout() );
      clientConfig.setTimeZone( connectionInfo.getTimeZone() );
    }

    final XmlRpcClient client = new XmlRpcClient();
    client.setTypeFactory( new BinderTypeFactory( client ) );
    XmlRpcCommonsTransportFactory factory = new XmlRpcCommonsTransportFactory( client );
    // Alternative - use simple connection manager, but make sure it closes the connection each time
    // This would be set here since it would not be thread-safe
//        factory.setHttpClient( new HttpClient( new SimpleHttpConnectionManager( true ) ) );
    factory.setHttpClient( httpClient );
    client.setConfig( clientConfig );
    return client;
  }

origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: org.renci.ahab/libndl

XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
client.setTransportFactory(f);
origin: org.renci.ahab/libndl

@SuppressWarnings("unchecked")
public Map<String, Object> getVersion() throws Exception {
  Map<String, Object> versionMap = null;
  setSSLIdentity();
  try {
    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
          //TODO
    //config.setServerURL(new URL(GUI.getInstance().getSelectedController()));
          config.setServerURL(new URL(CONTROLLER_URL));
          //TODO
    XmlRpcClient client = new XmlRpcClient();
    client.setConfig(config);
    // set this transport factory for host-specific SSLContexts to work
    XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
    client.setTransportFactory(f);
    // get verbose list of the AMs
    versionMap = (Map<String, Object>)client.execute(GET_VERSION, new Object[]{});
  } catch (MalformedURLException e) {
    throw new Exception("Please check the SM URL " + CONTROLLER_URL);
  } catch (XmlRpcException e) {
    throw new Exception("Unable to contact SM " + CONTROLLER_URL + " due to " + e);
  } catch (Exception e) {                        
    throw new Exception("Unable to contact SM " + CONTROLLER_URL);
          
  }
  return versionMap;
}
origin: org.renci.ahab/libtransport

private XmlRpcClient getConfiguredClient() {
  XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
  config.setServerURL(cUrl);
  XmlRpcClient client = new XmlRpcClient();
  client.setConfig(config);
  // set this transport factory for host-specific SSLContexts to work
  XmlRpcCommonsTransportFactory f = new XmlRpcCommonsTransportFactory(client);
  client.setTransportFactory(f);
  
  return client;
}

org.apache.xmlrpc.clientXmlRpcCommonsTransportFactory

Javadoc

An HTTP transport factory, which is based on the Jakarta Commons HTTP Client.

Most used methods

  • <init>
    Creates a new instance.
  • setHttpClient
    Sets the factories HttpClient. By default, a new instance of HttpClient is created for any request.
  • getClient
  • getHttpClient
    Returns the factories HttpClient. By default, a new instance of HttpClient is created for any reques

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now