Did you check the attachments section in the Wiki?
http://wiki.apache.org/ws/FrontPage/Axis 

On 4/26/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> Sorry to bother you again with the same question, but I am really stuck
> here.
> 
> I need to send a binary file from the server to a client, yet I am not
> sure where/when to actually add the attachment (on the server) and how
> to get access to the attachment on the client side.
> 
> So far I'm trying this:
> DataHandler dh = new DataHandler(new FileDataSource("/tmp/ws_expor.xls"));
>          SOAPMessageContext smc = (SOAPMessageContext)
> MessageContext.getCurrentContext();
>          boolean isNull = smc==null;
>          logger.info("is smc == null?"+isNull);
>          AttachmentPart ap = smc.getMessage().createAttachmentPart();
>          ap.setDataHandler(dh);
>          smc.getMessage().addAttachmentPart(ap);
> 
> Any answers or pointers to samples/documentation would be extremely helpful.
> 
> Thank you,
> 
> Tom
>

Reply via email to