Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Send file to WebService

Hi all,
I'm trying to send a file to a Webservice, along with other parameters. For reading the file I use tFileDelimited with no separators, then pass the content to tWebServiceInput. I cannot figure out how to refer that content in the parameter list from tWebServiceInput for sending it to the WebServer.
Regards,
Radu
Labels (2)
13 Replies
Anonymous
Not applicable
Author

Use a tJavaRow for the encode/decode.
To enccode
String s = new sun.misc.BASE64Encoder().encode(input_row.Image);
//System.out.println("Text Decryted : " + s);
output_row.Image = s;
To deccode
byte[] buf = new sun.misc.BASE64Decoder().decodeBuffer(input_row.Image);
//System.out.println("Text Decryted : " + s);
output_row.Image = buf;

Thanks Jan! Now it works.
Best Regards!
_AnonymousUser
Specialist III
Specialist III

Would be the same procedure to send an XML to a Restful Web Service or is there something better?
janhess
Creator II
Creator II

I think it only applies to binary data. Text should be ok.
Anonymous
Not applicable
Author

Hello, I was wondering if this process for encoding goes after you send the content of the file through a String.
tFileInputDelimited--main--tJavaRow--Encoding--output

Thank you!