C#
[ServiceContract]
interface ICalculator
{
[OperationContract(Name = "AddInt")]
int Add(int arg1,int arg2);
[OperationContract(Name = "AddDouble")]
double Add(double arg1,double arg2);
}Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name AddInt and AddDouble.


Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 21, 2014, 3:50 AM EST
I think WSDL is not a object oriented language and does not support these features of OOP.
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 21, 2014, 7:31 AM EST
using WCFConsoleClentApp.MyTest;
namespace WCFConsoleClentApp
{
class Program
{
static void Main(string[] args)
{
TestClient client = new TestClient();
int intretun = client.addint(1, 1);
double doublereturn = client.adddouble(12.2, 10.1);
}
}
}
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 21, 2014, 7:31 AM EST
using WCFConsoleClentApp.MyTest;
namespace WCFConsoleClentApp
{
class Program
{
static void Main(string[] args)
{
TestClient client = new TestClient();
int intretun = client.addint(1, 1);
double doublereturn = client.adddouble(12.2, 10.1);
}
}
}