I have:
- Raw xml filled by a select query.This xml transformed into a HL7 message
- One of the tags of this xml represents a clob column from a table in the database
- I mapped this data (from edit transformer section) as a variable.
- Now I am trying to convert this variable into a base64 string then replace it in my transformed hl7 message. 5.I tried this conversion on a destination channel which is a javascript writer.
I read and tried several conversion methods like
Packages.org.apache.commons.codec.binary.Base64.encodeBase64String();
I have got only error messages like :
EvaluatorException: Can't find method org.apache.commons.codec.binary.Base64.encodeBase64String(java.lang.String);
Code piece:
var ads=$('V_REPORT_CLOB');
var encoded = Packages.org.apache.commons.codec.binary.Base64.encodeBase64String(ads.toString());
It is pretty clear that I am a newbie on that.How can I manage to do this conversion ?