private synchronized String sendRequest(String body, String address, String soapAddress, String method, boolean secondTry)
{
//ConnectionReuseStrategy connStrategy = new DefaultConnectionReuseStrategy();
DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
HttpParams params = null;
BasicHttpProcessor httpproc = null;
try
{
logger.trace("Will send body: " + body);
URL url = new URL(address);
if(params == null)
{
params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, "UTF-8");
//HttpProtocolParams.setUserAgent(params, "MSN Explorer/9.0 (MSN 8.0; TmstmpExt)");
HttpProtocolParams.setUseExpectContinue(params, false);
httpproc = new BasicHttpProcessor();
// Required protocol interceptors
httpproc.addInterceptor(new RequestContent());
httpproc.addInterceptor(new RequestTargetHost());
// Recommended protocol interceptors
httpproc.addInterceptor(new RequestConnControl());
httpproc.addInterceptor(new RequestUserAgent());
httpproc.addInterceptor(new RequestExpectContinue());
}
HttpRequestExecutor httpexecutor = new HttpRequestExecutor();
HttpContext context = new BasicHttpContext(null);