axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiva Weerawarana" <>
Subject Re: General question about huge attachments
Date Fri, 26 Oct 2001 11:30:00 GMT
I would've loved to not have put content length into Apache SOAP.
Without a doubt it hurt performance even more.

However, not putting it prevents you from using the same HTTP
connection for multiple requests (keep alive). So, if you are
willing to lose keep alive capability then can forget Content-length.


----- Original Message -----
From: "Rob Jellinghaus" <>
To: <>
Sent: Friday, October 26, 2001 6:39 AM
Subject: General question about huge attachments

> So I've heard from many people that there is a lot of interest in being
able to send really large attachments via SOAP (and via Axis in particular).
> My research indicates that Apache SOAP 2.2, at least, requires that there
be a Content-Length header in every HTTP POST.
> Here's the fault you get without it:
> Generated fault:
>   Fault Code   = SOAP-ENV:Protocol
>   Fault String = Content length must be specified.
> However, my reading of page 119 of
indicates that Content-Length is not mandatory... it's a SHOULD, not a MUST.
(Interestingly, Apache SOAP 2.2 can deal just fine with missing
Content-Length headers in the MIME body parts themselves!)
> Content-Length, of course, is the bane of streaming (calculating the
length of a huge encoded stream, before sending it, is a pain).
> My question to you all is, is it a bug that Apache SOAP *requires* a
Content-Length even for HTTP POSTs that contain MIME messages?
> My second question is, would it be desirable for Axis to *not* require
Content-Length for HTTP POSTs that contain MIME messages?
> I think the best possible outcome here would be an Axis that, when sending
and receiving MIME messages (particularly with huge attachments), did no
Content-Length calculations at all, instead just streaming directly from
(say) files to the network.  I think this is even achievable, especially if
Content-Length can be omitted.  (If Content-Length is not omittable in
general, we could still put in hacks to try to calculate it up front, but it
becomes much uglier.)  +1?  -1?
> Thanks for any thoughts!
> Cheers,
> Rob

View raw message