Dotnet Odata client for an Olingo Odata V4 service
<p>I'm developing a Dotnet client application (CSharp) for an OData service. The OData service (V4) is implemented in Java with Apache 4.2.0 Olingo library.</p>

<p>On the client side, the proxy classes were created with "Connected OData Service".</p>

<p>I'm trying to get an whole EntitySet with the following code:</p>

<pre><code>var ctx = new Container(new Uri(uriString: "http://localhost:8080/odata/PaisService.svc/"));

IEnumerable&lt;Pais&gt; paises = ctx.Paises.Execute();

foreach (Pais pais in paises)
{
     Console.WriteLine(pais.Descripcion);
}
</code></pre>

<p>When i execute the app i get the following exception:</p>

<pre><code>Microsoft.OData.Client.DataServiceQueryException was unhandled
HResult=-2146233079

Message=Error al procesar esta solicitud.
Source=Microsoft.OData.Client
StackTrace:
en Microsoft.OData.Client.DataServiceRequest.Execute[TElement]&gt;(DataServiceContext context, QueryComponents queryComponents)
       en Microsoft.OData.Client.DataServiceQuery`1.Execute()
       en Microsoft.OData.Client.DataServiceQuery`1.GetEnumerator()
       en System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       en System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       en TelerikWpfPoC_1.App..ctor() en c:\users\diego.cairone\documents\visual studio 2015\Projects\TelerikWpfPoC-1\TelerikWpfPoC-1\App.xaml.cs:línea 20
       en TelerikWpfPoC_1.App.Main() en c:\users\diego.cairone\documents\visual studio 2015\Projects\TelerikWpfPoC-1\TelerikWpfPoC-1\obj\x86\Debug\App.g.cs:línea 0
       en System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       en Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       en System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
       HResult=-2146233079
       Message=La carga de respuesta no es una carga de respuesta válida. Asegúrese de que el elemento de nivel superior sea un elemento Atom o JSON válido o pertenezca al espacio de nombres 'http://docs.oasis-open.org/odata/ns/data'.
       Source=Microsoft.OData.Client
       StackTrace:
            en Microsoft.OData.Client.Materialization.ODataMaterializer.CreateODataMessageReader(IODataResponseMessage responseMessage, ResponseInfo responseInfo, ODataPayloadKind&amp; payloadKind)
            en Microsoft.OData.Client.Materialization.ODataMaterializer.CreateMaterializerForMessage(IODataResponseMessage responseMessage, ResponseInfo responseInfo, Type materializerType, QueryComponents queryComponents, ProjectionPlan plan, ODataPayloadKind payloadKind)
            en Microsoft.OData.Client.MaterializeAtom..ctor(ResponseInfo responseInfo, QueryComponents queryComponents, ProjectionPlan plan, IODataResponseMessage responseMessage, ODataPayloadKind payloadKind)
            en Microsoft.OData.Client.QueryResult.CreateMaterializer(ProjectionPlan plan, ODataPayloadKind payloadKind)
            en Microsoft.OData.Client.QueryResult.ProcessResult[TElement](ProjectionPlan plan)
            en Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
       InnerException: 
</code></pre>

<p>I'm not understanding what is this error and how to fix it.
Any suggestions?</p>

<p>Thanks.</p>