Hello,
there can be several reasons why it does not work (e.g. auto generated user has not enough rights, ...).
Please can you return the message of the exception object to get a hint on what is wrong (-> replace your line "body = "Error: exception caught" by "body = e.message").
One problem is that your xssqlcc file is in a a different package (test) than your xsjs service (test/services). The xssqlcc file must be in the same package than the app (or service) which uses it.
Best Regards,
Florian