axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristján Bjarni Guðmundsson <...@hugvit.is>
Subject Axis and DIME?
Date Mon, 24 Mar 2003 10:49:47 GMT
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)

Mime
View raw message