WebAPI调用出错,没有错误提示,也没有操作成功提示
金蝶云社区-150xxxx6478
150xxxx6478
0人赞赏了该文章 1348次浏览 未经作者许可,禁止转载编辑于2015年11月12日 15:48:52

ApiClient client = new ApiClient(ConfigurationManager.AppSettings["K3WebUrl"].ToString());
string dbid = ConfigurationManager.AppSettings["DBID"].ToString();
object[] loginInfo = new object[] {
dbid,//帐套Id
username,//用户名
password,//密码
2052};//语言id
var ret = client.Execute("Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser", loginInfo);
var result = JObject.Parse(ret)["LoginResultType"].Value();
// 登陆成功
if (result == 1)
{
string return_json = client.Execute("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit"
, new object[] { "QM_InspectBill", "{\"CreateOrgId\":\"100001\",\"Numbers\":\"'" + BillNo + "'\"}" });
}
就算将BillNo传不存在的单号,也报下面的错误,
返回的结果是:
{"Result":{"ResponseStatus":{"ErrorCode":500,"IsSuccess":false,"Errors":[{"FieldName":"AbstractInteractionResult","Message":"AbstractInteractionResult.InteractionContext is null"}]}}}

调用【提交】的那个接口也有问题,出现以下提示:
System.Exception: 服务出现异常,请联系管理员! ---> Kingdee.BOS.WebApi.Client.ServiceException: 你选择提交的数据可能已被删除