|
Answer» Yes for a WCF Service use the Name property of OperationContractAttribute class
EXAMPLE:
[ServiceContract] interface ddd { [OperationContract(Name = "ONE")] int calc(int a,int B); [OperationContract(Name = "TWO")] double calc(double a,double b); }
- For a Web Service use the MessageName property of WebMethodAttribute class
- Please comment the following line in the .cs file of the Web Service
//[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[WebMethod] public string HelloWorld(string a) { return "HELLO"+" "+a; } [WebMethod(MessageName="second")] public string HelloWorld() { return "Hello second"; } Yes for a WCF Service use the Name property of OperationContractAttribute class example: [ServiceContract] interface ddd { [OperationContract(Name = "one")] int calc(int a,int b); [OperationContract(Name = "two")] double calc(double a,double b); } //[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [WebMethod] public string HelloWorld(string a) { return "Hello"+" "+a; } [WebMethod(MessageName="second")] public string HelloWorld() { return "Hello second"; }
|