If you
look in samples/attachments, you'll see the MIME vs. DIME switch. The
samples work, and send attachments back and forth in either MIME or DIME (+FDR
parameter). TestRef sends the contents of a directory back and forth,
using MESSAGE, while EchoAttachment sends a single file back and forth, using
RPC.
Betsy
-----Original Message-----
From: Kristj�n Bjarni Gu�mundsson [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:50 AM
To: [EMAIL PROTECTED]
Subject: Axis and DIME?
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)
Notice: This email transmission and/or the attachments accompanying it may contain confidential information belonging to Merant. The information is only for the use of the intended recipient. If you have received this transmission in error, please notify the sender immediately by reply email, and then destroy all copies of the transmission.
