K3接口按如下方式调用,出现后续错误。请教各位大神如何处理?
我理解出现错误的两种情况:1.我的参数传递错误,那么我该如何传递呢?2.Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc 我怀疑是这个地址构造错误,那么我该使用那个地址呢?
HttpClient httpClient = new HttpClient(); httpClient.Url = "IP/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View.common.kdsvc"; List //业务对象Id String formid = "IV_SALESIC";//发票 Parameters.Add(formid); //Json字串 string data ="{\"Number\":\"SVINV00000003\"}"; Parameters.Add(data); httpClient.Content = JsonConvert.SerializeObject(Parameters); var result = httpClient.AsyncRequest();
出现错误:{"InnerExWrapper":{"IsEmpty":false,"Data":{},"HelpLink":null,"Message":"调用的目标发生了异常。","Source":null,"StackTrace":" 在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n 在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n 在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor.Execute(KDServiceContext context, ServiceType svcType, String[] paraValues, SerializerProxy serializeProxy, ServiceType beginMethod)","TargetSite":null,"ExceptionType":"System.Reflection.TargetInvocationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","InnerException":{"IsEmpty":false,"Data":{},"HelpLink":null,"Message":"{ctx == null}","Source":null,"StackTrace":" 在 Kingdee.BOS.Contracts.ServiceFactory.GetService[T](Context ctx)\r\n 在 Kingdee.BOS.ServiceHelper.MetaDataServiceHelper.Load(Context ctx, String id, String layoutViewId, Boolean bRuntime)\r\n 在 Kingdee.BOS.WebApi.FormService.WebApiServiceCall.ExcuteSpecialOperation(Context ctx, String formId, String data, Int64 opId)\r\n 在 Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.View(String formid, String data)","TargetSite":null,"ExceptionType":"System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","InnerException":null}},"ClassName":"Kingdee.BOS.ServiceFacade.ServiceException","Message":"{ctx == null}","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" 在 Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor.Execute(KDServiceContext context, ServiceType svcType, String[] paraValues, SerializerProxy serializeProxy, ServiceType beginMethod)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.ExecuteServiceModule.OnProcess(KDServiceContext context)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.ModulePipeline.ExcuteRequest(KDServiceContext context)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExcuteRuntime.BeginRquest(RequestExtractor requestExtractor, WebContext webCtx)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExcuteRuntime.StartRequest(RequestExtractor requestExtractor, WebContext context)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ExecuteRequest(WebContext ctx, RequestExtractor requestExtractor)\r\n 在 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ProcessRequestInternal(WebContext webCtx, RequestExtractor requestExtractor)","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nExecute\nKingdee.BOS.ServiceFacade.KDServiceFx, Version=6.0.413.1, Culture=neutral, PublicKeyToken=null\nKingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor\nSystem.String Execute(Kingdee.BOS.ServiceFacade.KDServiceFx.KDServiceContext, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType, System.String[], Kingdee.BOS.ServiceFacade.SerializerProxy, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType)","HResult":-2147467259,"Source":"Kingdee.BOS.ServiceFacade.KDServiceFx","WatsonBuckets":null,"_httpCode":500}
推荐阅读