Skip to main content

How to send very large file using Web Services?

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

Hi,

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.
sarcasmmonster
Offline
Joined: 2009-08-06

Try using StreamingDataHandler

An example https://jax-ws.dev.java.net/guide/Large_Attachments.html (although the example is for streaming client to server rather than server to client)