Originally posted by Toshi:
Then I made the child class as a service in Axis2 (v1.3), but only the declared methods in the child classes are exposed, but not inherited ones.
I wouldn't be surprised if this is by design. You may be implementing the web service in Java which is an Object-Oriented langauge but Services are Service-Oriented and Service-Orientation doesn't support inheritance.
p.473 SOA Principles of Service Design
Use Inheritance with Care
Inter-service inheritance is not formally advocated by service-orientation in support of realizing the independence and freedom we seek to establish in every service via the Service Loose Coupling, Service Autonomy, and Service Composability principles.
Intra-service inheritance (the application of inheritance to classes encapsulated by the service) can be applied to strengthen the structure of intra-service logic, as required. However, there needs to be a constant awareness that coarse-grained services may need to be decomposed into finer-grained (more specialized) services at some point.
As per corresponding service design patterns, we can prepare for service decomposition by how we design a service's contract and logic. Service logic comprised of components tightly bound through inheritance structures will be more difficult to decompose into physically separate services than if the underlying class structures a less interdependent.
So if you want a parent method to be exposed you will have to "override and delegate" in the child class - this makes your intention absolutely clear.
However as the above quote outlines this might be an indication that you shouldn't be placing "common logic" in a parent class but place the logic to be reused in a common object to be delegated to.
Replace Inheritance With Delegation
Delegation makes reuse simpler and less restrictive with the trade off of being more verbose.
Basically these "hiccups" serve as reminders that you are not in Kansas (the Object-Oriented domain - "Home" for the Java developer) anymore but in Oz (the Services-Oriented domain).