* How to return valid xml to an xml databank from JS

LegacyForumLegacyForum Posts: 1,669 ✭✭
Using a Javascript method, how do I return valid XML to a chained XML Data Bank? Attempting to return a string value from Javascript results in:

Tool "XML Data Bank" did not accept output from method "Method"

Can this be done within the JavaScript method AND/OR in the UI through a chained tool? Python allows the use of: SOAPUtil.getXMLFromString; can I get JavaScript to use the same util?

Here is my example method:

function randomString() {
   var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
   var string_length = 8;
   var randomstring = '';
   for (var i=0; i<string_length; i++) {
       var rnum = Math.floor(Math.random() * chars.length);
       randomstring += chars.substring(rnum,rnum+1);
return randomstring;
Sign In or Register to comment.