Thilina Gunarathne wrote:
>> Also you might want to consider deferred parsing of attachments. That

    >> means read the attachment for the stream only when needed.

This is what the Java does.
That's why I proposed you people to consider doing it in C :)..

In Axis2/Java we first parse only the SOAP part (MIME part containing the SOAP envelope) and build the OM tree. when building we create place holder OMText elements whenever we encounter <xop:include> elements. These OMText's contain the content-id for the attachment, which will be used when buildWithAttachments() or getDataHandler() is called on these objects. At that point we parse the rest of the MIME message up to that particular attachment and return the datahandler for that.

Also in Axis2/Java we placed the attachment caching code in between the builder.getDataHandler() method presented to the Axis2 engine and the MIME parser. The MIME parser, which has a InputStream interface, returns data belongs to a

Have a look at the following.. http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java?view=markup

specifically the getPart() method. Our MIME parsing logic is effectively a set of InputStream wrappers.* MIMEBodyPartInputStream which is at the end of this set of wrappers only returns bytes belongs to a particular MIME part. We cache the data which we get through this Stream, in other words already parsed MIME part.
*

Well, the Java folks have the luxury of streams. C has to manage this at socket level. So my question was, how are we supposed to do that with C network handler?

Samisa...


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

Reply via email to