Good time!
I've created a simple CXF client to communicate with a remote service protected by SSL. If I run a JUnit test a handshake performs without mistakes and the communication goes normally.
<http:conduit name="<service_namespace_port>.http-conduit">
<http:client AutoRedirect="true" Connection="Keep-Alive"/>
<http:tlsClientParameters secureSocketProtocol="SSL" disableCNCheck="true">
<sec:keyManagers keyPassword="pass">
<sec:keyStore type="JKS" password="pass" file="keystore"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="pass" file="truststore"/>
</sec:trustManagers>
<sec:cipherSuitesFilter>
<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>
If I deploy my application on a Weblogic Server (11g) and perform a request, the handshake fails with the error "unable to find valid certification path to requested target". According to the logs got by the "-Djavax.net.debug=all", the problem is Weblogic gets its java cacert (/jre/lib/security) ignoring the configured CXF client's truststore.
I've tried to write a line <package-name>javax.jws.*</package-name>
in the weblogic-application.xml, but this kills the application with the error "org.springframework.beans.MethodInvocationException: Property 'serviceClass' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/jws/WebService".
Can somebody, please, suggest, how to tell weblogic not to participate in the clent-server communication?
EDIT. This is the full client configuration (Spring-CXF):
<http:conduit name="<service_namespace_port>.http-conduit">
<http:client AutoRedirect="true" Connection="Keep-Alive"/>
<http:tlsClientParameters secureSocketProtocol="SSL" disableCNCheck="true">
<sec:keyManagers keyPassword="pass">
<sec:keyStore type="JKS" password="pass" file="keystore"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="pass" file="truststore"/>
</sec:trustManagers>
<sec:cipherSuitesFilter>
<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:conduit>
<jaxws:client id="service"
serviceClass="foo.bar.ServiceClass"
address="<service_url>" />
<bean id="client" class="foo.bar.ClientClass"/>
EDIT. Accordng to this post, I've changed the
<http:conduit name="<service_namespace_port>.http-conduit">
to <http:conduit name="*.http-conduit">
and now I'm getting the error "nested exception is java.lang.RuntimeException: Cannot create a secure XMLInputFactory". Some time ago I had this error and the solution I've found is using the system property. But it does not fit any more...
Does anybody know, how to fix this?