HttpClient httpClient = new HttpClient(new HttpClientParams(),new SimpleHttpConnectionManager(true) );
Protocol myhttps = new Protocol("https", new MySecureProtocolSocketFactory(), 443);
Protocol.registerProtocol("https", myhttps);
String result = "";
sendURL="https://pbank.psbc.com/payment/main";
PostMethod method = null;
try {
method = new PostMethod("https://pbank.psbc.com/payment/main");
NameValuePair[] data = {
new NameValuePair("transName", "IQSR"),
new NameValuePair("Plain", plainText),
new NameValuePair("Signature", signMsg)};
method.setRequestBody(data);
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(3000);
httpClient.executeMethod(method);//执行到这里的时候老是报NullExceptionException
Protocol myhttps = new Protocol("https", new MySecureProtocolSocketFactory(), 443);
Protocol.registerProtocol("https", myhttps);
String result = "";
sendURL="https://pbank.psbc.com/payment/main";
PostMethod method = null;
try {
method = new PostMethod("https://pbank.psbc.com/payment/main");
NameValuePair[] data = {
new NameValuePair("transName", "IQSR"),
new NameValuePair("Plain", plainText),
new NameValuePair("Signature", signMsg)};
method.setRequestBody(data);
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(3000);
httpClient.executeMethod(method);//执行到这里的时候老是报NullExceptionException
解决方案 »
- 小弟初学java,还望各位帮帮忙。
- subversion在公司adsl安装后(IP不固定,局域网),如何在家访问?
- Tomcat和项目不同步的问题! 求解
- Hibernate分页问题
- DOM中getChildNodes();的问题
- 已和关于struts标签嵌套的问题,敬请赐教。
- struts上传文件 的时候 表单中File对象和一般的文本框,不能在一起使用吗??
- 100分相送,郁闷了好久的问题,一旦解决立即送分
- eclipse2.1.2可以运行,3.0m6,m7不能运行,出现错误,谁碰到过,请帮忙
- mybatis查询日期范围速度慢的原因
- 各位大神,js 中的Date.parse(new Date()) 在 java中 得到的值为什么不一样呢
- ssh连接oracle速度慢
2、超时时间太短了吧?