Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis - Sending large files

 
Alan Richardson
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic