Is sending a PDF as encoded byte array in XML sensible
Posted
by simonjwoods
on Stack Overflow
See other posts from Stack Overflow
or by simonjwoods
Published on 2010-03-12T09:12:42Z
Indexed on
2010/03/12
9:17 UTC
Read the original article
Hit count: 207
Hi
I am looking to return a PDF from a webservice call. (ATM, a custom proxy is required at the client-side)
AFAICS, there are 2 ways of doing it
a) Return the link to a web-accessible location b) Encode the PDF and include it in the XML
In my circumstance, a) will require 2 trips from the client, the first to get the path and the second to get the file.
However, wrt b), this link (http://www.coderanch.com/t/279020/Streams/java/wrting-bytearray-xml-file#1283263) suggests that it isn't a good idea to encode a PDF, though without explanation.
I'd be grateful if someone would offer recommendations of the above (and potentially, other alternatives).
Many thx
Simon
© Stack Overflow or respective owner