axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <>
Subject Re: [axis2] Some thoughts on all public methods being exposed as operations
Date Fri, 27 Oct 2006 04:50:38 GMT
Hi Rajith;

Rajith Attapattu wrote:

> Hi All,
> I noticed that all public methods in your web services is exposed as
> operations.
> I would really like to know the reasons for doing so and why this is a
> better approach than the previous way of only exposing what you want.

I think you need to go and read mail archives :) , we discussed this in
the mailing list and after that we decided to do so.

> What I don't like about this approach is that we need to exclude
> operations and you end up writing more in your services.xml.

I think you can fix your problem by writing service impl class carefully
, I mean you can write your service impl class to have publics method as
well as private method (and remember to have public method only if you
want to expose that). So Axis2 will expose your public method and it
will not touch private method.

Think abt the scenario where you have service impl class with 50 public
methods , in that case user has to go and write operation elements  for
all the public methods (what ever he want to expose) in the
services.xml, but now he does not want to do that since we have that
nice  feature.

> Here are some pain points
> 1. If you have getters and setters i(lets say for dependency
> injection), this becomes a reall PIA, as I have to exclude them all.

did you mean setOperationContext() ?....
Axis2 automatically ignore them , and will not display at the ?wsdl

Pls explain this a bit , if you mean smt else.

> 2. If u need to do anything operation specific like use Aysnc MR,
> instead of a Synch receiver or if u need some module engaged at
> operation level you anyhow have to define that in the services.xml
not for all the operation , only the operation that you need to override.

> So this really doesn't add much value in my opinion and can be a real
> PIA if I have a bunch of getters/setters.
> I would like to see some comments on this.
> Regards,
> Rajith

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message