Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-567

Problems with XMLBeans Extension Interfaces Feature

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Version 5.0.0
    • Version 5.1.0
    • None
    • None

    Description

      Hello! In our project we are using XMLBeans Extension Interfaces Feature. When we compile the TypeSystem (using SchemaTypeSystemCompiler.compile), we add the jar with our extension classes to classpath parameter. In XMLBeans 2.4 it works perfectly. But when we updated to XMLBeans 5.0.0, we encountered the following error during an extensions validation:

      Interface 'SomeInterface' not found."
      

      As far as I understand, this is because org.apache.xmlbeans.impl.config.Parser does not search classes in classpath (only in files).

      When we added the sources of the extension interface to the parameters, TypeSystem compiled successfuly. But then we ran into another problem. When XMLBeans generates java files from XSD, it uses simple class names (instead of fully qualified names as it was in XMLBeans 2.4.0) for the classes that are used in methods of the extension interface (like parameters types or return types). And therefore the geneted files cannot be compiled if the extension classes are in a different package.

      Are those changes (ingorning classpath when searching for extenstions and using simple names for extenstion classes in code generation instead of fully qualified names) were made intentionally? Such limitations are hard to work around, making an upgrade from older XMLBeans version very complicated.

      Attachments

        1. xmlbeans-ie-tryout.tar
          30 kB
          Peter Keller
        2. xmlbeans-ie-tryout2.tar
          30 kB
          Peter Keller

        Activity

          People

            Unassigned Unassigned
            dlastochkin Dmitry Lastochkin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m