Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5277

employ inheritance for codegenerated request/response objects

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.5.1
    • None
    • codegen

    Description

      ADB/Inheritance support (as well as wrapped/inlined type treatment) is so much implied so that it's unclear what is supported and what is not and what are conditions to trigger desired codegen behaviour. Please see this SO question for details (it's also included verbatim below). I think we should add some documentation/samples on this, and I wish to help with it as soon as time permits.

      http://stackoverflow.com/questions/9875386/axis2-employ-inheritance-for-codegenerated-request-response-objects

      Also, a note aside: there're several undocumented options in wsdl2java, I think they should be documented.

      >>>
      the question is quite simple so I hope I would be lucky to be clear enough to avoid creating code sample for it. We are using Axis2 (1.5.1 to be precise) which is to create Java client code and server stubs via wsdl2java, using our hand-crafted WSDL/XSD files. The service is generated in document-style mode, and we use ADB beans serialization stack.

      Our new webservice has some common attributes in all methods that we are to create. Say, each of requests is to be marked with some accessToken, otherPartyID and other similar properties.

      I was able to employ inheritance in schemas, so Request/Response types do extend common complexType and I don't have to repeat myself while creating schemas/WSDL for the webservice. But, when I try to code up the implementation, I (to my utter frustration) see that all codegenerated Request/Response objects are inheriting java.lang.Object and there's no common superclass with the common properties.

      It would be quite nice to have such a class, so that code which treats those common properties stays generic and I don't have to use reflection and other dirty tricks to avoid monkey coding.

      My current suspicion is that AXIS does not support inheritance across method Request/Response types, while it supports it for parameter types. Please share your experiences on this matter.

      If you have any definite/precise answer with a link to documentation/sources of AXIS this will be just great.

      Thanks in advance, Anton
      <<<

      Attachments

        Activity

          People

            Unassigned Unassigned
            akraievoy Anton Kraievoy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: