Reputation: 11
My service is working well when i use:
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "json/?id={id}")]
string jdata(string id);
and my Method Implementation is
public string json(string id)
{
return "Your typed String is : " id;
}
up to here it works well,
but I am bound to use Method=POST
in WebInvoke,
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "json/?id={id}")]
string jdata(string id);
when I use this and call service, I have to face Method Not Allowed. Please resolve my this little problem....
Upvotes: 0
Views: 1414