Author |
Message
|
sridhsri |
Posted: Wed Jul 16, 2008 7:39 am Post subject: TDS: xsd:decimal in TLOG representation |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
I have created a TDS message set where the message definition files contains an element of xsd:decimal type. The physical representation of this element is TLOG ('cause the data is binary).
The element is a floating point number in the message. Broker gives me an exception:
A data conversion failed because the data was invalid.
Type of data being read: 'decimal'
Data: '1.92'
1) Doesn't decimal data type store floating point numbers too ?
2) If I used xsd:float, I would get the floating point representation which I do not want.
How would I model this ? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 16, 2008 7:55 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Which version of WMB? It matters a lot when you're talking about binary data in TDS. |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 16, 2008 7:59 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 16, 2008 8:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Good. v6.1 supports non-text data types in TDS. You probably don't need to use the TLOG messaging standard ( unless there is some requirement that you have not told us about )
Quote: |
The physical representation of this element is TLOG ('cause the data is binary). |
'1.92' does not look like binary to me. What am I missing here? Please describe the input data, and the value you want to see in the message tree. |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 16, 2008 8:31 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
True! 1.92 is not binary. I have the incoming data in XML (and the incoming XML contains 1.92). This data needs to be converted to binary. The interface document calls the output element a 'Packed Decimal'.
To summarize,
1) I have incoming XML data with value 1.92
2) The outgoing data must be in binary (TLOG standard). Which we have modeled as xsd:decimal and TLOG representation. |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 16, 2008 9:39 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
The reason we are using TLOG is because the incoming data is TLOG Packed Decimal. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 16, 2008 11:04 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks! Got there at last. Sorry to be little slow to grasp the problem.
The XML Schema decimal data type can certainly hold the value 1.92. But does the TLOG packed decimal type support non-integer numbers? |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 16, 2008 11:41 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
Thanks for the info Tim. But in the MRM editor, if the TLOG standard is chosen, Precision is enabled which I have set that to 'All Significant digits '. I presumed that decimal points would be allowed. I am going to read up on TLOG to see if they are indeed allowed. |
|
Back to top |
|
 |
|