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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 03, 2003 10:22
Subject: RE: Re: Fear of Attachments


Steve,

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
is:

    Attachments attachments=
context.getCurrentMessage().getAttachmentsImpl();

    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.

-Dave


Reply via email to