Dear Forum,
Currently under JBoss 6.1, I have a problem by calling web service over https (SSL), which has a self-signed certificate. By using a dummy (certificate)TrustManager, I got one step further with following errors:
Caused by: java.io.IOException: The https URL hostname does not match the Common Name (CN) on the server certificate. To
disable this check (NOT recommended for production) set the CXF client TLS configuration property "disableCNCheck" to true.
I googled and found that I need to set a cxf client configuration file with the project. Then I created a cxf.xml with following content and left it in the folder: myProject-ejb\src\main\resources\ :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
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.xsd">
<http-conf:conduit name="{https://server.company.com:8443/}WebService.http-conduit">
<http-conf:tlsClientParameters secureSocketProtocol="SSL" disableCNCheck="true"/>
</http-conf:conduit>
<http-conf:conduit name="*.http-conduit">
<http-conf:tlsClientParameters disableCNCheck="true" secureSocketProtocol="SSL"/>
</http-conf:conduit>
</beans>
However, I always get the above errors. Did I do something wrong? I saw that the cxf.xml file has been copied into the root folder of the myProject-ejb.jar file, but I don't know if the cxf.file really works. How can I check if the cxf.xml is working?
Thanks in advance!
Tao