Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Version 2.2
-
None
-
None
-
Linux, jdk1.6.0, xmlbeans-2.2.0
Description
When an extension method returns a type, which itself is a generated type, the methods in the original interface are renamed to *2, like this:
KeyedReference addNewKeyedReference2();
instead of
KeyedReference addNewKeyedReference();
I have an extension interface with a method like this:
KeyedReference getKeyedReference(String name);
In a handler class, the corresponding static method is implemented. In xsdconfig, I have this:
<xb:extension for="dk.itst.uddi.client.types.core.CategoryBag">
<xb:interface name="dk.itst.uddi.client.extension.CategoryBagExtension">
<xb:staticHandler>dk.itst.uddi.client.extension.CategoryBagHandler</xb:staticHandler>
</xb:interface>
</xb:extension>
I have two xsdconfig files: One for namespace mapping and one for extensions. The build goes like this:
- Run xmlbeans with only namespace mapping file
- Compile the extension classes and the generated xmlbeans
- Delete generated beans (only source files)
- Generate xmlbeans with both xsdconfig files
- Compile everything
Without the extension, the extended interface has a method KeyedReference addNewKeyedReference(), but after the extension is enabled, the same method is called KeyedReference addNewKeyedReference2(). The extension method works alright.
The problem only occurs when the return type is a generated type.