Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-362

WSDL generation issue when xsds import other xsds

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.4
    • Component/s: OXM
    • Labels:
      None
    • Environment:
      Spring WS 1.5.3, war deployed to Jetty

      Description

      This issue is linked to the following thread http://forum.springframework.org/showthread.php?p=176210

      I store my schemas in a specific maven project together with the generated sources.

      client-messages.xsd import client-types.xsd

      In my war project, I configured the Spring-WS config file this way:

      <bean id="schemaCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
      <property name="xsds">
      <list>
      <value>classpath:client-messages.xsd</value>
      </list>
      </property>
      <property name="inline" value="true" />
      </bean>

      When generating the wsdl, the framework complains that the client-types.xsd is not found.

      Would it be possible to enhance the XsdSchemaCollection (or to write a specific org.apache.ws.commons.schema.resolver.URIResolver) which can handle the import nicely ?

      Workaround is twofolds:

      • put the xsds in the war file
      • merge the xsds in one single file (no more import statement)

        Activity

        rachono olivier created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.4 [ 11016 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        gbonk Gregory bonk added a comment -

        I got tripped up on this and I'm wondering if it's me ( probably ) or a flaw in the implementation. I'm using spring-xml-2.0.2.RELEASE.jar

        I have an issue with the following line....

        // let's try and find it on the classpath, see SWS-362
        String classpathLocation = ResourceLoader.CLASSPATH_URL_PREFIX + "/" + schemaLocation;

        Now that schema locations are beiing read in like resources on the classpath, I think they should be required to be defined as classpath resources.

        I have some XSDs that are in the default package and others that are in/multi/level/packages. With the defaulted "/" being added the naming in our XSDs gets messed up.

        schemaLocation="/schema_1_3.xsd" />

        schemaLocation="revision/common/locale/schema_1_3.xsd" />

        In the first case the double "//" messes things up.

        Show
        gbonk Gregory bonk added a comment - I got tripped up on this and I'm wondering if it's me ( probably ) or a flaw in the implementation. I'm using spring-xml-2.0.2.RELEASE.jar I have an issue with the following line.... // let's try and find it on the classpath, see SWS-362 String classpathLocation = ResourceLoader.CLASSPATH_URL_PREFIX + "/" + schemaLocation; Now that schema locations are beiing read in like resources on the classpath, I think they should be required to be defined as classpath resources. I have some XSDs that are in the default package and others that are in/multi/level/packages. With the defaulted "/" being added the naming in our XSDs gets messed up. schemaLocation="/schema_1_3.xsd" /> schemaLocation="revision/common/locale/schema_1_3.xsd" /> In the first case the double "//" messes things up.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        64d 18h 8m 1 Arjen Poutsma 28/Jul/08 1:44 AM
        In Progress In Progress Resolved Resolved
        25m 28s 1 Arjen Poutsma 28/Jul/08 2:09 AM
        Resolved Resolved Closed Closed
        1376d 4h 53m 1 Arjen Poutsma 04/May/12 7:03 AM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            rachono olivier
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: