On 7/23/07, Michael Bell <[EMAIL PROTECTED]> wrote:
Hi, we create WSDL types with two different schemas - one for common types and one for special types. The idea is that we want to implement common types in a central place for all of our web services (e.g. common error handling). During the implementation we noticed that Axis2 generates some ExtensionMapper classes. The problem is that Axis2 does not generate one ExtensionMapper per package. It generates only one filled ExtensionMapper per service. So inheritance does not work because the java classes have always web service specific code inside. I noticed that the generated code can be easily splitted into different packages. Is there a special reason why there is only one ExtensionMapper?
this extension mapper is used in extensions(to support polymorphysum). if the input xml stream contains an xsi:type element then we find the corresponding class from using this. Keeping one extension mapper would make the code generation easy sine we have to find the class only in one place. other wise have to see in all the places. you can not say classes in one package has only extended from the class in the same package. if you split the extension mapper class then you have to change the places it refer as well. some times if you only extends classes from the same package this may work. but not a genearalized approach. Amila. I implemented a small Perl script which loads the
generated ExtensionMapper and generates mappers on a per package base. If someone is interested then I can send the script. Best regards Michael -- _______________________________________________________________ Michael Bell Humboldt-Universitaet zu Berlin Tel.: +49 (0)30-2093 2482 ZE Computer- und Medienservice Fax: +49 (0)30-2093 2704 Unter den Linden 6 [EMAIL PROTECTED] D-10099 Berlin _______________________________________________________________ X.509 CA Certificates / Wurzelzertifikate http://ra.pki.hu-berlin.de
-- Amila Suriarachchi, WSO2 Inc.
