IServiceRequest PopulateModelBinding(IOperationDescriptor operationDesc, IServiceRequest req, IServiceResponse resp) { if (req.Arguments == null) { return(req); } //备份原始请求参数 req.Context["RawArguments"] = req.Arguments; var data = operationDesc.GetParameterValues(req.Arguments); var tmpReq = ServiceRequest.Create(req.ServiceName, req.OperationName, data); tmpReq.ValidateRequest = req.ValidateRequest; if (tmpReq.Arguments.ContainsKey("AutoCloseServiceContext")) { tmpReq.Arguments.Remove("AutoCloseServiceContext"); } tmpReq.Context = req.Context; return(tmpReq); }