I'm using JaxbWSDLBuilder to create the WSDL for a webservice. As long as I'm using types from a single namespace there are no problems, but when I use different namespaces the WSDLBuilder creates a file that contains tags like <xs:import schemaLocation=" schema2.xsd" />. Although the content of schema2.xsd is also found in the WSDL, I cannot parse such a file as I get the exception attached below. Obviously the file schema2.xsd cannot be located. Is there a way to tell XFire not to add the <xs:import> or not to resolve imports relative to the current position?
Cheers, Philippe org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'calculator': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xFireProxyBeanGen': Invocation of init method failed; nested exception is org.codehaus.xfire.XFireRuntimeException: Could not load WSDL.. Nested exception is javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema[2]): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at ' schema1.xsd' relative to document base '' Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xFireProxyBeanGen': Invocation of init method failed; nested exception is org.codehaus.xfire.XFireRuntimeException : Could not load WSDL.. Nested exception is javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema[2]): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at 'schema1.xsd ' relative to document base '' Caused by: org.codehaus.xfire.XFireRuntimeException: Could not load WSDL.. Nested exception is javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xs:schema[2]): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at ' schema1.xsd' relative to document base '' WSDLException (at /wsdl:definitions/wsdl:types/xs:schema[2]): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at 'schema1.xsd' relative to document base '': at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes (Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions (Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.codehaus.xfire.service.binding.ObjectServiceFactory.create( ObjectServiceFactory.java :178) at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.makeClient( XFireClientFactoryBean.java:504) at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.createClient( XFireClientFactoryBean.java :412) at org.codehaus.xfire.spring.remoting.XFireClientFactoryBean.afterPropertiesSet (XFireClientFactoryBean.java:119) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods( AbstractAutowireCapableBeanFactory.java:1062) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1029) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean( AbstractAutowireCapableBeanFactory.java:420) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject( AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton( DefaultSingletonBeanRegistry.java:141) 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.context.support.AbstractApplicationContext.getBean( AbstractApplicationContext.java:642) at ch.elca.el4j.services.remoting.protocol.XFire.createProxyBean ( XFire.java:77) at ch.elca.el4j.services.remoting.RemotingProxyFactoryBean.getFreshServiceProxy (RemotingProxyFactoryBean.java:97) at ch.elca.el4j.services.remoting.RemotingProxyFactoryBean.getObject( RemotingProxyFactoryBean.java :130) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean (AbstractBeanFactory.java:994) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance( AbstractBeanFactory.java:960) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean( AbstractBeanFactory.java:156) at org.springframework.context.support.AbstractApplicationContext.getBean( AbstractApplicationContext.java:642) at ch.elca.el4j.tests.remoting.CalculatorXFireTest.setUp( CalculatorXFireTest.java :65) at junit.framework.TestCase.runBare(TestCase.java:128) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run (TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run( JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run ( TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests( RemoteTestRunner.java :673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run( RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:196)
