web stats
Mirth Community - View Single Post - Using Correct Java Sytax in Mirth via Javascript
View Single Post
Old 05-11-2015, 12:37 PM
dre4967 dre4967 is offline
OBX.2 Kenobi
Join Date: Mar 2011
Posts: 64
dre4967 is on a distinguished road

I don't have this error anymore, after using the primary database source here is the final code. If using Blob type see commented code.

while (dbResult.next())
bFound = 1;
mrisReportFound = 1;
//var blob = dbResult.getBlob(4);
//var buffer = blob.getBytes(1,blob.length());
var buffer = dbResult.getBytes(4);
var newStream = new java.io.ByteArrayInputStream(buffer);
var doc = new Document(newStream);
var wordConverted = doc.toString(SaveFormat.TEXT);
//var wordConverted = doc.toString(SaveFormat.HTML);

fullReport += wordConverted;
Webservice to the end, Mirth
Reply With Quote