关于使用httpclient访问https页面,返回内容不正确的问题
场景描述:
最近在做一个网上支付的项目, 里面有一块功能是交易查询的功能。
url如下所示:
https://ibsbjstar.ccb.com.cn/app/ccbMain?MERCHANTID=0123456789&BRANCHID=10000001&POSID=000000000&ORDERDATE=20040716&ORDERID=200405071001&TXCODE=410404&PT_STYLE=9&MAC=9dba2408dee42eda278ea5ac4d394a2e
使用ie访问这个url返回一个xml文件
但是使用httpclient访问就返回空。
调查过程:
查询发现它用的是如下证书:
Version: V3
Subject: CN=ibsbjstar.ccb.com.cn, OU="Member, VeriSign Trust Network", OU=Authenticated by iTrusChina, OU=Terms of use at www.itrus.com.cn/rpa (c) 04, OU=Internet 118Banking, O=China Construction Bank, L=Beijing, ST=Beijing, C=CN
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
这个是windows自带的证书。
我使用keytool import把导入这个证书,但是使用httpclient访问,还是空字符串。
提问:
如何实现在java中能够访问到这个url,并取得和ie相同的结果?