Robbie,

Unfortunately that's not how HTTPS works. You need a certificate. The good news is you can easily get the certificate for any server and tell CXF to use that. Say you want to connect to the webservice at https://foo.com/MyService, if you just type that URL into a browser. You will get a warning that the certificate cannot be trusted etc. There should be some way to save the certificate. I have IE to hand; it's Details->Copy To File->DER Encoding. Save the file as foo.cer. Then make a local copy of your JVM's certificate repository:

cp ${JAVA_HOME}/jre/lib/security/cacerts ./mycerts

Then import foo.cer into mycerts:

keytool -import -noprompt -trustcacerts -alias foo -file foo.cer -storepass changeit -keystore mycerts

You can then set the javax.net.ssl.trustStore system property to the absolute path of mycerts.

Feel free to add this information verbatim into your blog, Michael.

- Chris


ripcord wrote:
Thanks for that, but it deals with supplying actual certificates. I'm trying
to configure the client so that it does not require any certificates. Any
ideas on that?


Michael Kleinhenz wrote:
Hi,

I had a similar problem like this and found the solution. I wrote a blog
article about it, maybe it can help you:

  http://www.quendor.org/archiv/428

-- Michael


ripcord schrieb:
Hi, I've created a CXF (2.1) java client against a web service and i'm
using
SSL.
I have used the TLS parameters and set the protocol to "SSL".
            TLSClientParameters tlsParams = new TLSClientParameters();
            tlsParams.setSecureSocketProtocol("SSL");
            httpConduit.setTlsClientParameters(tlsParams);

Now i'm getting the exception: sun.security.validator.ValidatorException: No trusted certificate found.
This is the same issue as:
http://www.nabble.com/client-SSL-question-td15564062.html
http://www.nabble.com/client-SSL-question-td15564062.html
Basically, I don't want to provide a certificate, I just want the client
to
accept connections to all servers. I have tried adding the trust manager defined on the following page: http://blog.progs.be/?p=71 http://blog.progs.be/?p=71
But it just causes a standard error:
org.apache.cxf.interceptor.Fault: Could not send Message.
:
Caused by: java.io.IOException: Not Found
        at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1888)


Could anyone offer advice on this?
Any help would be greatly appreciated.
Thanks.

--
Dipl.-Technoinform Michael Kleinhenz

tarent
Gesellschaft für Softwareentwicklung und IT-Beratung mbH

Heilsbachstr. 24, 53123 Bonn  | Poststr. 4-5, 10178 Berlin
fon: +49(228) / 52675-0       | fon: +49(30) / 27594853
fax: +49(228) / 52675-25      | fax: +49(30) / 78709617

Geschäftsführer: Boris Esser, Elmar Geese
HRB AG Bonn 5168 - Ust-ID: DE122264941




Reply via email to