How to deal with operation overloading while exposing the WCF services ?
How to Deal with Operation Overloading while Exposing the WCF services
Hi
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Sep 17, 2012, 7:47 AM EDT
By using Name property in the attribute "OperationContract" we can handle the operator overloading in the services.
As you know operator overloading means the same name with different parameter types or different in number of parameters Overloaded operations (methods) are not supported in WSDL based operation. So, the alernative is to provide different name to the operations exposed by the WCF service.
Check the following:
Here all the method names are same. But while exposing the service we are changing the operation names using OperationContract so the service still be able to get exposed with no issues.
Let me know if you have any questions.