jax-ws
  1. jax-ws
  2. JAX_WS-900

wsimport does not accept -B-catalog option

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8, current
    • Fix Version/s: 2.2.2
    • Component/s: wsimport
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      900

      Description

      Though xjc supports command line option: -catalog <file>, there is no way to
      pass this option through wsimport parameters.
      For example: specifying this for wsimport maven plugin:

      <xjcArgs>
      <xjcArg>-catalog jax-ws-catalog.xml</xjcArg>
      </xjcArgs>

      produces error message:

      No such JAXB option: -catalog jax-ws-catalog.xml

        Activity

        Hide
        donatasc added a comment -

        Created an attachment (id=282)
        Maven project demonstrating ignored catalog behaviour

        Show
        donatasc added a comment - Created an attachment (id=282) Maven project demonstrating ignored catalog behaviour
        Hide
        donatasc added a comment -

        I have created an attachment containing maven project.
        "mvn compile" completes successfully, but on each xsd file it tries to reach
        some network location and stops for 5-10 seconds. Then it prints warning and
        continues. It seems that it falls back finally to pick xsd files from local file
        system (as directed by catalog file), but these 5-10 second delays on each xsd
        are very annoying.

        Show
        donatasc added a comment - I have created an attachment containing maven project. "mvn compile" completes successfully, but on each xsd file it tries to reach some network location and stops for 5-10 seconds. Then it prints warning and continues. It seems that it falls back finally to pick xsd files from local file system (as directed by catalog file), but these 5-10 second delays on each xsd are very annoying.
        Hide
        ramapulavarthi added a comment - - edited

        Catalog is infact passed and used by XJC while parsing the schema for building the model.
        These warnings are because of an issue in XJC where it uses catalog to resolve imported schemas while
        building the forest, but during schema correctness check it does not set the
        entity resolver. In com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.java#230,
        EntityResolver is not set on the SchemaFactory. This results in to unnecessary
        warning thrown during schema resolution.

        Filed issue on jaxb:https://jaxb.dev.java.net/issues/show_bug.cgi?id=795

        Workaround: One could set com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.noCorrectnessCheck=true so that XJC does not do schema correctness check.

        Show
        ramapulavarthi added a comment - - edited Catalog is infact passed and used by XJC while parsing the schema for building the model. These warnings are because of an issue in XJC where it uses catalog to resolve imported schemas while building the forest, but during schema correctness check it does not set the entity resolver. In com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.java#230, EntityResolver is not set on the SchemaFactory. This results in to unnecessary warning thrown during schema resolution. Filed issue on jaxb: https://jaxb.dev.java.net/issues/show_bug.cgi?id=795 Workaround: One could set com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.noCorrectnessCheck=true so that XJC does not do schema correctness check.
        Hide
        ramapulavarthi added a comment -

        Though passing catalog using wsimport args works, JAX-WS always sets a entity resolver. This results in supressing the catalog passed to jaxb using xjcargs.

        Show
        ramapulavarthi added a comment - Though passing catalog using wsimport args works, JAX-WS always sets a entity resolver. This results in supressing the catalog passed to jaxb using xjcargs.
        Hide
        ramapulavarthi added a comment -

        Fixed wsimport to not set the entity resolver when its null, to not override XJC's entity resolver.

        Show
        ramapulavarthi added a comment - Fixed wsimport to not set the entity resolver when its null, to not override XJC's entity resolver.

          People

          • Assignee:
            ramapulavarthi
            Reporter:
            donatasc
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: