Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Adding a new method will it break existing applications

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay Balapa - 19 Jun 2007 17:38 GMT
Hello,

We have a webservice which is called by our pocket pc apps. We have a need
to filter data, so we want to add a another method on top to the existing
method.
Existing Service.asmx
Sync(DataSet myDataset)

New Service.asmx
Sync(DataSet myDataset);
Sync(DataSet myDataset,string filter);

If I recompile the app will this break the existing apps.

I posted this under asp.net/webservices and no reply.

Thanks,
-Jay Balapa
Teresa Church - 19 Jun 2007 17:47 GMT
> Hello,
>
[quoted text clipped - 14 lines]
> Thanks,
> -Jay Balapa

I ran into an issue with overloading methods when I first started -
I'm pretty sure it's possible it was caused by something else, but
just FYI.

As long as the new function is working properly and the old function
is not modifying, adding a function to a web service will not break
the service.
John Saunders [MVP] - 19 Jun 2007 19:48 GMT
>> Hello,
>>
[quoted text clipped - 23 lines]
> is not modifying, adding a function to a web service will not break
> the service.

You do have to be careful here. Whether it breaks anything depends on what
"anything" is. You are changing the contract, and it's possible you'll find
some client that had a dependency on the old contract, in a way you didn't
expect.

That said, I don't know of a scenario where adding a method will break an
existing Windows client. I do not believe you can use overloading, however.
Give your new function a different name.
Signature

John Saunders [MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.