Skip to main content

How to send very very large size data to client using Web Services and XML?

1 reply [Last post]
Joined: 2009-07-15


I am currently an intern involved in a project dealing with Axis2 and Netbeans.

I must create Java Web Service that accepts request from a client and return a very large collection
of data from my database.

i am able to send my data over to my client by manually converting my ResultSet into a Java String in "XML" format.

But i'm afraid that there might be a problem when i have a very large ResultSet and Java String cannot hold all my data (E.g. a Blob or millions of records)in the ResultSet.

Can i check is there a possible way to send my very large collection of data from database (millions of records) to my client app using Java Web Service and Apache Axis2? instead of sending over as a Java String type?

Really need help on this.. i'm stuck for 3 days already..

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-05-16

Have you checked loading your database data into a byteStream instead of a String?

Maybe thereafter you have to split the stream into some pieces or compress it before sending. Would be bad if you send millions of kbytes and then there is a problem and you have to start again...