@Appanna M .

Thanks for providing the solution and it works.

But now getting another error.
In HTTP get method : 1) if user mid server then getting The request failed: Request not sent to uri= ENDPOINT URL : org.apache.commons.httpclient.HttpException: Session contains no certificates - Untrusted

AND

2) without using MID server : getting error code 1 

please assist