axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taras Shkvarchuk <tar...@grandcentral.com>
Subject Axis and attachments (non-RPC)
Date Wed, 30 Jan 2002 01:37:15 GMT
I was looking at the Axis for non-RPC messaging, and noticed that there
isn't much there. (not even in TODO comments that I saw).
What is the planned future?

1) No clean way to set Content-Id of attachments.
You have to extract all of the attachments from the Attachments class,
change headers manually, then re add them to the Attachments.
1b) If you update Content-Id of the Attachment, it will not be saved unless
you re-add it to attachments.
1c) *BUG* Mime allows for duplicate headers, but they get eaten by HashMap
here.

2) There is no way to add an attachment to the list if you already have one.
>From another message lets say.

Example:
			Attachments atts=msg.getAttachments();
			DataHandler dh=new DataHandler(new
FileDataSource("data.dat"));
			AttachmentPart
part=(AttachmentPart)atts.createAttachmentPart(dh);
			part.addMimeHeader(HTTPConstants.HEADER_CONTENT_ID ,
"myAttachmentId");
			ArrayList parts=new ArrayList(2);
			parts.add(part);
			atts.setAttachmentParts(parts);

2b) Needs add(AttachmentPart), getAttachmentByContentId(), getIterator() -
Would be nice if remove() and add() would function on iterator.

3) Reading contents of the AttachementPart is awkward.
getActiviationDataHandler() method is not public, but is on package level.
Is it a typo or as intended?
AttachmentUtils has     public static DataHandler
getActiviationDataHandler(Part part)   method, but its kind of odd way of
doing it.

4) There is nice BoundaryDelimitedStream to read the attachments, but you
still rely on scary javax.mail code to create outgoing messages. Are there
any plans to change that?

P.S. What is the preferred way of sending patches, since only committers
have write access to cvs?

-Taras

Mime
View raw message