What you are doing is correct, and I would recommend you to enable MTOM (if you have not done already). Axis2 has very good support for MTOM.
Deepal > > Hi, > > > > I am currently investigating the best way to write a web service using > axis 2 that returns a csv file. I found an example online that I > managed to get working, although it's very simplistic. > > > > I have copied the method I expose below as I would like to know if > this is a suitable approach to sending attachments, it seems far too > simple and I wonder if there are any implications that I don't know > about to doing it this way: > > > > public DataHandler getFile(String fileName) { > > FileDataSource dataSource = new FileDataSource(fileName); > > DataHandler fileDataHandler = new DataHandler(dataSource); > > return fileDataHandler; > > } > > > > If anybody can help me out I would appreciate it. > > > > Thanks, > > > > Paul > > > ******************************************************************************************************************** > > This message may contain confidential information. If you are not the > intended recipient please inform the > sender that you have received the message in error before deleting it. > Please do not disclose, copy or distribute information in this e-mail > or take any action in reliance on its contents: > to do so is strictly prohibited and may be unlawful. > > Thank you for your co-operation. > > NHSmail is the secure email and directory service available for all > NHS staff in England and Scotland > NHSmail is approved for exchanging patient data and other sensitive > information with NHSmail and GSi recipients > NHSmail provides an email address for your career in the NHS and can > be accessed anywhere > > ******************************************************************************************************************** -- Blog - http://blogs.deepal.org/