Code example for PlainSocketFactory

	 * @param XMLRPC 
	 *            server URI 
	public XMLRPCClient(URI uri) {
		SchemeRegistry registry = new SchemeRegistry();
		registry.register(new Scheme("http", new PlainSocketFactory(), 80));
		registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
		postMethod = new HttpPost(uri);
		postMethod.addHeader("Content-Type", "text/xml");
		// I had to disable "Expect: 100-Continue" header since I had 
		// two second delay between sending http POST request and POST body 
		httpParams = postMethod.getParams();
		HttpProtocolParams.setUseExpectContinue(httpParams, false);
		this.client = new DefaultHttpClient(new ThreadSafeClientConnManager(httpParams, registry), httpParams);
Connect your IDE to all the code out there  Get Codota for Java