Open GoogleCodeExporter opened 8 years ago
As an example:
public OperatingNumberData GetOperatingNumber(String operatingNumberName,
DashboardType dt, DateTime start, DateTime end)
{
var x = new OperatingNumberData()
{
Name = operatingNumberName,
DashboardType = dt,
DateStart = start,
DateEnd = end,
GridData = new List<Dictionary<String, Object>>()
};
return x;
}
Will return:
{SSG.KPIMonitor.DataService.Data.DTO.OperatingNumberData}
DashboardType: ERROR
DateEnd: {31.12.2013 00:00:00}
DateStart: {01.01.2011 00:00:00}
GridData: Count = 0
Name: "Reklamationsquote"
Instead of:
{SSG.KPIMonitor.DataService.Data.DTO.OperatingNumberData}
DashboardType: DRILLDOWNNCHART
DateEnd: {31.12.2013 00:00:00}
DateStart: {01.01.2011 00:00:00}
GridData: Count = 0
Name: "Reklamationsquote"
The ServiceReference will serialize the enumeration this way:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization",
"4.0.0.0")]
[System.FlagsAttribute()]
[System.Runtime.Serialization.DataContractAttribute(Name="DashboardType",
Namespace="http://schemas.datacontract.org/2004/07/SSG.KPIMonitor.DataService.Da
ta.DTO")]
public enum DashboardType : int {
[System.Runtime.Serialization.EnumMemberAttribute()]
Error = 0,
[System.Runtime.Serialization.EnumMemberAttribute()]
DRILLDOWNNCHART = 1,
}
So the type should be an integer, but if i look at the request header, it seems
to be a string, else there would be a "1" instead of "DRILLDOWNCHART"
<dt>DRILLDOWNNCHART</dt>
<dt>1</dt>
Is that the possible source of this error? because it can't deserialize the
string to the enumeration, because it requests an integer?
Original comment by richard....@gmail.com
on 24 May 2013 at 11:17
Original issue reported on code.google.com by
richard....@gmail.com
on 24 May 2013 at 11:07