Guys.. need help asap. I don't know if this is directly related to "tomcat" but here is the situation:
1. I have deployed web services on tomcat 2. they listen on a secure port - https://<host>:port/<endpoint>/ 3. mutual authentication on the server side is established. implies, i have configured the server to have a truststore & a keystore. keystore contains server privkey. truststore contains client publickey. 4. this mutual authentication works via the browser (i mean..if the client is a browser). 5. what i want is, i want to test this using a Java client with/without Spring. Currently it uses spring. How can i do that? I have some code written already.. but with this, it is not able to connect to the secure port. if i expose the same webservice on a non-secure port, it works fine. So, below listed code works for http but doesn't work for https. When I hit the "https" port, it complains like this. It is basically not even able to send the message because we need to figure out how to accept server certificate & produce my client certificate. -- javax.net.ssl.SSLHandshakeException: SSLHandshakeException invoking https:<name> -- javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -- Exception in thread "main" javax.xml.ws.WebServiceException: Could not send Message. ------------------------------- // client code.. ------------------------------- public final class Client { private Client() { } public static void main(String args[]) throws Exception { ClassPathXmlApplicationContext sprcontext = new ClassPathXmlApplicationContext( new String[] { "client-config.xml" }); WebService client = (WebService) sprcontext.getBean("client"); // will build the request here.. Response response = client.myOperation(request); } } ------------------------------- // config file --------------- ------------------------------- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:http="http://cxf.apache.org/transports/http/configuration" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd"> <bean id="client" class="com.mycompany.web.service.WebService" factory-bean="clientFactory" factory-method="create" /> <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property name="serviceClass" value="com.scivantage.chimera.service.TaxLotsService" /> <property name="address" value="https://host:8081/myapp" /> </bean> </beans> -- View this message in context: http://old.nabble.com/Client-to-communicate-to-SSL-WebServices-on-tomcat-tp29780497p29780497.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org