Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3488

Cannot deploy webservices with schema import to paths with spaces

XMLWordPrintable

    • Hide

      Try installing on a Windows box (say, to Program Files) and deploy a webservice with schema import, like:

      <wsdl:types>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
      <xs:import namespace="http://example.com/integration/model" schemaLocation="../schema/model.xsd" />
      ...

      Show
      Try installing on a Windows box (say, to Program Files) and deploy a webservice with schema import, like: <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" <xs:import namespace="http://example.com/integration/model" schemaLocation="../schema/model.xsd" /> ...

      I cannot deploy my webservice in JBoss AS 7.1.1 due to a bug in jbossws-common 2.0.2.GA (bug is also still in trunk).

      When the path of the wsdl file has a space in it, schema imports are places in a directory with the spaces url encoded. This is due to the following line in AbstractWSDLFilePublisher#publishSchemaImports:

      File targetFile = new File(targetURL.getPath());

      I believe it should be:

      File targetFile = new File(targetURL.toURI());

      Ultimately this bug causes a FileNotFoundException later on when trying to find the imported schema in the expected location.

      I have made the change to 2.0.2.GA and verified that change has fixed my issue.

      The same line appears in publishWsdlImports, which should probably also be changed but I do not have any wsdl imports.

      Reference: http://anonsvn.jboss.org/repos/jbossws/common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java

              rhn-support-asoldano Alessio Soldano
              developusmaximus James Baxter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: