dcsimg
HttpClient error : java.lang.IllegalArgumentException: host parameter is null
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, March 16, 2006 02:19 AM

Hi, I am getting the error "java.lang.IllegalArgumentException: host parameter is null" when executing HttpClient program. HttpClient client = _getConnectionClient(); System.out.println("FDMServiceDao : getFDMResultset : After calling _getConnectionClient"); PostMethod postOp = _getConnectionMethod(); System.out.println("FDMServiceDao : getFDMResultset : After calling _getConnectionMethod"); // postOp.setRequestBody(parameter.toString()); System.out.println("FDMServiceDao : getFDMResultset : postOp.getParameters() Value : "+postOp.getParameters()); System.out.println("FDMServiceDao : getFDMResultset : Befo   More>>

Hi,



I am getting the error "java.lang.IllegalArgumentException: host parameter is null" when executing HttpClient program.

			

HttpClient client = _getConnectionClient();
System.out.println("FDMServiceDao : getFDMResultset : After calling _getConnectionClient");
PostMethod postOp = _getConnectionMethod();
System.out.println("FDMServiceDao : getFDMResultset : After calling _getConnectionMethod");
// postOp.setRequestBody(parameter.toString());



System.out.println("FDMServiceDao : getFDMResultset : postOp.getParameters() Value : "+postOp.getParameters());
System.out.println("FDMServiceDao : getFDMResultset : Before calling executeMethod");
NameValuePair nvp1= new NameValuePair("parm1","NWS");
NameValuePair nvp1= new NameValuePair("val1","Val1");
NameValuePair nvp2= new NameValuePair("val2","Val2");
NameValuePair nvp3= new NameValuePair("val3","Val3");
NameValuePair nvp4= new NameValuePair("val4","Val4);

postOp.setQueryString(new NameValuePair[]{nvp1,nvp2,nvp3,nvp4});


client.executeMethod(postOp);




Thisexception is thrown when calling "client.executeMethod(postOp)". Could anyone tell what is the exception about and how to rectify it.




Thanks in advance.



Vishnu    <<Less
About | Sitemap | Contact