aspose file tools*
The moose likes Web Services and the fly likes Axis - Sending large files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis - Sending large files" Watch "Axis - Sending large files" New topic
Author

Axis - Sending large files

Alan Richardson
Greenhorn

Joined: Mar 05, 2007
Posts: 17
Hi again. I have hit a problem with the web service I am creating. I need to invoke a method which includes as a parameter a PDF file. Below is the code I'm using to send the file, and I can send small files (largest I have sent is 12kb), but beyond that file size I get 'java.lang.ArrayIndexOutOfBoundsException: 8192', meaning the end-of-file cannot be reached. Any ideas of what the limiting factor is here, and any possible solution?


William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12788
    
    5
Data larger than a few K should probably be sent as attachments. Look for "SAAJ" (Soap with Attachments API for Java) related info in the Axis docs.

Bill
Alan Richardson
Greenhorn

Joined: Mar 05, 2007
Posts: 17
There is a SAAJ example supplied with Axis which constructs a SOAPMessage and passes it to the call method. However I need to implement authentication I'm not sure how I would handle the security headers this way, would it mean implementing it by hand?

Presumably the code below is adding an attachment, but the same problem occurs.


[ March 09, 2007: Message edited by: Alan Sunley ]
 
jQuery in Action, 2nd edition
 
subject: Axis - Sending large files