if you control the web service, you can save the file to the webserver and then download it from softone module:
function Download(file) {
var softOneDir = X.DIR('HTML');
strHDLocation = softOneDir + file;
var objXMLHTTP = new ActiveXObject('MSXML2.XMLHTTP');
objXMLHTTP.open('GET', strFileURL, false);
objXMLHTTP.send();
if (objXMLHTTP.Status == 200) {
var objADOStream = new ActiveXObject('ADODB.Stream');
objADOStream.Open;
objADOStream.Type = 1;
objADOStream.Write(objXMLHTTP.ResponseBody);
objADOStream.Position = 0;
objADOStream.SaveToFile(strHDLocation, 2);
objADOStream.Close;
objADOStream = null;
}
objXMLHTTP = null;
}
if you dont control the webservice, you can get localy the base64 string with
var objXMLHTTP = new ActiveXObject('MSXML2.XMLHTTP');
objXMLHTTP.open('GET', strFileURL, false);
objXMLHTTP.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
objXMLHTTP.send();
if (objXMLHTTP.Status == 200) {
var myscript = objXMLHTTP.ResponseText;
}
But I don't think it is possible to save the recoded pdf using X.TOFILE , the result will probably not be a pdf file or you will get an error.
What it is possible is to save it in a blob field is sql server using a store procedure that takes the base64 string and recodes it.