Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: WSDL generation issue with import on WLS

  1. #1

    Default WSDL generation issue with import on WLS

    Hey, and first of all I would first like to express my gratitude to you guys for providing such a good contract-first framework!

    I have an issue with generating wsdl-files with 1.5 release. The imported file is not found when deployed on the WebLogic Server 8.1: (it works fine in Jetty).

    <bean id="sc" class="org.springframework.xml.xsd.commons.Commons XsdSchemaCollection">
    <property name="xsds">
    <list>
    <value>/WEB-INF/xsd/PropertyMessages.xsd</value>
    </list>
    </property>
    <property name="inline" value="true" />
    </bean>

    Where PropertyMessages.xsd has can import of PropertyTypes.xsd:

    <xs:import namespace="xxx" schemaLocation="PropertyTypes.xsd">
    </xs:import>

    But PropertyTypes.xsd is not found. That's what the Norwegian error says in the following stacktrace:


    Caused by: org.apache.ws.commons.schema.XmlSchemaException: C:\bea81\testwls\mydomain\PropertyTypes.xsd (Systemet finner ikke angitt fil)
    at org.apache.ws.commons.schema.XmlSchemaCollection.r ead(XmlSchemaCollection.java:308)
    at org.apache.ws.commons.schema.SchemaBuilder.resolve XmlSchema(SchemaBuilder.java:1884)
    at org.apache.ws.commons.schema.SchemaBuilder.handleI mport(SchemaBuilder.java:1620)
    at org.apache.ws.commons.schema.SchemaBuilder.handleX mlSchemaElement(SchemaBuilder.java:175)
    at org.apache.ws.commons.schema.SchemaBuilder.build(S chemaBuilder.java:82)
    at org.apache.ws.commons.schema.XmlSchemaCollection.r ead(XmlSchemaCollection.java:359)
    at org.apache.ws.commons.schema.XmlSchemaCollection.r ead(XmlSchemaCollection.java:304)
    at org.apache.ws.commons.schema.XmlSchemaCollection.r ead(XmlSchemaCollection.java:315)
    at org.springframework.xml.xsd.commons.CommonsXsdSche maCollection.afterPropertiesSet(CommonsXsdSchemaCo llection.java:109)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1333)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1299)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:463)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:375)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 63)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:170)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:260 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:184)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:163)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:269)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:978)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:462)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:375)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 63)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:170)


    It looks for the file in the root of the application server.

    Is there a way to solve this? Having it look inside the deployed war-file.

    Best regards,
    Tor

  2. #2
    Join Date
    Feb 2006
    Location
    Hampshire
    Posts
    21

    Unhappy Confirming issue

    I do get the same problem.

    May be irrelevant, but I did notice I have a maven dependency on spring-ws 1.5.0. However I notice in the build that ws-core is is version rc1: spring-ws-core-1.5.0-rc1.jar , while all ther other ws jars are 1.5.0


    This is my xml

    Code:
    	<bean id="schemas" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
    	    <property name="xsds">
    	        <list>
    	            <value>classpath:blah/blah/blah/messages/QuizMessages.xsd</value>
    	            <value>classpath:blah/blah/blah/elements/QuizElements.xsd</value>
    	        </list>
    	    </property>
    	    <property name="inline" value="true"/>
    	</bean>
    Where in the messages xsd I have this:

    Code:
    	 <import namespace="http://blah.blah.blah/blah/elements" 
    	 		schemaLocation="../elements/QuizElements.xsd" />
    and this is the top stack

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schemas' defined in class path resource [endpoints.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: C:\Code\trunk\elements\QuizElements.xsd (The system cannot find the path specified)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1302)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:430)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)

    further down


    Code:
    Caused by: java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: C:\Code\trunk\elements\QuizElements.xsd (The system cannot find the path specified)
    	at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1886)
    	at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1620)
    	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:175)
    	at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:82)
    	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:359)

    and further down

    Code:
    java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException: C:\Code\trunk\elements\QuizElements.xsd (The system cannot find the path specified)
    	at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1886)
    	at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1620)
    	at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:175)
    	at org.apache.ws.commons.schema.SchemaBuilder.build(SchemaBuilder.java:82)
    	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:359)
    	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:304)
    	at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:315)
    	at org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection.afterPropertiesSet(CommonsXsdSchemaCollection.java:109)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1333)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
    	at java.security.AccessController.doPrivileged(Native Method)

  3. #3
    Join Date
    Feb 2006
    Location
    Hampshire
    Posts
    21

    Question

    removed my rc1 transative dependencies. So the problem exists with 1.5.0 release

  4. #4
    Join Date
    Feb 2006
    Location
    Hampshire
    Posts
    21

    Default

    I encounter this problem in jetty btw.

  5. #5
    Join Date
    Feb 2006
    Location
    Hampshire
    Posts
    21

    Default

    Circumvented the issue since i merged to one xsd and not using the schemacollection bean.

    Now use this instead
    Code:
    <property name="schema">
     		     <bean class="org.springframework.xml.xsd.SimpleXsdSchema">
           			<property name="xsd" value="classpath:blah/blah/QuizMessages.xsd"/>
         		</bean>
         	</property>
    But will eventually use collection again. Presume perhaps that the collection is an Apache Commons XSD style. could that be the issue?

  6. #6
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    This seems more a Commons XSD SChema bug, which doesn't seem to resolve files they way it should. We can try to fix this by writing our own org.apache.ws.commons.schema.resolver.URIResolver, and make it a bit more clever than the default.

    Flurdy, could you please create a JIRA issue for this?

    Thanks
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  7. #7
    Join Date
    Oct 2007
    Posts
    28

    Default Maybe wait for xmlschema 1.4.2

    Well, maybe it's fixed in apache ws xmlschema 1.4.2.

    The vote is ongoing, see http://marc.info/?l=axis-dev&m=120849698030494&w=2

  8. #8

    Default

    fbascheper, I am curious, how do you know this is fixed in this new version of xmlschema?

    Tor
    Tor Arne Kvaløy
    Integration developer and architect
    Tarantell.no

  9. #9
    Join Date
    Oct 2007
    Posts
    28

    Default

    Well, I don't think I said I *know* this is fixed and I certainly didn't mean to say that. Arjen suggested that it looks like a "Commons XSD Schema bug".

    Based on this assumption, I was merely suggesting that it *might* be fixed in the upcoming release of xmlschema (1.4.2). On the other hand, it is entirely possible that it doesn't work at all, or that other features of Spring-WS that rely upon xmlschema don't work anymore with this release due to API changes in 1.4.2.

    You can check for yourself with the (unofficial) zips at http://people.apache.org/~dims/axis2-1.4-commons/ (but you're on your own).

  10. #10
    Join Date
    Oct 2007
    Posts
    28

    Default

    Update: a (mirrored) official release can be found at http://apache.mirrors.webazilla.nl/w...lSchema/1_4_2/
    (and other apache mirrors of course).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •