There may be other issues related to RTRIM and LTRIM, which I did not figure it out at VoltXML level. I tried my method this morning, it does not work out probably for stored procedures involving TRIM related functions.

I am not sure if it is worth doing that. Hsql is not aways right, hsql can not run TRIM function with store procedure with trim parameters also. There seems to be a place to get the expected type for certain parameters.