I having trouble getting DIME attacments to work. Is DIME really supported for Axis?

I can sucessfully get MIME attachments to work.
However since there is no documentation at all for using attachments
in Axis, I am really stumped.

Here is my code which works successfully for MIME attachments on the client side:

DataHandler dh = new DataHandler(datasource);
AttachmentPart p = new AttachmentPart(dh);
call.addAttachmentPart(p);

But changing it to:

DataHandler dh = new DataHandler(datasource);
DimeBodyPart p = new DimeBodyPart(dh,ds.getName());
call.addAttachmentPart(p);

Results in:

 faultCode: {http://xml.apache.org/axis/}Server.userException
 faultString: java.lang.ClassCastException
 faultActor: null
 faultDetail:
        stackTrace: java.lang.ClassCastException
        at org.apache.axis.attachments.AttachmentsImpl.setAttachmentParts(Attach
mentsImpl.java:313)
        at org.apache.axis.client.Call.setRequestMessage(Call.java:1609)
        at org.apache.axis.client.Call.invoke(Call.java:1846)
        at org.apache.axis.client.Call.invoke(Call.java:1777)
        at org.apache.axis.client.Call.invoke(Call.java:1315)

Reply via email to