访问自定义报告时,如何修复System.MissingMethodException:.ctor?

时间:2019-11-01 18:46:29

标签: acumatica

在2019 R2中访问自定义报告时出现此错误:

enter image description here

使用完全相同的自定义项和报告,我可以在2019 R1上无错误地访问此报告。为什么我在R2上遇到此错误?

编辑:HB请求错误

enter image description here

1 个答案:

答案 0 :(得分:0)

报表使用肥皂网络服务来获取数据。 PX.Data.Reports.SoapNavigator指向Web服务访问问题。

打开“ Web服务端点”屏幕SM207060,然后调用“查看端点服务”->“ WSDL”操作。

enter image description here

这应该以XML格式显示soap服务的WSDL接口。如果您在此处遇到错误,则意味着无法访问soap Web服务。这可能是由于许多原因。

<?xml version="1.0" encoding="ISO-8859-1"?>
<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>Can't find entity Default/17.200.001.KitAssemblyStockComponentAllocation Parameter name: qualifiedName Actual value was Default/17.200.001.KitAssemblyStockComponentAllocation.</ExceptionMessage>
<ExceptionType>System.ArgumentOutOfRangeException</ExceptionType>
<StackTrace> at System.Monads.ArgumentCheck.CheckNull[TSource](TSource source, Func`1 exceptionSource) at PX.Api.ContractBased.Edm.Helpers.GetEntityTypeByQualifiedName(IEdmModel model, String qualifiedName) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Edm\Helpers.cs:line 33 at PX.Api.ContractBased.Edm.EntityType.CreateProperty(EntityFieldDescription field) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Edm\EntityType.cs:line 45 at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at PX.Api.ContractBased.Edm.EntityType.<>c__DisplayClass2_0.<.ctor>b__0() in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Edm\EntityType.cs:line 26 at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at PX.Api.ContractBased.Edm.EntityType.get_DeclaredProperties() in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Edm\EntityType.cs:line 71 at PX.Api.ContractBased.Soap.WsdlBuilderBase.GetEntitySchema(IEdmEntityType entityType) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Soap\WsdlBuilderBase.cs:line 255 at PX.Api.ContractBased.Soap.WsdlBuilderBase.GetServiceDescription(String url) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Soap\WsdlBuilderBase.cs:line 107 at PX.Api.ContractBased.Soap.WsdlBuilderBase.GetWsdl(String url) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Soap\WsdlBuilderBase.cs:line 58 at PX.Api.ContractBased.Soap.WebApiSoapController.Get(EntityEndpoint endpoint, String company) in C:\Bld2\AC-FULL2019R25-JOB1\Sources\NetTools\PX.Api.ContractBased\Soap\WebApiSoapController.cs:line 57 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()</StackTrace>
</Error>

首先检查您是否具有缺少实体的扩展端点,然后尝试在每个端点上打开WSDL。在还原快照并将端点声明包含在快照中而没有添加Web服务实体的自定义项时,可能会发生错误。

您可以在“端点名称”选择器中查看扩展实体。如果左侧实体树视图为空,则可能存在问题,您需要删除损坏的实体或发布其所需的自定义。

enter image description here