Should I NOT overload methods in Web Service?

Should I NOT overload methods in Web Service?

Old forum URL: forums.lhotka.net/forums/t/3803.aspx


ltgrady posted on Monday, October 29, 2007

We have an app using CSLA 1.5, class library and .NET 2.0 pages.  Now we're translating some of the logic to web services for our users to use our product search on their own web pages.

We have a lot of very duplicate seeming methods.  For instance getReps.  You can get reps by brand, by region, by supplier, all reps and then for each one of them you can do it with user authentication or with a devloper key.  So that is 8 different methods basically doing the same thing just with different parameters.

Normally i would just create a getReps method and create an overload method for each one.  However, in web services I couldn't do this.  I had to create a unique MessageName property for each, which is fine.  But then I have to add a line of code saying that my method does NOT conform to any WSI profile for it to work right.

This gives me some pause.  Does it not conform to the standard because there is a good reason why I SHOULDN'T be overloading web methods?  I'm not sure why it would be a bad idea?

Copyright (c) Marimer LLC