Your best source of information and news about BIOS, microsoft and Vista hardware on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

Overloading Web Methods


It’s been a while since I got a chance to blog. Work and life was so busy to do anything other than those. Anyway, I’m back to my blogging habit and I hope to contribute the useful ones. To begin with,

How do you overload a web method?

You know you can leverage the OO concept with the web methods as well but once you try it out you’ll realize that it is not a straight forward ride. You have to tweak some of the header settings to let that happen. Here are the ones you have to tweak,

  • WebServiceBinding
  • MessageName

You have to make the WebServiceBinding conforms to WsiProfiles.None. And then you have to specify a Message Name so that you can distinguish between the overloaded methods in a descriptive way.

Here is an example,

[WebServiceBinding(ConformsTo = WsiProfiles.None)]
[WebMethod(MessageName = “Method1″, Description = “Description for Method1″)]

public string Method1(string input)

{    // implementation here    }

 

[WebServiceBinding(ConformsTo = WsiProfiles.None)]
[WebMethod(MessageName = “Method2″, Description = “Description for Method2″)]

public string Method2(string input)

{    // implementation here    }

tags: , , , , , ,

Popularity: 1%


Written by askars. Read more great feeds at is source WEBSITE
no comments.
Read more articles on .NET Framework 2.0 and Code Samples and howto and ASP.NET.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .