连接到外部https webservice时出错

时间:2014-10-21 17:09:52

标签: ssl https mule

我正在尝试调用https的出站外部Web服务。它在我当地的MuleStudion环境中正常工作。但是当我部署测试时。我得到了一个例外

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,connector = HttpsConnector
  5. 代码段调用

        <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连接器。如果是这样我需要什么。非常感谢。

1 个答案:

答案 0 :(得分:0)

通常这意味着由于os.Check中的访问权限,找不到您指定的信任库,或者无法打开该信任库,该服务可以访问密钥库。