[ https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537833#comment-17537833 ]
Andreas Beeker commented on XMLBEANS-567: ----------------------------------------- I haven't yet finished your test-case but here are a few findings: * add "src/main" to your first java call, you don't need the others two java calls * the extension xsdconfig wasn't used because it wasn't specified in your java invocation argument list. I've merged both xsdconfigs * the current version of javaparser-symbol-solver-core is now hard depending on guave because of some BuildCache. we need to export those lib/s now also to build/libs. I need to try to exclude the other not needed guave libs to stop dependency bloating ... * the namespace in the xsdconfig is outdated This is my xsdconfig so far: {{<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">}} {{ <!-- Use the "namespace" element to map a namespace to the Java package}} {{ name that should be generated. -->}} {{ <xb:namespace uri="http://xmlbeans.apache.org/samples/enumeration/schemaenum/easypo">}} {{ <xb:package>com.example.easypo</xb:package>}} {{ </xb:namespace>}} {{ <xb:extension for="com.example.easypo.Customer">}} {{ <xb:interface name="mypackage.CustomerFoo">}} {{ <xb:staticHandler>mypackage.CustomerFooHandler</xb:staticHandler>}} {{ </xb:interface>}} {{ </xb:extension>}} {{</xb:config>}} > Problems with XMLBeans Extension Interfaces Feature > --------------------------------------------------- > > Key: XMLBEANS-567 > URL: https://issues.apache.org/jira/browse/XMLBEANS-567 > Project: XMLBeans > Issue Type: Task > Affects Versions: Version 5.0.0 > Reporter: Dmitry Lastochkin > Priority: Major > Attachments: xmlbeans-ie-tryout.tar > > > Hello! In our project we are using [XMLBeans Extension Interfaces > Feature|https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionInterfacesFeature]. > 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: > {code} > Interface 'SomeInterface' not found." > {code} > 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. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org