	public JSONRPCResponseObject sendAndReceive(JSONRPCRequestObject message)
	throws JSONException, SaploClientException {
		HttpPost httpost = new HttpPost(uri+"?"+params);
		ByteArrayEntity ent = new ByteArrayEntity(message.toString().getBytes());
		ent.setContentEncoding(HTTP.UTF_8);
		ent.setContentType("application/x-www-form-urlencoded");
		httpost.setEntity(ent);
		DefaultHttpClient httpClient = new DefaultHttpClient();
		try {
			if(proxified)
				httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
			HttpResponse response = httpClient.execute(httpost);
			HttpEntity entity = response.getEntity();
			int statusCode = response.getStatusLine().getStatusCode();
			if (statusCode != HttpStatus.SC_OK)
				throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION, ResponseCodes.CODE_API_DOWN_EXCEPTION, statusCode);
			String got = "";
			if (entity != null) {
				byte[] bytes = EntityUtils.toByteArray(entity);
				got = new String(bytes, Charset.forName("UTF-8"));
			}
			JSONTokener tokener = new JSONTokener(got);
			Object rawResponseMessage = tokener.nextValue();
			JSONObject responseMessage = (JSONObject) rawResponseMessage;
			if (responseMessage == null)
				throw new ClientError("Invalid response type - " + rawResponseMessage);
			return new JSONRPCResponseObject(responseMessage);
		} catch (ClientProtocolException e) {
			throw new ClientError(e);
		} catch (NoHttpResponseException nr) {
			throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION, ResponseCodes.CODE_API_DOWN_EXCEPTION, 777);
		} catch (IOException e) {
			throw new ClientError(e);
		} finally {
			httpClient.getConnectionManager().shutdown();
		}
	}

	public JSONRPCResponseObject sendAndReceive(JSONRPCRequestObject message)
	throws JSONException, SaploClientException {
		HttpPost httpost = new HttpPost(uri+"?"+params);
		ByteArrayEntity ent = new ByteArrayEntity(message.toString().getBytes(Charset.forName("UTF-8")));
		ent.setContentEncoding(HTTP.UTF_8);
		ent.setContentType("application/x-www-form-urlencoded");
		httpost.setEntity(ent);
		DefaultHttpClient httpClient = new DefaultHttpClient();
		try {
			if(proxified)
				httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
			HttpResponse response = httpClient.execute(httpost);
			HttpEntity entity = response.getEntity();
			int statusCode = response.getStatusLine().getStatusCode();
			if (statusCode != HttpStatus.SC_OK)
				throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION, ResponseCodes.CODE_API_DOWN_EXCEPTION, statusCode);
			String got = "";
			if (entity != null) {
				byte[] bytes = EntityUtils.toByteArray(entity);
				got = new String(bytes, Charset.forName("UTF-8"));
			}
			JSONTokener tokener = new JSONTokener(got);
			Object rawResponseMessage = tokener.nextValue();
			JSONObject responseMessage = (JSONObject) rawResponseMessage;
			if (responseMessage == null)
				throw new ClientError("Invalid response type - " + rawResponseMessage);
			return new JSONRPCResponseObject(responseMessage);
		} catch (ClientProtocolException e) {
			throw new ClientError(e);
		} catch (NoHttpResponseException nr) {
			throw new SaploClientException(ResponseCodes.MSG_API_DOWN_EXCEPTION, ResponseCodes.CODE_API_DOWN_EXCEPTION, 777);
		} catch (IOException e) {
			throw new ClientError(e);
		} finally {
			httpClient.getConnectionManager().shutdown();
		}
	}
