JAXWS client doesn't have http-conduit properties injected
----------------------------------------------------------

                 Key: CXF-1951
                 URL: https://issues.apache.org/jira/browse/CXF-1951
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.1.3
         Environment: Windows XP
            Reporter: Sriram Chavali


This is an issue I am reporting from the problem discussion in the mailing 
group - 
http://www.nabble.com/Set-custom-HostnameVerifier-on-jaxws%3Aclient-definition-td20861174.html

My CXF configuration is as following:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
        xmlns:cxf="http://cxf.apache.org/core";
        xmlns:jaxws="http://cxf.apache.org/jaxws";
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                            http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd 
                            http://cxf.apache.org/jaxws 
http://cxf.apache.org/schemas/jaxws.xsd
                            http://cxf.apache.org/core 
http://cxf.apache.org/schemas/core.xsd";>

    <import resource="classpath:META-INF/cxf/cxf.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>

        <bean id="logInbound" 
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
        <bean id="logOutbound" 
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />

        <cxf:bus>
                <cxf:inInterceptors>
                        <ref bean="logInbound" />
                </cxf:inInterceptors>
                <cxf:outInterceptors>
                        <ref bean="logOutbound" />
                </cxf:outInterceptors>
                <cxf:inFaultInterceptors>
                        <ref bean="logOutbound" />
                </cxf:inFaultInterceptors>
        </cxf:bus> 
       

       <http-conf:conduit name="*.http-conduit"> 
                <http-conf:tlsClientParameters disableCNCheck="true"/>        
       </http-conf:conduit>  
       <jaxws:client id="locationClient" 
           
serviceClass="com.consortemedia.webservice.api.LocationServiceService"
           
wsdlLocation="https://marketing.ews.yahooapis.com/services/V4/LocationService?wsdl"/>
          
</beans>

I put break points in the CXF source and I can see that the http-conduit 
settings are being read correctly. I also set a breakpoint @ . 
org.apache.cxf.configuration.jsse.TLSClientParameters:isDisableCNCheck. However 
I don't see this break point being hit which leads me to believe that the 
http-conduit settings are not being injected in the client. When the client is 
being created I see the following stacktrace:

DEBUG - DefaultResourceManager.findResource(89) | resolving resource 
<https://marketing.ews.yahooapis.com/services/V4/LocationService?wsdl> type 
<class java.net.URL>
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem 
parsing 
'https://marketing.ews.yahooapis.com/services/V4/LocationService?wsdl'.: 
java.io.IOException: HTTPS hostname wrong:  should be 
<marketing.ews.yahooapis.com>
        at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at 
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:212)
        at 
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:176)
        at 
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:81)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:311)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:408)
        at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:189)
        at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
        at 
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
        at 
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:52)
        at 
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
        at 
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:115)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
        at 
org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:213)
        at 
org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:189)
        at 
org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:169)
        at 
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:140)
        at 
org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:98)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to