Hi,

I looked at it but the important question (sending binary data from the server to the client) for me wasn't answered:
http://www.mail-archive.com/[email protected]/msg09828.html


Right now I am using a datahandler to achieve this - but the dh is not in the attachment but directly returned by my service. Of course I am happy, that it works, but I am not sure why. How is the binary data transfered? Any thoughts?

Thanks,
Tom


Anne Thomas Manes wrote:
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