On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Hello, > > Our team has found a possible issue in the code generation module for > Axis2. We are using the Axis2 1.3 release. This issue occurs when > running the wsdl2code maven plugin, using the xmlbeans databinding. > We are generating java code for a number of wsdls, with each wsdl > containing one service. In the pom.xml we are configuring the wsdl2code > plugin with a different package name for each service/wsdl. > Each of these wsdls has three faults or exceptions - Business, Security > and Infrastructure. These fault names are the same in each of the wsdls, > and we are pretty sure that all wsdls define the fault elements in the same > namespace. > So we assumed that since the faults/exceptions are defined in the same > namespace in each wsdl, the generated java exception classes would have the > same package name, regardless of which wsdl they are generated from. > However, we found that the package name of the generated exception classes > depends on the package name that we specify in the pom.xml (in > configuration for the wsdl2code maven plugin). > Since this name is different for each individual service, it means the > package name of the Axis2-generated exception classes is different for each > service.
This is how it has implemented. exception classes also goes to the same package as the service. please log a jira. This presents a problem for us, as we would like to have all our services > depending on three exception classes only. > > We also noticed that there are "exception" classes generated by xmlbeans, > and the package names for these classes *does* match the xml namespace of > the fault elements in the wsdl. these classes are generated for the corresponding Exception elements in the schema. So these classes are same as the other generated xmlbean classes since they are generated for the schema Element. So they get the package name from the schema namespace. However, these classes don't inherit from java.lang.Exception, but from > XmlObject in xmlbeans. They have the same class name as the exception > classes generated by Axis2. > > Is it possible to add some extra configuration in the pom that controls > the package name of the exception classes that Axis2 generates? > We are happy that the Stub, CallbackHandler, etc. classes are generated > with a package name specific to the service. However we don't want the > exception classes to be generated with a service-specific package name, > because in our scenario they are generic across all services. > > I've attached the wsdl and pom.xml (unfortunately zip can't be sent). > > > > > Thanks for any assistance that you are be able to provide, > > Cheers, > Greg********************************************************************** > IMPORTANT: This e-mail is intended for the use of the addressee and may > contain information that is confidential, commercially valuable or subject > to legal or parliamentary privilege. If you are not the intended recipient > you are notified that any review, re-transmission, disclosure, use or > dissemination of this communication is strictly prohibited by several > Commonwealth Acts of Parliament. If you have received this communication in > error please notify the sender immediately and delete all copies of this > transmission together with any attachments. > ********************************************************************** > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Amila Suriarachchi, WSO2 Inc.
