users@jsr311.java.net

Support for multipart MIME types in JAX-RS

From: Craig McClanahan <Craig.McClanahan_at_Sun.COM>
Date: Thu, 14 Aug 2008 15:58:58 -0700

I'm currently evaluating a proposed API that uses the multipart/mixed
content type to allow metadata about an object (in XML or JSON) as one
body subpart, and the object itself (typically in some binary format) as
a second body part. I don't see anything in the current spec that would
help me deal with this. Has there been any thinking about this, at
either the spec or the RI level?

For processing inbound things like my use case, a provider for
multipart/mixed that then (recursively, because you could theoretically
nest a multipart/mixed subpart) figured out the correct provider for
each body subpart, then gave me back some sort of data structure that
allowed access to the individual parts would be quite cool. For output,
the reverse transformation (pass in a set of entities and associated
content types, and the right providers would be called for each entity)
would also be useful.

Craig