Hi all, I need to display a pdf in a browser. The pdf datas are stored in an oracle db (LOB). Is it possible to achieve this with a REST Service ? I don't see which output type to use... I'm using 5.1.1 with DI + ESB Edition.
Thanks for your answer cschneider, but I didn't understand where I have to setup this content-type in the tRestResponse. Well, I guess I have to load my PDF datas in the body of the response, but how ? .. I didn't find any example of what the XML answer should looks like.
Hi Sylvain Yes, tRESTResponse only supports Document & String for now. Indeed, expanding a list of supported response types (byte, possibly Object, and may be in the future: InputStream) will help. Let us think a bit about it. Cheers, Sergey
Hi - unfortunately it did not make it into 5.3.1. This enhancement request was reviewed exactly yesterday :-), I believe byte will be supported by tRESTResponse in few weeks time; I'm also positive that byte will be supported by tRESTRequest. Thanks for driving this enhancement request, Sergey
By the way, is it something that is a bit of a blocker for you ? Dietmar had a workaround idea: get byte Base64-encoded in tJavaFlex and link the resulting String to tRESTResponse 'string' field and then get this string Base64-decoded in a browser-hosted script. This of course requires a bit of manual coding, but may help in the short term. If you do decide to go this route, please check if Talend Studio ships a Base64 encoder, otherwise load it with tLoadLibrary (use the library of your choice).