You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Guillaume JOUANJAN (JIRA)" <ji...@apache.org> on 2011/08/31 08:39:10 UTC

[jira] [Created] (CXF-3781) Problems occuring when dynamic creation of client with wsdl in https

Problems occuring when dynamic creation of client with wsdl in https
--------------------------------------------------------------------

                 Key: CXF-3781
                 URL: https://issues.apache.org/jira/browse/CXF-3781
             Project: CXF
          Issue Type: Bug
          Components: Transports
    Affects Versions: 2.4.2
         Environment: Spring, JBoss, Apache CXF 2.4.2, Windows XP
            Reporter: Guillaume JOUANJAN


Hello ,

First of all , sorry for my english , i'm a french developer.

My goal is to call dynamically web services method using a WSDL (the only information i have + name of methods)

I've got a problem with the following code :

String urlWsdl = "https://10.33.30.138:8443/eLBG-Server/WS/LogbookWS.LogbookWSHttpSoap12Endpoint?wsdl";
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.
newInstance();
Client clientWS = factory.createClient(urlWsdl);

I've got the following error :

10:04:22,562 ERROR [[rmm-ata]] "Servlet.service()" pour la servlet rmm-ata a g´┐¢n´┐¢r´┐¢ une exception
java.security.cert.CertificateException: No subject alternative names present
        at sun.security.util.HostnameChecker.matchIP(Unknown Source)
        at sun.security.util.HostnameChecker.match(Unknown Source)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        at org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:167)
        at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:90)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:561)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:259)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:204)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:197)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:152)
        at com.airbus.rmm.controller.ManualController.send(ManualController.java:174)

I have specified a http conduit in spring configuration file but it seems that information inside is not managed and the disableCNCheck=false is still active

my http-conduit conf :

<http:conduit name="*.http-conduit">

        <http:tlsClientParameters secureSocketProtocol="TLS" disableCNCheck="true">
          <sec:keyManagers keyPassword="password">
               <sec:keyStore type="JKS" password="password"
                    file="../classes/server.jks"/>
          </sec:keyManagers>
          <sec:trustManagers>
              <sec:keyStore type="JKS" password="password"
                   file="../classes/server.jks"/>
          </sec:trustManagers>
          <sec:cipherSuitesFilter>
            <!-- these filters ensure that a ciphersuite with
              export-suitable or null encryption is used,
              but exclude anonymous Diffie-Hellman key change as
              this is vulnerable to man-in-the-middle attacks -->
            <sec:include>.*_EXPORT_.*</sec:include>
            <sec:include>.*_EXPORT1024_.*</sec:include>
            <sec:include>.*_WITH_DES_.*</sec:include>
            <sec:include>.*_WITH_NULL_.*</sec:include>
            <sec:exclude>.*_DH_anon_.*</sec:exclude>
          </sec:cipherSuitesFilter>
      </http:tlsClientParameters>
      <http:authorization>
         <sec:UserName>nandana</sec:UserName>
         <sec:Password>password</sec:Password>
      </http:authorization>
      <http:client AutoRedirect="true" Connection="Keep-Alive"/>

   </http:conduit>
  

I've tried also a http-conduit name ="https://10.33.30.138:8443/*" but i've got the same error.

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve URL "https://10.33.30.138:8443/eLBG-Server/WS/LogbookWS.LogbookWSHttpSoap12Endpoint?wsdl".
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

cause mère

org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve URL "https://10.33.30.138:8443/eLBG-Server/WS/LogbookWS.LogbookWSHttpSoap12Endpoint?wsdl".
	org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:569)
	org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:259)
	org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:204)
	org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:197)
	org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:152)
	com.airbus.rmm.controller.ManualController.send(ManualController.java:172)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	java.lang.reflect.Method.invoke(Unknown Source)
	org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
	org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

cause mère

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
	com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
	com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

The "mother cause" seems to be the

Could not resolve URL "https://10.33.30.138:8443/eLBG-Server/WS/LogbookWS.LogbookWSHttpSoap12Endpoint?wsdl

but with internet explorer the url is good (after accepting certificates)

Moreover url of WSDL is calculated dynamically because end user set himself via HMI the url of Web Service (i.e : https://10.33.30.138:8443/eLBG-Server/WS/LogbookWS) i only add the endpoint + ? wsdl

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira