ssl - 连接到外部 https 网络服务时出错

标签 ssl https mule

我正在尝试调用 https 出站外部网络服务。它在我本地的 MuleStudion 环境中运行良好。但是当我部署测试时。我得到一个异常(exception)

Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://xxx.com/yyy, connector=HttpsConnector
{
  name=connector.https.mule.default
  lifecycle=start
  this=4670c992
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[https]
  serviceOverrides=<none>
}
,  name='endpoint.https.xxx.comy.yyy', mep=REQUEST_RESPONSE, properties={http.method=POST, Content-Type=text/xml}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: PostMethod
Code                  : MULE_ERROR-42999
--------------------------------------------------------------------------------

异常堆栈是:

  1. trustAnchors 参数必须非空(java.security.InvalidAlgorithmParameterException) java.security.cert.PKIXParameters:200 (null)
  2. 意外错误:java.security.InvalidAlgorithmParameterException:trustAnchors 参数必须为非空 (java.lang.RuntimeException) sun.security.validator.PKIXValidator:90 (null)
  3. java.lang.RuntimeException:意外错误:java.security.InvalidAlgorithmParameterException:trustAnchors 参数必须为非空 (javax.net.ssl.SSLException) sun.security.ssl.Alerts:208 ( http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/net/ssl/SSLException.html )
  4. 无法通过端点路由事件:DefaultOutboundEndpoint{endpointUri= https://xxx.com/yyy , 连接器=HttpsConnector

片段调用是

    <set-payload value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:mcs=&quot;http://www.cybershift.com/wfm3/mcs10/&quot; xmlns:ns=&quot;http://www.cybershift.com/wfm3/5/3/&quot;&gt;&lt;soapenv:Header&gt;&lt;mcs:UsernameToken&gt;&lt;mcs:clientName&gt;HHMI&lt;/mcs:clientName&gt;&lt;mcs:user&gt;xxx&lt;/mcs:user&gt;&lt;mcs:password&gt;yyy5&lt;/mcs:password&gt;&lt;/mcs:UsernameToken&gt;&lt;/soapenv:Header&gt;&lt;soapenv:Body&gt;&lt;mcs:RetrieveData&gt;&lt;mcs:businessObjectName&gt;SCHEDULE&lt;/mcs:businessObjectName&gt;&lt;mcs:queryValueObject action=&quot;ADD&quot; startDate=&quot;#[flowVars['payStartDate']]&quot; endDate=&quot;#[flowVars['payEndDate']]&quot;&gt;&lt;ns:StringAttribute name=&quot;pqr&quot;&gt;&lt;ns:string&gt;#[empIDS.get(flowVars['eid']-1).text]&lt;/ns:string&gt;&lt;/ns:StringAttribute&gt;&lt;/mcs:queryValueObject&gt;&lt;/mcs:RetrieveData&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;" doc:name="Set Payload"/>
    <logger message="SOAP Request to ST #[message.payload]" level="INFO" doc:name="Logger"/>

    <https:outbound-endpoint exchange-pattern="request-response"    method="POST" doc:name="ST" contentType="text/xml" address="https://xxx.com/yyy"/>

我需要设置 https 连接器吗?如果是这样,我需要拥有什么。非常感谢。

最佳答案

一般这意味着找不到您指定的信任库,或者由于 os 中的访问权限而无法打开。检查该服务是否可以访问 keystore 。

关于ssl - 连接到外部 https 网络服务时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26492357/

相关文章:

ssl - openssl:未知摘要 sha-512

java - Mule CXF构建org.mule.module.launcher.application.DefaultMuleApplication : null

ssl - MULE ESB 3.4 IMAP 邮件问题

php - 仅在具有 .htaccess 的特定页面上使用 HTTPS

用于 TLS/SSL 密码套件强化的 Java 正则表达式

ruby-on-rails - 使用 Sendgrid 在 rails actionmailer url 中包含 www 子域

linux - 如何在 Shell 中使用 CURL 在支持 CSRF 的网站上通过 https 上传文件?

ssl - OpenShift 免费帐户和自定义 ssl 证书?

node.js - 在 Nodejs 中使用来自 GoDaddy 的私钥

mule - 在 mule esb 中从 JSON 中提取数组