A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Passing text file in webservice
Joined: Sep 02, 2005
Feb 23, 2008 08:47:00
I have to write a webservice which retrieves 20 mb text file from database and send it to client. What is the best way to do it?
Thanks in advance for your repies..
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
Joined: Nov 07, 2007
Feb 23, 2008 20:31:00
You can Encode64 the text, is that what you are asking due to the fact that the text file could be XML? Assuming you are using JAX-WS type XML method invocation? There is an encode64(byte data) method, check your Java API reference on...
extended by net.landspurg.util.URLFetcher
Author and all-around good cowpoke
Joined: Mar 22, 2000
Feb 24, 2008 08:05:00
What are your requirements on the client side?
Incorporating bulk text on the order of 20MB in a SOAP response would be incredibly wasteful and slow.
The SOAP with Attachments API for Java (SAAJ) is what you want. A google search for SAAJ will get you started.
Java Resources at
It is sorta covered in the
JavaRanch Style Guide
subject: Passing text file in webservice
how many ways do two java program communicate?
compress a xml file
Creating text fiel in server by JS or PHP
How can I see the output console?
Calling a .net web service from java as a client
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014