Hi,
I have been trying to configure D365 to use a virtual entity. The Odata service appears to be working correctly and can be accessed via excel without issue but D365 gives the following pipeline trace and I am somewhat lost as where to start troubleshooting it. Any help would be appreciated.
Thanks,
Iain
Unhandled Exception: Microsoft.Xrm.Sdk.Data.Exceptions.EndpointException: Exception parsing EdmModel.
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Client.EdmModelLoader.GetModel(ODataDataSource info, IDictionary`2 httpHeaders)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Client.InstrumentedEdmModelLoader.GetModel(ODataDataSource info, IDictionary`2 httpHeaders)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Client.ExceptionTranslationEdmModelLoader.GetModel(ODataDataSource info, IDictionary`2 httpHeaders)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Metadata.ODataMetadataContextFactory.CreateCachedData(ODataDataSource dataSourceInfo, Guid organizationId, IDictionary`2 httpHeaders)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Metadata.ODataMetadataContextCache.SetUpdatedCacheValueExclusive(Key key, ODataContextCacheRequest request, IODataMetadataContextFactory contextFactory)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Metadata.ODataMetadataContextCache.Get(ODataContextCacheRequest request, IODataMetadataContextFactory contextFactory)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Context.ODataPluginExecutionContextFactory.Create(IServiceProvider serviceProvider, BootstrapContext bootstrapContext, IRequestValidator requestValidator)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.ODataRetrieveMultiplePlugin.<>c__DisplayClass3_0.<Execute>b__0()
at Microsoft.Xrm.DataProvider.Logger.ExecutionStatusLogger.<>c__DisplayClass3_0.<Execute>b__0()
at Microsoft.Xrm.DataProvider.Logger.ExecutionStatusLogger.Execute[TResult](String message, Func`1 work)
at Microsoft.Xrm.DataProvider.Logger.ExecutionStatusLogger.Execute(String message, Action work)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.ODataRetrieveMultiplePlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: Microsoft.OData.Edm.Csdl.EdmParseException: Encountered the following errors when parsing the EDMX document:
UnexpectedXmlElement : The element 'edmx:Edmx' was unexpected for the root element. The root element should be Edmx. : (1, 40)
at Microsoft.OData.Edm.Csdl.EdmxReader.Parse(XmlReader reader)
at Microsoft.Xrm.DataProvider.Odata.V4.Plugins.Client.EdmModelLoader.GetModel(ODataDataSource info, IDictionary`2 httpHeaders)
I get the same exception when trying to retrieve this Data Source:
https://services.odata.org/V4/OData/OData.svc/$metadata#Advertisements
which is also used by this sample:
https://dynamicsninja.blog/2018/09/30/virtual-entities-part-1-odata-v4/
Any ideas?
HI Iain, This seems like an issue with OData Version you are using.