无法从 https (tlsv1.2) wsdl uri 创建基于 wsdl 的代理

Can't create wsdl based proxy from https (tlsv1.2) wsdl uri

我正在尝试从服务创建基于 WSDL 的代理。此服务位于 tomcat 服务器中的 运行,该服务器已配置为仅接受使用 TLSv1.2 的安全连接。并且此服务位于 wso2server 运行.

所在的内部网之外

当我在基于 WSDL 的代理模板中测试 wsdl uri 时出现问题,启动系统时出现以下警报:"Invalid WSDL URI (Unable to establish a connection)"。 我不得不说 wso2esb 与外部有连接,问题不在于访问这个 url,因为:

根据失败的安全 wsdl URL 的浏览器连接信息,我知道连接 TLS 协议是 1.2,密码是:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

更有用的信息:

也许我在 wso2server 配置中遗漏了什么?


更新问题:

将 SSL 证书的 public 部分安装到 ESB 信任库后,我可以毫无问题地基于已发布的 WSDL 创建代理服务,并且我可以通过 ESB 请求 WSDL 模板。但是我认为没有完全解决的问题:

尝试使用 SoapUI 服务时,我在服务器中遇到以下异常(在 wso2carbon.log 中读取):

TID: [0] [ESB] [2015-10-15 08:24:31,057] ERROR {org.apache.synapse.transport.passthru.TargetHandler} -  I/O error: Received fatal alert: protocol_version {org.apache.synapse.transport.passthru.TargetHandler}
javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1619)
at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1587)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1756)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1060)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:228)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:263)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:380)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:118)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
at java.lang.Thread.run(Thread.java:744)
TID: [0] [ESB] [2015-10-15 08:25:04,600]  WARN {org.apache.synapse.transport.passthru.SourceHandler} -  Connection time out after request is read: http-incoming-11 {org.apache.synapse.transport.passthru.SourceHandler}

也许我在 axis2.xml 配置文件 ($CARBON_HOME/repository/conf/axis2/axis2.xml) 中遗漏了什么?这是与以下内容相关的部分:

 
    <transportReceiver name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLListener">
        <parameter name="port" locked="false">8443</parameter>
        <parameter name="non-blocking" locked="false">true</parameter>
        <parameter name="bind-address" locked="false">XXX.XXX.XXX.XXX</parameter>
        <parameter name="WSDLEPRPrefix" locked="false">https://XXX.XXX.XXX.XXX:8443</parameter>
        <parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.PassThroughNHttpGetProcessor
        <parameter name="HttpsProtocols">TLSv1,TLSv1.1,TLSv1.2</parameter>
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>repository/resources/security/wso2carbon.jks</Location>
                <Type>JKS</Type>
                <Password>XXX</Password>
                <KeyPassword>XXX</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>repository/resources/security/client-truststore.jks</Location>
                <Type>JKS</Type>
                <Password>XXX</Password>
            </TrustStore>
        </parameter>
   </transportReceiver>

 
 
    <transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
        <parameter name="non-blocking" locked="false">true
        <parameter name="HttpsProtocols">TLSv1,TLSv1.1,TLSv1.2
        <parameter name="keystore" locked="false">
            <KeyStore>
                <Location>repository/resources/security/wso2carbon.jks</Location>
                <Type>JKS</Type>
                <Password>XXXX</Password>
                <KeyPassword>XXXX</KeyPassword>
            </KeyStore>
        </parameter>
        <parameter name="truststore" locked="false">
            <TrustStore>
                <Location>repository/resources/security/client-truststore.jks</Location>
                <Type>JKS</Type>
                <Password>XXXXX</Password>
            </TrustStore>
        </parameter>
        <parameter name="HostnameVerifier">AllowAll</parameter>        
    </transportSender>
 

谢谢!

您是否已将服务的 public 证书导入 ESB 的信任库?如果没有,This blog post 可能会提供一些想法(虽然有点过时)。

错误 "Unable to establish a connection" 太不清楚了。

使用 SSL 调试选项启动您的服务器(将 -Djavax.net.debug=all 添加到 wso2server.sh)。

这会产生很多输出,但它可以帮助您查明问题。