using Common;
using Common.WebService;
using Core.Bll;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.SessionState;
namespace Web.sys.ashx
{
/// <summary>
/// GetWebServiceHandler 的摘要说明
/// </summary>
public class GetWebServiceHandler : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
UserBll.Instance.CheckUserOnlingState();
var Action = HttpContext.Current.Request["action"];
switch (Action)
{
case "GetUser":
string url = "http://192.168.1.182:8080/cxf/employeeData";
object[] args = new object[2];
args[0] = 233;
args[1] = true;
object result = WSHelper.InvokeWebService(url, "EmployeeDataImplService", "queryEmployeeById", args);
string json = JSONhelper.FormatJSONForEasyuiDataGrid(10, result);
context.Response.Write(json);
break;
case "GetDep":
break;
case "GetDepUserName":
break;
default:
context.Response.Write("请传入方法名称!");
break;
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
调用Webservice帮助类
最新推荐文章于 2022-07-12 17:24:15 发布