You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Axl Mattheus <ax...@sun.com> on 2001/07/12 11:27:27 UTC

Axis attachments

Hi Rob.

>>Hi Axl!  Welcome!  It would be great to have attachments working.

Thanks for the warm welcome!

>>Apache SOAP implements attachments via a MIME body class that the message
>>gets read into first, with accessors for the various parts of the message.
>>Something like that could certainly be done for Axis as well, though Axis
>>is written more around a streaming model (parse only the bits you need
when
>>you need them).  It would be great to write the MIME body class using a
>>streaming model (i.e. provide streaming access to the first element, then
>>the second, etc.).  This would also address Robert Walker's concern
>>regarding memory consumption from reading all attachments into memory.
>>
>>Perhaps the MIME body class could become a member of the MessageContext,
>>and the Message itself would be constructed from the input stream that is
>>generated for the first MIME element....

I have a version 0.03.0000 version for review.  How would I go about to get
axis-dev's scrutiny and suggestions loop going?

>>Also, looking at the Axis ID/HREF code will obviously be crucial for
>>attachment support; it'd need to be possible to make an ID / HREF
reference
>>to a separate (stream-accessed) part of the MIME message.  I don't know
>>exactly how deserialization figures into this picture.
>>
>>Glen et al., check me on this?

Huh?

>>As far as how MIME messages are *generated*, I'm less clueful -- I didn't
>>look very closely at that part of Apache SOAP.

Yip, I also don't know what you don't know...

>>A fellow named Jim (can't find his email address, his IRC nick was
>>"moatas") said he was looking into attachments, but we haven't heard from
>>him in quite a while, so I'd say it's wide open.

ping Jim.  Jim, are you there?

>>How much time do you have for this?

Apache Axis is my full-time job!  Things are just a bit hectic right now -
I'm moving from Cape Town to Dublin.  It should take a week or so to 'slow
down' to a 1,000,000 miles an hour...

>>Cheers!
>>Rob

HĂȘ pret!

Axl Mattheus
Staff Engineer
Sun Microsystems
+27 21 919 9290
axl.mattheus@sun.com


Re: Axis attachments

Posted by Rob Jellinghaus <ro...@unrealities.com>.
At 10:27 AM 7/12/2001 +0100, Axl Mattheus wrote:
>I have a version 0.03.0000 version for review.  How would I go about to get
>axis-dev's scrutiny and suggestions loop going?

Email a .zip or .tar.gz file containing the code to axis-dev.

>>>Also, looking at the Axis ID/HREF code will obviously be crucial for
>>>attachment support; it'd need to be possible to make an ID / HREF
>reference
>>>to a separate (stream-accessed) part of the MIME message.  I don't know
>>>exactly how deserialization figures into this picture.
>>>
>>>Glen et al., check me on this?
>
>Huh?

My reading of the SOAP Attachments spec
(http://www.w3.org/TR/SOAP-attachments) states that attachments are
referenced from the SOAP envelope using href-style syntax:

<?xml version='1.0' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
..
<theSignedForm href="http://claiming-it.com/claim061400a.tiff"/>
..
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: <http://claiming-it.com/claim061400a.tiff>
Content-Location: http://claiming-it.com/claim061400a.tiff

...binary TIFF image...
--MIME_boundary--

Note the 'href="..."' reference.  This is similar (if not almost
identical!) to the standard support for href references to values in a SOAP
message (http://www.w3.org/TR/SOAP/#_Toc478383520):

<e:Book>
   <title>My Life and Work</title>
   <author href="#Person-1"/>
</e:Book>
<e:Person id="Person-1">
   <name>Henry Ford</name>
   <address href="#Address-2"/>
</e:Person>
<e:Address id="Address-2">
   <email>mailto:henryford@hotmail.com</email>
   <web>http://www.henryford.com</web>
</e:Address>

Hence, I would hope that the support for attachments in Axis would be
cognizant of (if not actually built using) the existing Axis support for
intra-envelope references.  You will at least want to look at
test/encoding/TestHRefs.java and at the use of the "href" instance variable
in org/apache/axis/message/MessageElement.java.

Does this clarify what I was getting at?

>Apache Axis is my full-time job!  Things are just a bit hectic right now -
>I'm moving from Cape Town to Dublin.  It should take a week or so to 'slow
>down' to a 1,000,000 miles an hour...

Wow.  So how much time is full-time, if you are moving transcontinentally???

Cheers!
Rob