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

Method naming when an extension method is defined, which returns a generated type



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Version 2.2
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
    • Environment:
      Linux, jdk1.6.0, xmlbeans-2.2.0


      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">

      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.




            • Assignee:
              radup Radu Preotiuc
              recht Joakim Recht
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: