I’m experimenting with Data Virtualization, and has encountered a built-in error, it seems.
Whenever I use a variable value with non-ascii characters (ÆØÅ in question), I get a nasty error:
{
"message": "Error running Data Virtualization Workspace \"DV_LER 2.0_GET_schemas_table_data.fmw\" for API \"ler2\": An error has occurred. Check the logfile above for details"
}
The value in question is “Afløbsledning”, and the url swagger is using is:
http://localhost:8080/api/ler2/schemas/myschema/table/afl%C3%B8bsledning/data
The error in the Flow log file is:
JSONTemplater_TABLE (XMLTemplaterFactory): The following error occurred near line 1, column 148 of the query:
JSONTemplater_TABLE (XMLTemplaterFactory): "context item": undeclared variable
JSONTemplater_TABLE (XMLTemplaterFactory): An error occurred while executing the 'ROW' query
JSONTemplater_TABLE (XMLTemplaterFactory): The following error occurred near line 4, column 15 of the query:
JSONTemplater_TABLE (XMLTemplaterFactory): An error occurred while executing the process-features function
An error has occurred. Check the logfile above for details
Translation FAILED with 1 error(s) and 5 warning(s) (0 feature(s) output)
It works just fine if there are no ÆØÅ characters in the value. I’ve tried to add TextEncoders into the workspace without success.
And why is the XMLTemplater mentioned above even involved in the JSONTemplater execution ? Does FME create an XML to convert into JSON ??
What can I do to get around this problem? The value needs to be able to accept ÆØÅ.
Cheers.
Ps! I’ve encountered ÆØÅ problems in the regular REST API as well, so it suggests that it’s a general problem with the API interface. Is it missing proper encoding and decoding of values ?