Hello,

I am using Apache Client API 4.2.3

I am simply posting HTTPPost request.
<code>
            DefaultHttpClient client = new DefaultHttpClient();
            HttpRequestBase request2 = null;
.
.

.
HttpPost postRequest2 = new HttpPost("http:\\www.xyz.com\context\action
"+"?param1="+URLEncoder.encode(sInputJson,"UTF-8"));

request2 = postRequest2;

request2.setHeader("Content-Type", "json");

HttpResponse response2 = client.execute(request2);


</code>

on last line i am receiving following exception:
org.apache.http.conn.HttpHostConnectException: Connection to
http://www.xyz.com <http://bbx-dev5.footballamerica.com> refused


 Some application details:

URL we are hitting is deployed to linux server.

When we run application on localhost in windows environment , it is running
fine.

But as soon as we deploy application to www.xyz.com it wont work

Is this due to request made is deployed on same sever?

Do you have any suggestion, for this issue.

Thank You.

-regards
Abhishek Anne
http://playjava.wordpress.com
*Please don't print this e-mail unless you really need to, save paper save
planet.*

Reply via email to