读书人

wcf rest怎么包装多参数?求!

发布时间: 2013-01-08 14:02:13 作者: rapoo

wcf rest怎样包装多参数?急求!!!
服务是使用wcf rest模板,请问怎样包装多个参数???
例如:我写了以下这个简单的例子:


[WebInvoke(Method = "POST", UriTemplate = "f", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
public bool F(int id, bool b)
{
return b;
}

然后在fiddler下测试,输入json: {"id":1,"b":true}
结果杯具,400错误,但help页面能打开,只是里面无法确定请求。。。
求高人解答
[解决办法]
你请求的url 是 http://xxxx/f 吗?

读书人网 >Web Service

热点推荐