1
我在使用IBM websphere中'https://demo.docusign.net'提供的Docusign Rest API時面臨ssl認證錯誤。我下載「演示SSL證書,並從https://trust.docusign.com/certificates在使用docusign時獲取ssl套接字工廠null Rest API由demo.docusign.net提供
I am using api like this....
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("......", 81));
AuthenticateRequest authReq = null;
if(appConfiguration == null)
authReq = new AuthenticateRequest(configuration);
else
authReq = new AuthenticateRequest(configuration,appConfiguration);
System.out.println(url);
logger.debug("url : "+url);
logger.debug("Request : "+authReq.toJSONString());
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(proxy);
connection.setRequestMethod("GET");
connection.setRequestProperty(DOCU_SIGN_AUTH, authReq.toJSONString());
connection.setRequestProperty(ACCEPT, CONTENT_TYPE_VALUE);
connection.setRequestProperty(CONTENT_TYPE, CONTENT_TYPE_VALUE);
if(connection.getResponseCode()==HttpStatus.SC_OK || connection.getResponseCode() == HttpStatus.SC_CREATED) {
String response = getResponse(connection);
connection.disconnect();
return response;
}
****Error found....****
SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.