I am using Axis2 to run a web service. Here is a services.xml
file that defines a service:
No, this is not possible as Axis2 generation tool maps Java class : WSDL as 1:1 in a code-first approach. Hypothetically, they could have provided feature to map multiple Java classes to a single WSDL (that would require additional parameters in generation tool).
Axis2 uses 'extra classes' for additional types - subclasses of original complex types used as input/output.
If neat and compact code is the only issue, I would suggest refactoring it the way that only one single class defines all the required operations, but delegates execution to specific & appropriate (multiple) classes. This can be considered as an application of a Façade pattern.