【问题标题】:Getting ssl socket factory null while using docusign Rest API provided by demo.docusign.net使用 demo.docusign.net 提供的 docusign Rest API 时获取 ssl socket factory null
【发布时间】:2015-09-07 09:23:04
【问题描述】:

我在 IBM websphere 中使用由“https://demo.docusign.net”提供的 Docusign Rest API 时遇到 ssl 认证错误。我下载'演示 ssl 证书并从https://trust.docusign.com/certificates添加

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.

【问题讨论】:

    标签: sockets ssl proxy


    【解决方案1】:

    朋友们,

    我找到了解决方案,只需将 javax.net.ssl.trustStoreType=JKS" 设置为 WebSphere Application servers > server1 > Process definition > Java Virtual Machine > Custom properties

    更多信息请阅读
    http://www.coderanch.com/t/573425/Web-Services/java/javax-net-ssl-SSLException-SSLSocketFactory

    http://www-01.ibm.com/support/docview.wss?uid=swg1PM14425

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-29
      • 1970-01-01
      相关资源
      最近更新 更多