Hi All,
Has anyone embedded a base64encoded document in an XML message using Composer and Mapforce? I've created a map that accepts a string, the encoded document, and maps it to an XML document provided by the US Government. The Process takes a word document file, zips it up, and then uses the 'base64_encode' activity to encode the contents. I then use the 'for_each_txtlin' to read the encode file, line by line. Each line is then concatenated to form one long text string. This is then passed to the map. However, when I run this process I get the error 'command missing ending closing bracket token. Are there any other methods I could use instead?
Thanks in advance.
Eugene
Embedded documents (base64REncoded) in XML
Re: Embedded documents (base64REncoded) in XML
Are you able to dump out the encoded base64 string to a SQL Table or text file and use https://www.base64decode.org/ to validate the Base64 you are generating. Where I have needed to handle BLOBs/CLOBs in XML I have written to a DB and then mapped that back to the target format.
Also take a look at the https://www.altova.com/manual/Mapforce/ ... ncode.html and https://www.altova.com/manual/Mapforce/ ... ecode.html functions, which might be easier than FOR_EACH_TXTLIN
Also take a look at the https://www.altova.com/manual/Mapforce/ ... ncode.html and https://www.altova.com/manual/Mapforce/ ... ecode.html functions, which might be easier than FOR_EACH_TXTLIN
Re: Embedded documents (base64REncoded) in XML
Thanks Patrick.
I ended up using mapforce to handle the mapping rather than the 'FOR_EACH_TXTLIN'. It's a much neater solution.
I added a text file input using the base64 encoded file and mapped that to the xml document. I set the text file filename to dynamic and passed the filename into the map from the process.
I ended up using mapforce to handle the mapping rather than the 'FOR_EACH_TXTLIN'. It's a much neater solution.
I added a text file input using the base64 encoded file and mapped that to the xml document. I set the text file filename to dynamic and passed the filename into the map from the process.