i have simple interface that i want to test it out but i have’nt understood when to use URITemplate:
how would i access XMLData in this case…?
[OperationContract]
[WebInvoke(Method = "GET",
ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Wrapped)]
string XMLData(string id);
public class RestServiceImpl : IRestServiceImpl
{
public string XMLData(string id)
{
return "my xml data:" + id;
}
UriTemplate is some kind alike of masking your method. Example:
you may now call the method this way:
instead of…
I hope this helps..