• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Attachments with Axis

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm somewhat of a Web Services newbie. I am trying to modify an existing web service that FTPs a CSV file from a legacy system, reads through it, and writes some XML out to the web service. It is pretty top-down in that (for the most part) it reads a line of CSV, writes out a chunk of XML, rinse, repeat.

We are using Apache Axis 1.4 and what appears to happen is that Axis / Apache builds the whole String in memory before writing out the response.

Because the files we are sending are quite large, we occasionally run out of memory while processing them. As part of the rewrite of the service, I'm being asked to rewrite the service so that it takes up less memory.

In doing a bit of reading around I have come across the concept that for large files, the best practice is to use SAAJ / attachments.

I was wondering if anyone had any pointers to some good introductory lessons on that? I've read

http://java.sun.com/webservices/docs/2.0/tutorial/doc/

but most of the examples I see there have explicit SoapMessage and AttachmentPart objects in the code - all the code I am trying to re-use has all of that abstracted by Axis.

Thanks for reading and feel free to ask clarifying questions. I'll be the first to admit I only have a rudimentary grasp of this.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan,

An identical question and a similar one in this forum.

Regards,
Dan
 
Dan Miller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan,

Thanks for taking the time to reply.

Now, I may be misreading the links that you sent (such are the downsides of not totally understanding the basic framework), but both of those links seem to talk about how to READ attachments when consuming a web service.

I am trying to PROVIDE attachments as part of the service.
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic