Note that there are some explanatory texts on larger screens.

plurals
  1. POaxis2 : employ inheritance for codegenerated request/response objects
    text
    copied!<p>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 <strong>we use ADB beans serialization stack</strong>.</p> <p>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. </p> <p>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. </p> <p>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.</p> <p>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. </p> <p>If you have any definite/precise answer with a link to documentation/sources of AXIS this will be just great.</p> <p>Thanks in advance, Anton</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload