If you are dealing with more binary than you'd like to load into memory at once, then I would return a url to a (temporary or otherwise depending on you security concerns) file on the server for standard http or ftp download and it is easy for a ws client implemented on any stack to get that. That's what I have done in the past. Sending files from within a ws without using attachments has always been a bit of a workaround from what I have found. If the files you are dealing with CAN be read into memory, then simply serialize to the bytes and send that in the proper field, you could send another response parameter within the complex type that indicates files types, names, etc if you wanted.
Chris _____ From: Pantvaidya, Vishwajit [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 10:17 AM To: axis-user@ws.apache.org Subject: [Axis2] REST webservice that returns pdf/word document My Axis2 1.3 based webservice is working fine using MTOM attachments and everything else. The default REST (POX) support also works well for the existing webservices. Now I need to add a REST service that returns a pdf/word document. The Axis REST doc says that "the GET based REST Web services support only simple types as arguments and it should adhere to the IRI <http://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060327/#_operation_iri_style > style", which means I cannot have xsd:base64Binary types in my wsdl. Is there anyway I can add this webservice to return the word/pdf doc? - Vish.