In ASMX:
[WebMethod (MessageName="HelloWorld")]
public string HelloWorld()
{
return "HelloWorld";
}
[WebMethod (MessageName="HelloWorldWithName")]
public string HelloWorld(string name)
{
return "HelloWorld " + name;
}
In WCF:
[ServiceContract]
public interface IMyCalculator
{
[OperationContract(Name="AddFloats")]
float Add(float operand1, float operand2);
[OperationContract(Name="AddIntegers")]
int Add(int operand1,int operand2);
}
No comments:
Post a Comment