This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Sending attachments from webservice to client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Sending attachments from webservice to client" Watch "Sending attachments from webservice to client" New topic
Author

Sending attachments from webservice to client

Patrick Mugabe
Ranch Hand

Joined: Jan 08, 2002
Posts: 132
I want to send an attachment from my web service to the client. I don't want to save it to file so is it possible to pass it as a Base64 encoded string.

I am using the ByteArrayOutputStream which I convert to a byte array.

e.g byte [] byteArray = baos.toByteArray();
String strByte = Base64.encode(bytes);


I now want to pass this from the webservice to the Client. My client uses C#. My webservices run on axis.

How would I go about it or is there a better way of doing it?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
AXIS should provide a mechanism for sending attachments that meets the SOAP with attachments standard. Which version of AXIS do you have?

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending attachments from webservice to client
 
Similar Threads
Login page security using Servlet
Reading image and convert it to Base64 format
CXF Problem
RSA Cipher
How to get the string ( text ) back out....