2 Replies Latest reply on Aug 31, 2007 11:29 AM by Oskar Carlstedt

    How to import relative schemas?

    Oskar Carlstedt Novice

      Hi All!

      I cannot not manage to create a deployment in Boss-5.0.0.Beta2
      where I import schemas by relative paths. Using "../"-paths are not allowed (getting an exception telling me that parent paths are not allowed). Parent paths are allowed in JBossWS 1.2.1.GA on JBoss 4.0.5.GA.

      What I'm actually doing is that I create my wsdl and schema files by hand, i.e. contract first development. Then I create an endpoint provider to handle incoming requests.

      In the endpoint I set the wsdl location to WEB-INF/wsdl/... This is working, JBoss finds my wsdl file but cannot resolve schema the relative path of imported schemas.

      Does anyone know how to solve this problem?


      Thanks
      Oskar

        • 1. Re: How to import relative schemas?
          Oskar Carlstedt Novice

          Some more info...

          The schemas I'm using are including other schemas too, that are also referenced by a relative schema location. So it's is i kind of nested schema imports in several schemas. All schemas are not directly located under WEB-INF/wsdl, instead they are located under their resp. http-path on another schema-server, e.g. WEB-INF/wsdl/a/a.xsd, WEB-INF/wsdl/b/b.xsd

          //Oskar

          • 2. Re: How to import relative schemas?
            Oskar Carlstedt Novice

            I posted i Jira issue about this http://jira.jboss.org/jira/browse/JBWS-1798.

            *******************************************

            I deploy an ear file in JBoss5 that contains a war and a jar fil. The jar file contains a SLSB and the war file contains the web service (implemented as a Provider[SOAPMessage]). The war file has the following file structure in the the WEB-INF/wsdl folder:

            WEB-INF/wsdl
             my-service.wsdl
             /imported
             /my-service
             /1.0-SNAPSHOT
             my-service.xsd
             /common
             /1.0-SNAPSHOT
             common.xsd
            

            the wsdl file has a schema import like
            <xsd:import schemaLocation="imported/my-service/1.0-SNAPSHOT/my-service.xsd" .../>


            the my-service.xsd imports the common.xsd file with the following import statement
            <xsd:import schemaLocation="../../common/1.0-SNAPSHOT/common.xsd" .../>


            Having this configuration will put JBoss into trouble. The error message sent is telling med that parent paths are not allowed, and pointing out to use getParent() instead. So I setting the schemaLocation attribute to getParent()/getParent()/.... will point out another path, but it is completely wrong.


            *******************************************

            Best
            /Oskar