K3 Cloud 6.0 调用webapi生成入库单报错
金蝶云社区-随风而息
随风而息
0人赞赏了该文章 867次浏览 未经作者许可,禁止转载编辑于2016年04月21日 12:51:46

未处理Kingdee.BOS.WebApi.Client.ServiceException
HResult=-2147467259
Message=MapComplexProperty Field Error :Field Key is 【FSupplierId】
Source=Kingdee.BOS.ServiceFacade.KDServiceFx
ErrorCode=-2147467259
WebEventCode=0
ClassName=Kingdee.BOS.ServiceFacade.ServiceException
ExceptionMethod=8
Execute
Kingdee.BOS.ServiceFacade.KDServiceFx, Version=6.0.413.1, Culture=neutral, PublicKeyToken=null
Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor
System.String Execute(Kingdee.BOS.ServiceFacade.KDServiceFx.KDServiceContext, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType, System.String[], Kingdee.BOS.ServiceFacade.SerializerProxy, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType)
Handled=false
StackTrace:
在 Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor.Execute(KDServiceContext context, ServiceType svcType, String[] paraValues, SerializerProxy serializeProxy, ServiceType beginMethod)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.ExecuteServiceModule.OnProcess(KDServiceContext context)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.ModulePipeline.ExcuteRequest(KDServiceContext context)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExcuteRuntime.BeginRquest(RequestExtractor requestExtractor, WebContext webCtx)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExcuteRuntime.StartRequest(RequestExtractor requestExtractor, WebContext context)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ExecuteRequest(WebContext ctx, RequestExtractor requestExtractor)
在 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ProcessRequestInternal(WebContext webCtx, RequestExtractor requestExtractor)
InnerException:

这是什么问题?怎么排查?

代码如下:

// 使用webapi引用组件Kingdee.BOS.WebApi.Client.dll
ApiClient client = new ApiClient("h t t p:/ /localhost/K3Cloud/");
object[] loginInfo = new object[] {
"568c92f23a9d4a",//帐套Id
"Administrator",//用户名
"888888",//密码
2052
};//语言id

var ret = client.Execute("Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser", loginInfo);
var result = JObject.Parse(ret)["LoginResultType"].Value();
// 登陆成功
if (result == 1)
{
//var msg = client.Execute("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit", new object[] { "PUR_PurchaseOrder", "{\"CreateOrgId\":0,\"Numbers\":\"'CGDD000026'\"}" });
var msg = client.Execute("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save", new object[] { "STK_InStock", "{\"Creator\":\"String\",\"NeedUpDateFields\":[\"FBillTypeID\",\"FDate\",\"FBusinessType\",\"FSupplierId\",\"STK_InStock__FInStockFin\",\"FMaterialId\",\"FUnitID\",\"FRealQty\",\"FStockId\"],\"Model\":{\"FID\":0,\"FBillTypeID\":{\"FNumber\":\"RKD01_SYS\"},\"FBusinessType\":\"NORMAL\",\"FSupplierId\":{\"FNUMBER\":\"VEN00005\"},\"STK_InStock__FInStockFin\":{\"FMaterialId\":{\"FNUMBER\":\"1.01.001\"},\"FUnitID\":{\"FNumber\":\"Pcs\"},\"FRealQty\":10,\"FStockId\":{\"FNUMBER\":\"CK001\"}}}}" });
var bResult = JObject.Parse(msg)["Result"]["ResponseStatus"]["IsSuccess"].Value();
}