Search code examples
xmlwcfbusiness-intelligencenumericdatazen-server

Datazen data types


I'm new to Datazen technology. The issue I'm facing right now is related to the data types which is sent from my WCF service to the Datazen server as XML. Datazen server does not convert received values to decimals and treat them as strings. WCF service method returns this kind of object:

[DataContract]
public class NumberOfVessels
{
    [DataMember(Name = "decimal")]
    public int VesselsOnline { get; set; }

    [DataMember]
    public int VesselsOffline { get; set; }
}

Edit: XML sent by my service

<NumberOfVessels xmlns="http://schemas.datacontract.org/2004/07/RDSApi.Models" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<VesselsOffline>9</VesselsOffline>
<VesselsOnline>53</VesselsOnline>
</NumberOfVessels>

Here is my data view on Datazen server. Dropdown does not allow me to choose the column as it thinks that values are strings. enter image description here

Is there a way how to force Datazen to convert these values to decimals, or my WCF service has to provide some attributes in the XML data to carry the data type information? Thanks!


Solution

  • regarding to the MS support, this feature is really fresh in Datazen server.

    Just update your server to the latest version, you should see a page similar to this when editing the XML Data View. Once there, you can pick the appropriate data type, and it will perform the parse.

    Datazen XML service data types configuration