/****************************************************************** * Copyright (C): 一心堂集团 * CLR版本: 4.0.30319.18063 * 命名空间名称: WcfService1 * 文件名: IJoonService * GUID1: b7bd3ab3-3668-4727-9416-f9845da207e1 创建人:尹明能 * 创建时间: 2014-9-24 13:13:09 ******************************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; namespace WcfService1 { //一定要取个名字,不然客户端访问不到 [ServiceContract(Namespace = "ymn", Name = "J")] public interface IJoonService { //暴漏方法,并且返回json格式数据 [OperationContract] JsonResult HelloWorld(); [OperationContract] string HelloWorld2(); [OperationContract] List<JsonResult> HelloWorld3(); } }
相关文章: