Hello,

I'm designing a system that fetches large binary objects from a
database, applies processing to those objects and then returns the
objects to a SOAP client. One approach considered was SOAP with
Attachments and another is MTOM (supported by Axis2). I prefer MTOM.

Processing could take a few seconds or several minutes. In some cases
processing could take longer than the low level socket timeout. The
processing time will vary with the size of the binary object.

I've investigated http://ws.apache.org/axis2/1_2/mtom-guide.html which
will help with passing large binary objects back to the client but it
does not address my concern re timeouts.

My system layer applies processing to the binary objects in question.
Therefore, I'm assuming that the processing time will increase as the
binary objects encountered grow in size.

One approach would be to treat the binary objects as a stateful
resource and create an API to prepare the resources, poll for
processing completion, and finally return the resource to the caller.
With this approach each method could return quickly and timeouts would
not be a worry.

Alternately, if I can avoid creating such an API and using MTOM, the
soap envelope would be written to the response, followed by the binary
objects; but there may be a significant delay between when the
envelope is written and when the binary objects can be written. If the
delay is long enough there would be a timeout.

I have the notion that we could "trick" the socket into believing that
no delay has occurred by sending a sort of "keep alive" every few
seconds (a newline perhaps) after the soap envelope but before the
binary objects are read into the response.

In the end, what I'm trying to do is lower complexity by removing the
need to treat the binary objects as stateful resources (and thus
having to create some type of API to support this). Then one method
could do it all. But if not, I'll have to resort to an Apache Muse
http://ws.apache.org/muse/ approach, which would treat the binary
object as a stateful resource.

Has anyone dealt with this before? I realize my explanation might not
be totally clear so please let me know if I need to provide further
clarification.

Thanks,
Matt.





--
-- Matt Friedman

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to