I'm developing WCF REST service in C#. It works fine for a single parameter. Now I need to extend it to support multiple parameters. Please help me on this issue.
Thanks in advance...
Use following declaration in interface:
[OperationContract]
[WebInvoke(Method = "POST",
ResponseFormat = WebMessageFormat.Xml,
RequestFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.WrappedRequest,
UriTemplate = "login")]
resLogin Login(reqLogin rData, int floorId);
Take a look at UriTemplate parameters. You can use the QueryString or URL path to pass in the
floorId
parameter.URI Path Parameter
QueryString Parameter
Add BodyStyle on OperationContract