• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I prevent WO5.4 from reading the whole request?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I prevent WO5.4 from reading the whole request?


  • Subject: Re: How do I prevent WO5.4 from reading the whole request?
  • From: Bogdan Zlatanov <email@hidden>
  • Date: Fri, 18 Jan 2008 11:37:34 +0200


    The real deal is that I'm trying to receive SOAP request that contains large attachments. Because of that my request represents multipart/related and not multipart/form-data, so request().multipartIterator() is no go.

    There is a more interesting part. The same code works just fine on MacOS X Tiger, using WO 5.3, i.e. calling my DA like this .../wis/mySoapDA and using request().contentInputStream() I managed to
send 700+ MB data. Does this mean that there is a bug in WO5.4?

    What if I do something crazy like using DWOAdaptor=<WO5.3 WOAdaptor class>?

Mike Schrag wrote:
This is how I do it in one of our apps:

File tempFile = ERXFileUtilities.writeInputStreamToTempFile(request().multipartIterator().nextFormData().formDataInputStream());

... in this case, I know there's only one key coming in, so I cheat and don't "properly" iterator the form datas -- i just grab the first one.  You can iterate over the form datas and check their name to find the one you are looking for if you have more than one.  If you don't use Wonder, ERXFileUtilities.writeInputStreamToTempFile is basically exactly what it sounds like.

ms

On Jan 17, 2008, at 9:11 AM, Bogdan Zlatanov wrote:

Hi all,

I'm trying to send a large file, say 200mb+ over HTTP to a DA of a WOApp. The problem is it blows with OutOfMemoryException, because the receiving app is trying to consume the whole request at once. I tried calling request().contentInputStream() and ended up with a null return value.
After googling around I could find this:

    http://www.omnigroup.com/mailman/archive/webobjects-dev/2006-May/002268.html

Basically it says contentInputStream() does not work with java 1.5, only on 1.4.2_xx. So the question is how do I get my hands on the raw input stream? Should I write my own WOAdaptor or there is better and/or easier ways deal with the problem?


Regards,
Bogdan Zlatanov



P.S.
I'm working on MacOS X Leopard 10.5.1, Eclipse 3.3.1.1(patched), WOLips 3.3.4763, Default MacOS JDK 1.5
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How do I prevent WO5.4 from reading the whole request?
      • From: Daryl Lee <email@hidden>
    • Re: How do I prevent WO5.4 from reading the whole request?
      • From: Lachlan Deck <email@hidden>
References: 
 >How do I prevent WO5.4 from reading the whole request? (From: Bogdan Zlatanov <email@hidden>)
 >Re: How do I prevent WO5.4 from reading the whole request? (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Mr. Pierre Frisch on webobjects-dev
  • Next by Date: Re: NSTimestamp mapped to DATE for mysql
  • Previous by thread: Re: How do I prevent WO5.4 from reading the whole request?
  • Next by thread: Re: How do I prevent WO5.4 from reading the whole request?
  • Index(es):
    • Date
    • Thread