2013-04-26 11 views
6

Ciao Ho creato un client di servizio Web in eclipse dal file wsdl. Ma quando provo ad accedere al servizio dal client, dice. Nessuna configurazione SSL disponibile per l'endpoint. E poi l'indirizzo del mio endpoint. Per favore fatemi sapere come posso fornire la configurazione ssl attraverso il keystore al mio client webservice. Ho un client e un keystore indipendenti forniti dal client. TIAFornire il keystore al client webService

+0

Quale tecnologia hai utilizzato? – Ellis

+0

ibm jdk con server jetty – ankit

risposta

1

Si può iniziare controllando che cosa c'è nel vostro keystore:

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

Un sample di ciò che la tua definizione condotto potrebbe essere simile: -

<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> 

Inoltre ho trovato alcuni fili che potrebbero aiutare : -

3

È possibile eseguire questa operazione utilizzando Apache CXF e impostare il conduit del client. Fare riferimento alla sezione Configuring SSL Support in this great tutorial.

Spero che questo aiuti.

+0

grazie questo mi ha aiutato – ankit