Skip to main content

Is there any reason that FME would not cast a value to an integer using xs:int(value)?

i keep getting:

"xs:string": invalid value for cast/constructor: can not cast to "xs:int"

the incoming value is a 12 digit number from a GML file with type: xml_int64

i try it without the cast and the JSONTemplator works but it comes out as a string when i need it as an integer.

Try using "xs:integer" rather than "xs:int".

The difference is that 

xs:int
 is a signed 32-bit integer, while 
xs:integer
 is an unbounded integer value. 

Twelve digits exceeds the 32-bit integer range: 2147483647 to -2147483648.


Thank you, didn't realise there were two different ones.


Reply