Solved

Method overloading in a web service

Posted on 2006-10-26
3
242 Views
Last Modified: 2010-04-16
Is it possible to overload methods in a web service?  If so, how?  (I am familiar with method overloading in general).
0
Comment
Question by:tguillor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 22

Accepted Solution

by:
_TAD_ earned 500 total points
ID: 17813232

Yes, you can overload a method, but it requires a unique signature (MethodName) for the web service.

for example:

Suppose you want two functions:

[WebMethod (MessageName="GetData(int)")]
Public GetData(int i)
{

}

[WebMethod (MessageName="GetData(string)")]
Public GetData(string s)
{

}

0
 
LVL 22

Expert Comment

by:_TAD_
ID: 17813233

Yes, you can overload a method, but it requires a unique signature (MethodName) for the web service.

for example:

Suppose you want two functions:

[WebMethod (MessageName="GetData(int)")]
Public GetData(int i)
{

}

[WebMethod (MessageName="GetData(string)")]
Public GetData(string s)
{

}

0
 
LVL 22

Expert Comment

by:_TAD_
ID: 17813234

Yes, you can overload a method, but it requires a unique signature (MethodName) for the web service.

for example:

Suppose you want two functions:

[WebMethod (MessageName="GetData(int)")]
Public GetData(int i)
{

}

[WebMethod (MessageName="GetData(string)")]
Public GetData(string s)
{

}

0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question