2010-10-27 96 views
1

我在使用HTTPS/SSL配置Mule 2.2中的CXF传输来调用暴露的服务上的WS-method时存在一个小问题。使用普通HTTP调用相同的方法工作正常。我搜索在这个问题上有很多和他人之间找到了以下链接:Mule cxf:出站端点(客户端)和HTTPS/SSL问题

http://www.mulesoft.org/documentation/display/MULE2CB/Using+HTTPS+with+CXF

这是有用的,但还是有几件事情,我不完全理解:

  • CXF端点配置为:,即它位于cxf名称空间中。 cxf名称空间与https名称空间是否有关系,用于配置链接中描述的内容?

  • 更令人困惑的是,Mule的东西是我从之前的开发者手中接过来的,它应该是按照SSL原样工作,但是在Mule配置文件中我找不到任何https的跟踪:连接器配置。从链接中的信息,我得到的印象是,它是强制性的,至少在“服务器密钥存储”和“信任存储”,如:

    <https:connector name="myHttpsConnector"> 
        <https:tls-key-store path="serverKeystore" keyPassword="mulepassword" 
         storePassword="mulepassword"/> 
        <https:tls-server path="trustStore" storePassword="mulepassword"/> 
    </https:connector> 
    

我所得到的骡子日志当试图连接到启用HTTPS的WS如下所示时,它显然与SSL密钥相关,但是我想念最后一部分,以使其全部落实到位。对此事的任何帮助和评论都会受到极大的关注。

/奥拉

******************************************************************************** 
Message    : Failed to invoke lifecycle phase "initialise" on object: 
HttpsConnector{this=a7769e, started=false, initialised=false, 
name='connector.https.0', disposed=false, numberOfConcurrentTransactedReceivers=4, 
createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[https], 
serviceOverrides=null} 
Type     : org.mule.api.lifecycle.LifecycleException 
Code     : MULE_ERROR-70228 
JavaDoc    : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/lifecycle/LifecycleException.html 
******************************************************************************** 
Exception stack is: 
1. The Key password cannot be null (java.lang.IllegalArgumentException) 
org.mule.api.security.tls.TlsConfiguration:290 (null) 
2. Failed to invoke lifecycle phase "initialise" on object: 
HttpsConnector{this=a7769e, started=false, initialised=false, 
name='connector.https.0', disposed=false, numberOfConcurrentTransactedReceivers=4, 
createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[https], 
serviceOverrides=null} (org.mule.api.lifecycle.LifecycleException) 
org.mule.lifecycle.DefaultLifecyclePhase:277 (http://www.mulesource.org/docs/site 
/current2/apidocs/org/mule/api/lifecycle/LifecycleException.html) 
******************************************************************************** 
Root Exception stack trace: 
java.lang.IllegalArgumentException: The Key password cannot be null 
    at 
org.mule.api.security.tls.TlsConfiguration.assertNotNull(TlsConfiguration.java:290) 
at org.mule.api.security.tls.TlsConfiguration.validate(TlsConfiguration.java:208) 
... 
.. 

回答

1

如果没有骡子HTTPS:连接器,那么它可能意味着外部服务是做SSL部分(如JBoss服务器)。尽管我自己没有经验。

但如果一切都通过骡子做,你还需要设置客户端属性(如你所提到的链接解释):

<https:tls-client path="clientKeystore" storePassword="mulepassword" /> 

而回顾一下不同的密钥存储(可能会造成混淆) :

  • clientKeyStore包含您的客户端的密钥(S)
  • serverKeyStore包含服务器为其k EY(S)
  • 的trustStore包含了所有同行的公钥,即键连接到服务器的客户端,键任何外部服务器(如WS你试图连接到)

但您收到的错误消息表明存在缺少密钥密码。如果您已正确设置密钥存储区和https连接器,则不会发生这种情况。