将参数传递给json webservice

本文关键字:webservice json 参数传递 | 更新日期: 2023-09-27 17:53:56

我有一个Json WCF服务我的方法请求out参数我如何从客户端传递out参数

[ServiceContract]
public interface ITestServices
{
    [OperationContract]
    [WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped, Method = "POST", UriTemplate = "GetPerson", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
    Person GetPerson(out ResponseStatus ResponseStatus, int PersonID);
}

将参数传递给json webservice

WCF提供了一个可用于SOAP或REST web服务的接口,它没有任何物理能力来处理我们的参数。