XFire can't find schema when xsd:import is used
-----------------------------------------------

                 Key: XFIRE-875
                 URL: http://jira.codehaus.org/browse/XFIRE-875
             Project: XFire
          Issue Type: Bug
    Affects Versions: 1.2.4, 1.2.3
            Reporter: Chris Moesel
         Assigned To: Dan Diephouse
         Attachments: xfire-calc-service.zip

If my types are defined in an external .xsd document, and I import them into 
the WSDL using xsd:import tag (or xsd:include), I get the following error:

09:23:27 ERROR ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'calculatorWebService' defined in ServletContext resource 
[/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested 
exception is org.codehaus.xfire.XFireRuntimeException: Couldn't find schema 
part: {http://example.com/calculator/types}simpleAddition
Caused by: 
org.codehaus.xfire.XFireRuntimeException: Couldn't find schema part: 
{http://example.com/calculator/types}simpleAddition
        at 
org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder.isWrapped(WSDLServiceBuilder.java:554)
        at 
org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator.setWrapped(WSDLServiceConfigurator.java:143)
        at 
org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator.<init>(WSDLServiceConfigurator.java:83)
        at 
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:225)
        at 
org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:181)
        at 
org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:410)
        at 
org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:172)
        at 
org.codehaus.xfire.spring.remoting.XFireExporter.afterPropertiesSet(XFireExporter.java:30)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
        at 
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
        at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
        at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:698)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

I am doing contract-first development with jax-ws and jaxb 2.0.  I am also 
using Spring 2.0.1.

A zip file is attached.  In order to work, please copy xfire-all and 
dependencies into WEB-INF/lib (and be sure to use Spring 2.0 instead of Spring 
1.2.6).  The 'dist' ANT task will create a deployable WAR.

Link to the discussion on the xfire-users mailing list:
http://www.nabble.com/RE%3A-XFireRuntimeException%3A-Couldn%27t-find-schema-for-part%3A-...-tf3162134.html#a8775459

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to