Hi Deepal,
Thanks for the comments.
And my apologies for not commenting on this when it was first discussed.
And my apologies for not commenting on this when it was first discussed.
>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.
>Axis2 automatically ignore them , and will not display at the ?wsdl
>Pls explain this a bit , if you mean smt else.
By getters and setters what I meant was something like (not axis2 specific methods)
public void setGreetingService(GreetingService srv) and public GreetingService getGreetingService()
For example if you Web Service has some properties to be set for example by spring, then it is going to be a real pain point to exclude them.
>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)
>methods , in that case user has to go and write operation elements for
>all the public methods (what ever he want to expose)
Exactly !!!!, this is my point. If your Web Service defines 50 operations in the same class, then that's poor programing practice and bad design.
In most use cases, you may want to have 3 or 4 public methods exposed as operations and in the same class you may have about 10-15 public methods (mostly getters/setters) that u want to hide.
So this will make a person do more work, bcos now instead of explicitly defining 5 operations in the services.xml, we now have to define 10-15 excludes.
This method is not going to help a good programmers life. Instead we are encouraging lazy people to write humongous, monolithic pieces of code that is hard to maintain.
Why are we encouraging a culture of bad programming practices around axis2 ????
Regards,
Rajith
On 10/26/06, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
