Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-1888

Generate Type Descriptions classes for Java Beans

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2RC3
    • None
    • None

    Description

      This is related to bug AXIS-1880.

      I would like the org.apache.axis.description.TypeDesc code that is currently generated in the Java Bean classes to be created in a JavaBean specific class (see attached example BankIdentifierTypeDesc.java). Then with the use of a TypeDescriptor factory (see attached example TypeDescFactory.java) the BeanSerializerFactory, BeanDeserializerFactory, BeanSerializer and BeanDeserializer could be changed to look up the type description using the factory rather than using the java bean class.

      This would also mean that the custom serializer and deserializer code would need to be removed from the JavaBean and the BeanSerializerFactory, BeanDeserializerFactory.

      I have tried to prototype this (see MyBean*.java) and have got it working for all base classes. I am still having problems when the class being serialized/deserialized extends a base class but I am sure I am just missing something obvious.

      I could continue with my prototype which would allow me to use my existing JavaBeans rather than having to use the Axis generated versions (I don't want to do this as I have many JavaBeans with comments and constructors that are used elsewhere in my code but that don't get generated by Axis).

      I am worried, however, that if I have to update these TypeDesc classes manually every time I change my underlying JavaBeans I will introduce lots of hard to track errors. I am also worried about how I would keep my MyBean* classes in synch with new versions of Axis.

      Attachments

        1. BankIdentifierTypeDesc.java
          2 kB
          Aedemar Cooke
        2. TypeDescFactory.java
          2 kB
          Aedemar Cooke
        3. MyBeanDeserializer.java
          2 kB
          Aedemar Cooke
        4. MyBeanDeserializerFactory.java
          4 kB
          Aedemar Cooke
        5. MyBeanSerializer.java
          9 kB
          Aedemar Cooke
        6. MyBeanSerializerFactory.java
          4 kB
          Aedemar Cooke

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aedemar Aedemar Cooke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: