Thanks for your help. Here is the code that I am trying to use. It's from a .jsp page hosted on a web server over https with a server certificate that is trusted by the server which hosts the web service which is the endpoint.
-- First, retrieving the client certificate --
X509Certificate clientCert = null;
X509Certificate[] certs = (X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");
clientCert = certs[0];
clientDN = clientCert.getSubjectDN().toString();
-- Seting the SSL information --
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.trustStore","D:/webapps/ws_app/WEB-INF/truststore");
System.setProperty("javax.net.ssl.trustStorePassword","12345678");
-- Using the
java code for the client generated from the wsdl --
-- where 'clientDN' is the input parameter to the web service --
locator = new GetSearchesServiceLocator();
port = locator.getgetSearchesPort();
searchinfoin = new GetSearchesByOwnerInfoIn();
searchinfoin.setDn(clientDN);
-- attempt to call the web service --
allSearchesByOwner = (Searches)port.getSearchesByOwner(searchinfoin);
At this point, the call fails with a 403-Forbidden message. All this code works fine over http, by the way, where I don't have to worry about certificates. I've tried various ways of using the client certificate (the clientCert variable) to start the SSL handshake, but no luck so far. I'm obviously missing something, but haven't figured it out yet. Any help would be greatly appreciated. Thank you for your help.