2013-04-26 81 views
6

您好我已經從wsdl文件在eclipse中創建了一個Web服務客戶端。但是當我嘗試從客戶端訪問服務時,它說。 沒有可用於端點的SSL配置。然後是我的端點地址。 請讓我知道如何通過密鑰存儲提供SSL配置給我的web服務客戶端。 我有客戶端提供的獨立客戶端和密鑰庫。 TIA向webService客戶端提供keystore

+0

你使用哪種技術? – Ellis 2013-10-02 10:05:51

+0

ibm jdk與碼頭服務器 – ankit 2013-10-02 17:40:31

回答

1

您可以通過檢查什麼存在於你的密鑰庫開始:

keytool -list -keystore D:\Tomcat\ukdp.keystore -storepass 123456 

您的管道定義可能會是什麼樣子sample: -

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:sec="http://cxf.apache.org/configuration/security" 
    xmlns:http="http://cxf.apache.org/transports/http/configuration" 
    xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" 
    xsi:schemaLocation=" 
     http://cxf.apache.org/configuration/security 
     http://cxf.apache.org/schemas/configuration/security.xsd 
     http://cxf.apache.org/transports/http/configuration 
     http://cxf.apache.org/schemas/configuration/http-conf.xsd 
     http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 

    <http:conduit name="{http://apache.org/hello_world}HelloWorld.http-conduit"> 

    <http:tlsClientParameters> 
     <sec:keyManagers keyPassword="password"> 
     <sec:keyStore type="JKS" password="password" 
         file="my/file/dir/Morpit.jks"/> 
     </sec:keyManagers> 
     <sec:trustManagers> 
     <sec:keyStore type="JKS" password="password" 
         file="my/file/dir/Truststore.jks"/> 
     </sec:trustManagers> 
     <sec:cipherSuitesFilter> 
     <!-- these filters ensure that a ciphersuite with 
      export-suitable or null encryption is used, 
      but exclude anonymous Diffie-Hellman key change as 
      this is vulnerable to man-in-the-middle attacks --> 
     <sec:include>.*_EXPORT_.*</sec:include> 
     <sec:include>.*_EXPORT1024_.*</sec:include> 
     <sec:include>.*_WITH_DES_.*</sec:include> 
     <sec:include>.*_WITH_AES_.*</sec:include> 
     <sec:include>.*_WITH_NULL_.*</sec:include> 
     <sec:exclude>.*_DH_anon_.*</sec:exclude> 
     </sec:cipherSuitesFilter> 
    </http:tlsClientParameters> 
    <http:authorization> 
     <sec:UserName>Betty</sec:UserName> 
     <sec:Password>password</sec:Password> 
    </http:authorization> 
    <http:client AutoRedirect="true" Connection="Keep-Alive"/> 

    </http:conduit> 

</beans> 

另外,我發現了一些帖子,可以幫助您: -

3

您可以通過使用Apache CXF並設置客戶端管道來完成此操作。請參閱this great tutorial中的Configuring SSL Support部分。

希望這會有所幫助。

+0

謝謝這幫了我 – ankit 2014-02-26 04:03:36