Hi,
i want to offer a file to download via a service. But when i use the https-get service from an other IS, i only get a html-structure.
Has somebody got any idea??
Hi,
i want to offer a file to download via a service. But when i use the https-get service from an other IS, i only get a html-structure.
Has somebody got any idea??
Dennis,
Could you please elaborate a bit on what you are trying to do? What is your requirement?
Rohit
Dennis:
If you’re returning a text file, you can use the pub.flow:setResponse service. You will need the contentType input appropriately - for eg: “text/xml” for XML documents. You can also use template to format it (pub.template:* services), again, setting the content type appropriately.
Returning binary data (eg: an array of bytes) is perfectly do-able over HTTP since it is a “binary clean” protocol (i.e. no encoding of content is necessary for transferring arbitrary binary data.) However IS, at least IS 4.6, does not support returning binary data in the setResponse Flow service as far as I know. You could either look at the WM Java API to do this (open a service call with WM if you can’t find the methods). Or you could try base-64 encoding the content, and putting in an additional content-transfer-encoding header (in addition to the content-type header which will probably need to set to something like “application/binary” in this case.)
Here’s something I found handy:
[url=“Rafa Fernandez, Cerrajero – Calidad de servicio y profesionalismo”]Rafa Fernandez, Cerrajero – Calidad de servicio y profesionalismo
Also another link:
[url=“5. The Content-Transfer-Encoding Header Field”]http://www.freesoft.org/CIE/RFC/1521/5.htm[/url]