wsdlLocation value of jaxws:endpoint being resolved differently between 
CXFServlet and ContextLoaderListener versions.
----------------------------------------------------------------------------------------------------------------------

                 Key: CXF-1808
                 URL: https://issues.apache.org/jira/browse/CXF-1808
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.2
            Reporter: Glen Mazza
            Priority: Minor


>From my DoubleIt sample[1], the wsdlLocation value in a jaxws:endpoint element 
>appears to be resolved differently when read as part of cxf-servlet.xml 
>(directly from CXFServlet, no ContextLoaderListener in web.xml) compared to 
>the ws-beans.xml file (read from the ContextLoaderListener in web.xml).  When 
>I try to read in the wsdlLocation of "WEB-INF/wsdl/DoubleIt.wsdl" from 
>cxf-servlet.xml, everything works fine--the wsdl is properly read from that 
>directory.  But when I use the same value with ContextLoaderListener in the 
>ws-beans.xml file, it is resolving the file incorrectly--the error stack is 
>showing it's resolving from my IDE directory:  
>/work/myapps/eclipse/WEB-INF/wsdl/DoubleIt.wsdl.

wsdlLocation should be resolved using the same rules, whether from CXFServlet 
or the ContextLoaderListener.    Note when I remove wsdlLocation from the 
ws-beans.xml (i.e., rely on CXF to regenerate the wsdl from scratch), the web 
service works fine.

Error stack I'm getting with ContextLoaderListener and the wsdLocation value 
given above in ws-beans.xml:
[INFO] </pre></p><p><b>root cause</b> 
<pre>org.apache.cxf.service.factory.ServiceConstructionException: Failed to 
create service.
[INFO]  
org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:83)
[INFO]  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:308)
[INFO]  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:403)
[INFO]  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:188)
[INFO]  
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164)
[INFO]  
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100)
[INFO]  
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:116)
[INFO]  
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:168)
[INFO]  org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:336)
[INFO]  org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:251)
[INFO]  org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:201)
[INFO]  org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:394)
[INFO]  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO]  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[INFO]  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO]  java.lang.reflect.Method.invoke(Method.java:597)
[INFO]  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1242)
[INFO]  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)
[INFO]  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
[INFO]  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
[INFO]  
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
[INFO]  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
[INFO]  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
[INFO]  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
[INFO]  
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
[INFO]  
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
[INFO]  
org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:161)
[INFO]  
org.apache.cxf.transport.servlet.CXFServlet.updateContext(CXFServlet.java:129)
[INFO]  
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:101)
[INFO]  org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:70)
[INFO]  
org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:90)
[INFO]  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[INFO]  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
[INFO]  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
[INFO]  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
[INFO]  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
[INFO]  java.lang.Thread.run(Thread.java:619)
[INFO] </pre></p><p><b>root cause</b> <pre>javax.wsdl.WSDLException: 
WSDLException: faultCode=PARSER_ERROR: Problem parsing 
'WEB-INF/wsdl/DoubleIt.wsdl'.: java.io.FileNotFoundException: 
/work/myapps/eclipse/WEB-INF/wsdl/DoubleIt.wsdl (No such file or directory)
[INFO]  com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
[INFO]  com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[INFO]  com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
[INFO]  
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:212)
[INFO]  
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:176)
[INFO]  
org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:81)
[INFO]  
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:308)

[1] http://www.jroller.com/gmazza/date/20080417#WFstep8

-- 
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