从Mule Project调用安全的Web服务时出错

时间:2016-04-25 07:42:19

标签: mule

需要从我的一个Mule项目中调用安全的Web服务。为此,我创建了一个自签名证书并按如下方式配置了我的项目:

1)将keystore.jks保留在Project

的资源文件夹中

2)在Globals.xml文件中定义了一个https连接器

<https:connector name="movilcashHttpsConnector" doc:name="HTTP-HTTPS" clientSoTimeout="10000" cookieSpec="netscape" receiveBacklog="0" receiveBufferSize="0" sendBufferSize="0" serverSoTimeout="10000" socketSoLinger="0" validateConnections="true">
      <https:tls-key-store path="keystore.jks" keyPassword="changeit" storePassword="changeit" />
      <https:tls-server path="keystore.jks" storePassword="changeit" />
</https:connector> 

3)在调用https端点时,我使用了以下配置

    <https:outbound-endpoint method="POST"
        doc:name="HTTP" exchange-pattern="request-response" transformer-refs="Message_Properties2"
        responseTimeout="90000"
        address="https://partners.masmovilcash.com/TelepinWeb/TpinBulkLoading?BatchType=7&amp;FileExt=PNG&amp;FileAbbrv=C_R&amp;FileType=KYC_Documents&amp;CustomerID=#[flowVars['tpin-customerid']]&amp;FileSequence=2"
        connector-ref="movilcashHttpsConnector">
    </https:outbound-endpoint>

4)在运行mule standalone的Linux服务器中部署项目。

但不幸的是,每次我都收到以下错误:

Message               : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://partners.masmovilcash.com/TelepinWeb/JSON-RPC, connector=HttpsConnector

 Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
sun.security.validator.ValidatorException: No trusted certificate found
            at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:384)
*******************************************************************************

我错过了什么吗?请帮忙。

0 个答案:

没有答案