You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Jim Doyle <ro...@gmail.com> on 2015/10/09 23:28:52 UTC

CXF in TomEE: how to set the disableCNCheck global option?

How do I configure CXF (embedded in TomEE) with the global variable suggested
by this Exception?

Caused by: java.io.IOException: The https URL hostname does not match the
Common Name (CN) on the server certificate in the client's truststore.  Make
sure server certificate is correct, or to disable this check (NOT
recommended for production) set the CXF client TLS configuration property
"disableCNCheck" to true.

I tried placing below in src/webapp/META-INF/openejb-jar.xml and it failed
to work. 
<?xml version="1.0"?>
<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
    <pojo-deployment class-name="jaxrs-application">
        <properties>
            cxf.jaxws.properties = disableCNCheck=true
        </properties>
    </pojo-deployment>
</openejb-jar>



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CXF-in-TomEE-how-to-set-the-disableCNCheck-global-option-tp4676463.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CXF in TomEE: how to set the disableCNCheck global option?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
jaxws-application doesnt mean anything, jaxrs-application is the way to
reference the implicit JAXRS Application subclass if you dont provide one
(if you provide one you have to use your class name).

class-name for you will likely be the class name of your pojo webservice or
use ejb-deployment if your webservice is an ejb.

Note some recent JVM need java cryptography extension to support some SSL
cipher.

Finally to set properties you will lilkely define in resources.xml a
resource (class-name="java.util.Properties" for instance) and just
reference its name (id) as value for cxf.jaxws.properties



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-10-10 0:17 GMT+02:00 Jim Doyle <ro...@gmail.com>:

> I corrected that type and still receive the same exception. Now using
> below.
> This is a client error.  My web application is attempting to consume a
> remote SOAP service. Same code worked great in TomEE 1.7.1 using the older
> version of the JDK.  Updating JDK to latest 1.7/1.8 caused this exception
> to
> manifest.
>
> <?xml version="1.0"?>
> <openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
>     <pojo-deployment class-name=&quot;&lt;b>jaxws-application*">
>         <properties>
>             *cxf.jaxws.properties = disableCNCheck=true*
>         </properties>
>     </pojo-deployment>
> </openejb-jar>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/CXF-in-TomEE-how-to-set-the-disableCNCheck-global-option-tp4676463p4676466.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CXF in TomEE: how to set the disableCNCheck global option?

Posted by Jim Doyle <ro...@gmail.com>.
I corrected that type and still receive the same exception. Now using below.
This is a client error.  My web application is attempting to consume a
remote SOAP service. Same code worked great in TomEE 1.7.1 using the older
version of the JDK.  Updating JDK to latest 1.7/1.8 caused this exception to
manifest. 

<?xml version="1.0"?>
<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
    <pojo-deployment class-name=&quot;&lt;b>jaxws-application*">
        <properties>
            *cxf.jaxws.properties = disableCNCheck=true*
        </properties>
    </pojo-deployment>
</openejb-jar>



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CXF-in-TomEE-how-to-set-the-disableCNCheck-global-option-tp4676463p4676466.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CXF in TomEE: how to set the disableCNCheck global option?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

is it a server or client error? if client error just configure it of the
client with ClientProxy, if server didnt you mix jaxrs and jaxws config?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-10-09 23:28 GMT+02:00 Jim Doyle <ro...@gmail.com>:

> How do I configure CXF (embedded in TomEE) with the global variable
> suggested
> by this Exception?
>
> Caused by: java.io.IOException: The https URL hostname does not match the
> Common Name (CN) on the server certificate in the client's truststore.
> Make
> sure server certificate is correct, or to disable this check (NOT
> recommended for production) set the CXF client TLS configuration property
> "disableCNCheck" to true.
>
> I tried placing below in src/webapp/META-INF/openejb-jar.xml and it failed
> to work.
> <?xml version="1.0"?>
> <openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
>     <pojo-deployment class-name="jaxrs-application">
>         <properties>
>             cxf.jaxws.properties = disableCNCheck=true
>         </properties>
>     </pojo-deployment>
> </openejb-jar>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/CXF-in-TomEE-how-to-set-the-disableCNCheck-global-option-tp4676463.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>