axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Re: Fear of Attachments
Date Mon, 03 Mar 2003 20:18:43 GMT
not tried that; that is what GET is for (i.e. I return URLs to retrieve
stuff). Have a look at what the echo sample does

----- Original Message -----
From: "Mount, Dave" <>
To: <>
Sent: Monday, March 03, 2003 10:22
Subject: RE: Re: Fear of Attachments


I also found your article very helpful.  Do you know how to send attachments
back to the client?  This poses the same problem if you follow the 'echo'
sample code.

I've tried adding it the same way that JAFDataHandlerSerializer does.  That

    Attachments attachments=

    if (attachments == null) {
        // Attachments apparently aren't supported.
        // Instead of throwing NullPointerException like
        // we used to do, throw something meaningful.
        throw new IOException(Messages.getMessage("noAttachments"));

    Part attachmentPart= attachments.createAttachmentPart(dh);

I have this code in my service method before I return a bean class.
However, the message that's returned is not multi-part, and it looks like
the Axis code doesn't even check for attachments on the way out.  Maybe
that's the wrong approach.

Thanks in advance for your help.


View raw message