[jboss-dev-forums] [JBoss Web Services Development] - cxf.xml doesn't work under JBoss 6.1

Tao Sang do-not-reply at jboss.com
Tue Nov 22 05:58:34 EST 2011


Tao Sang [http://community.jboss.org/people/tao_dl] created the discussion

"cxf.xml doesn't work under JBoss 6.1"

To view the discussion, visit: http://community.jboss.org/message/637679#637679

--------------------------------------------------------------
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 http://www.springframework.org/schema/beans"*
*      xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"*
*      xmlns:http-conf=" http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/transports/http/configuration"     * 
*      xsi:schemaLocation="*
*           http://cxf.apache.org/configuration/security http://cxf.apache.org/configuration/security*
*           http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/schemas/configuration/security.xsd*
*           http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/transports/http/configuration*
*           http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/schemas/configuration/http-conf.xsd*
*           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans*
*           http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/beans/spring-beans.xsd">*

*<http-conf:conduit name="{ https://server.company.com:8443/ 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
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/637679#637679]

Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111122/7a56fe32/attachment.html 


More information about the jboss-dev-forums mailing list