Woden
  1. Woden
  2. WODEN-85

XML Catalog common files should be downloaded/cached to a well known path

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: M7
    • Component/s: None
    • Labels:
      None

      Description

      The XML catalog mechanism requires common schemas and DTDs, namely:

      datatypes.dtd
      wsdl20.xsd
      xml.xsd
      XMLSchema.dtd
      XMLSchema.xsd

      These should be downloaded and cached in a well known local path via a script. This path should be appropriate for running Woden with XML catalog (i.e. relative the the base URI property set by the relevant system property for XML catalog). There should not be any need to manually copy these files to a point appropriate for the base URI - it should be possible to do this by running a suitable ANT target.

      1. W3Ctests.catalog
        8 kB
        Graham Turrell

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        34d 7h 47m 1 Graham Turrell 19/Dec/06 18:02
        In Progress In Progress Resolved Resolved
        9d 6h 26m 1 Graham Turrell 29/Dec/06 00:28
        Resolved Resolved Closed Closed
        25d 8h 58m 1 John Kaputin 23/Jan/07 09:26
        John Kaputin made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        John Kaputin added a comment -

        Standard, common schemas and DTDs are now stored locally and resolved correctly.

        Show
        John Kaputin added a comment - Standard, common schemas and DTDs are now stored locally and resolved correctly.
        Hide
        John Kaputin added a comment -

        I have tested the resolver framework and I'm happy with it. I've made a small change to the ant-test build.xml as follows.

        r496546 added the Woden project root directory to the classpath defined in the "validateWSDL20" taskdef so that, when running the WSLD 2.0 test suite network-disconnected, the schema.catalog file will be located correctly by the resolver framework which uses it to resolve URLs for the standard, common schemas and DTDs to local copies.

        Show
        John Kaputin added a comment - I have tested the resolver framework and I'm happy with it. I've made a small change to the ant-test build.xml as follows. r496546 added the Woden project root directory to the classpath defined in the "validateWSDL20" taskdef so that, when running the WSLD 2.0 test suite network-disconnected, the schema.catalog file will be located correctly by the resolver framework which uses it to resolve URLs for the standard, common schemas and DTDs to local copies.
        Graham Turrell made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Graham Turrell made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Graham Turrell made changes -
        Assignee Graham Turrell [ gturrell ]
        Hide
        Graham Turrell added a comment -

        Here's the plan:

        Create an ant task in woden build.xml to download the wsdl20 schema, xml schema and dtd files directly from w3c (this is currently done in downloads/w3c/build.xml target "copy-wsdl-xsd"). This task will be used as part of the woden.jar build process. In addition, a fixed-content URI Resolver Catalog file ("system.catalog"), containing resolves for each of those files, to the local destination within woden.jar (or the development environment). The files will appear in directory /schema in woden.jar. In a development environment (ie no woden.jar), the ant task would need be run manually to create /schema and contents under (for example) eclipse project root. Omitting this step is non-destructive - if the location schema files are not found when woden is executed, it will simply look for them in the regular w3c location on the net.

        I think the w3c build.xml could be changed to reference the schema embedded into the woden.jar the test-suite uses, rather than download its own set as it does currently.

        The existence of this new system ("hidden") catalog is in addition to the traditional catalog file (now called the "user catalog"). The system catalog is loaded first followed by the user catalog, which may override system catalog entries if so required.

        I have a working proof-of-concept for the code changes in my sandbox and am working on the ant task changes. However, I'd like to take any questions / possible concerns before going too much further.

        Show
        Graham Turrell added a comment - Here's the plan: Create an ant task in woden build.xml to download the wsdl20 schema, xml schema and dtd files directly from w3c (this is currently done in downloads/w3c/build.xml target "copy-wsdl-xsd"). This task will be used as part of the woden.jar build process. In addition, a fixed-content URI Resolver Catalog file ("system.catalog"), containing resolves for each of those files, to the local destination within woden.jar (or the development environment). The files will appear in directory /schema in woden.jar. In a development environment (ie no woden.jar), the ant task would need be run manually to create /schema and contents under (for example) eclipse project root. Omitting this step is non-destructive - if the location schema files are not found when woden is executed, it will simply look for them in the regular w3c location on the net. I think the w3c build.xml could be changed to reference the schema embedded into the woden.jar the test-suite uses, rather than download its own set as it does currently. The existence of this new system ("hidden") catalog is in addition to the traditional catalog file (now called the "user catalog"). The system catalog is loaded first followed by the user catalog, which may override system catalog entries if so required. I have a working proof-of-concept for the code changes in my sandbox and am working on the ant task changes. However, I'd like to take any questions / possible concerns before going too much further.
        John Kaputin made changes -
        Fix Version/s M7 [ 12312173 ]
        Hide
        John Kaputin added a comment -

        Flagged for M7 release. Graham is already looking into this it should be assigned to him when he gets karma.

        Note also, that this JIRA is releated to and possibly a duplicate of WODEN-83 which Arthur is already working on.

        Show
        John Kaputin added a comment - Flagged for M7 release. Graham is already looking into this it should be assigned to him when he gets karma. Note also, that this JIRA is releated to and possibly a duplicate of WODEN-83 which Arthur is already working on.
        Hide
        Arthur Ryman added a comment -

        This is not the way to fix the problem permanently. We need to jar up these xsd and dtd files and package them with Woden. The catalog should point to the jar location.

        However, this is a good approach for the test cases since we don't have to modify the JUnits. However, the JUnit approach is awkward because the test suite keeps growing. Why not just use the WSDL20Validate Ant task on the W3C Test Suite?

        Show
        Arthur Ryman added a comment - This is not the way to fix the problem permanently. We need to jar up these xsd and dtd files and package them with Woden. The catalog should point to the jar location. However, this is a good approach for the test cases since we don't have to modify the JUnits. However, the JUnit approach is awkward because the test suite keeps growing. Why not just use the WSDL20Validate Ant task on the W3C Test Suite?
        Graham Turrell made changes -
        Field Original Value New Value
        Attachment W3Ctests.catalog [ 12345285 ]
        Hide
        Graham Turrell added a comment -

        The attached catalog file can be used with the simple URI resolver and these new schema downloads.
        Use with the following system properties on the Ant JVM commandline (under Ant JVM VM arguments in eclipse) for the ant-task/build.xml [main] target.

        -Dorg.apache.woden.resolver.simpleresolver.catalog="<chosen-directory>\W3Ctests.catalog" -Dorg.apache.woden.resolver.simpleresolver.base="<download location>\downloads\w3c
        "

        <chosen directory> is the filepath location of the catalog file on your system
        <download location> is the directory into which ant task downloads. In eclipse, use $

        {project_loc}

        This reduces build time for this task on my machine from 44 Minutes to 51 seconds, so thanks, Arthur & John, for taking the initiative with this!

        Show
        Graham Turrell added a comment - The attached catalog file can be used with the simple URI resolver and these new schema downloads. Use with the following system properties on the Ant JVM commandline (under Ant JVM VM arguments in eclipse) for the ant-task/build.xml [main] target. -Dorg.apache.woden.resolver.simpleresolver.catalog="<chosen-directory>\W3Ctests.catalog" -Dorg.apache.woden.resolver.simpleresolver.base="<download location>\downloads\w3c " <chosen directory> is the filepath location of the catalog file on your system <download location> is the directory into which ant task downloads. In eclipse, use $ {project_loc} This reduces build time for this task on my machine from 44 Minutes to 51 seconds, so thanks, Arthur & John, for taking the initiative with this!
        Hide
        Arthur Ryman added a comment -

        These files are now downloaded to

        downloads/w3c/xmlcatalog

        by the build script. We need to jar these and modify the uri resolver config to get them.

        Show
        Arthur Ryman added a comment - These files are now downloaded to downloads/w3c/xmlcatalog by the build script. We need to jar these and modify the uri resolver config to get them.
        Hide
        Arthur Ryman added a comment -

        These files should be packaged in woden.jar.

        Show
        Arthur Ryman added a comment - These files should be packaged in woden.jar.
        John Kaputin created issue -

          People

          • Assignee:
            Graham Turrell
            Reporter:
            John Kaputin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development