cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev <>
Subject Re: Question regarding SOAPBody and precreated XML payload
Date Thu, 21 Jul 2011 21:05:38 GMT
Thanks a bunch Daniel your suggestion helped  , I do not get that error
however now I am getting the following error: -

aused by: 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 am using the following code: -

		 * Provide handle to key store for SSL hand shake.
		System.setProperty("", "truststore.jks");
		System.setProperty("", "xxx");
		System.setProperty("", "truststore.jks");
		System.setProperty("", "xxx");
		HostnameVerifier hv = new HostnameVerifier() {
			public boolean verify(String urlHostName, SSLSession session) {
				System.out.println("Warning: URL Host: " + urlHostName
						+ " vs. " + session.getPeerHost());
				return true;

This is allowing me to access WSDL from the server and get the service name
and port name using the following API, without the above piece of code I was
getting IOException regarding URL mismatch between certificate all the time:

WSDLServiceFactory sf = new WSDLServiceFactory(CXFBusFactory
				.getThreadDefaultBus(), url);

		Definition definition = sf.getDefinition();

		List<ServiceInfo> services;
		services = new

However when i am actually sending the SOAP request to the server I am
running into the error as I mentioned earlier. The error message seems to
hint the workaround, but with the APIs I am using I don't know if it will
work. Any idea? 

View this message in context:
Sent from the cxf-dev mailing list archive at

View raw message