Error processing response flow. XML element contains mixed content

I call the stored procedure through WCf-DataService and EF4. The other method works fine, but the one that returns the list fails, with the exception of the error handling thread. The XML element contains mixed content.

Here is the result of returning the XML method (call to http)

<GetShowName>
    <element>MONT</element>
    <element>INTERPEECH 08/2011</element>
    <element>POI MOBILIER 09/2011</element>
    <element>ASSEMBLE GALE CLUB 41 06/2011</element>
    <element>AFTES 10/2011</element>
    <element>DIVERS DEVIS 12/2011</element>
    <element>DIVERS DEVIS 12/2011</element>
    <element>SFTS 2011</element>
    <element>COUPE DU MONDE BIATHLON 12/11</element>
    <element>CADRE NOIR GENEVE 04/2011</element>
</GetShowName>

And the code:

private List<T> ListWithFilter<T>(string methodName, string methodParameters)
{
    StringBuilder methodParams = new StringBuilder("/" + methodName + "?");
    methodParams.Append(methodParameters);

    Uri methodUri = new Uri(entities.BaseUri + methodParams.ToString());
    List<T> result = entities.Execute<T>(methodUri).ToList(); //Exception here

    return result;
}

Any idea?

+3
source share
1 answer

According to this message, the client does not support primitive type materialization with .NET 4.0. You may need to manually analyze the result:

WebGet call throws an exception

+1
source

All Articles