I was able to do this: put 'application/pdf pdf' into a .mime.types file in my home directory...
Create a javax.activation.DataHandler new DataHandler(new FileDataSource("myfile.pdf"))
and pass it as a method parameter (or return type)
then the resulting soap message has the pdf as an attachment
with the "application/pdf" mime type specified in the header.
I would think that your server method would work if the return type is DataHandler and if the server can make the mime type association.
Hope this helps... Tom Nelson RABA Technologies
On Mar 11 2004, Jim Collins wrote:
Hi,
Does anyone know how to return a PDF file from a call to a web service? I want to have a method like this:
public File getFile(String filename)
That a client can call and which will return a PDF with the filename specified if it exists.
Thanks for you help.
Jim.
