users@jaxb.java.net

Re: how to attach MS word document in xml message?

From: Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com>
Date: Wed, 08 Jun 2005 19:40:36 -0400

Tang, Harry wrote:
> Hi, Kawaguchi,
> The last paragraph below is what I was originally looking for. But I
> did not realize that if using MIME multipart message, it is not strict
> XML message anymore.

That's the common problem people have with XOP.

> The DataHandler approach is interesting, but as you mentioned, it
> would be nice it can simplify process to insert the uploaded files to
> xml message.

I think it's a good exercise for someone to learn about using 2.0 ---
it's basically a nice class with a lot of helper methods. You use
@XmlAccessorType(NONE) to avoid any of those helper methods to map to
XML, and then you have one property with @XmlValue that binds to
DataHandler.

If there's anyone in this list interested in writing one, be my guest... :-)

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com