Hi Sergey,

thanks for your explanations and please excuse my late reply.

You wrote (2010-07-26T18:21+0100):
> [...] the JAXRS providers which might be able to deal with
> specific parts are not used. [...]
> Enhancing Attachement.getObject() so that a suitable provider could
> be found if it's not already been done could be a good enhancement
> though.

My problem obviously was the assumption that it would already work this
way and I’m really surprised that’s not the case. Handling the bodies of
multipart attachments exactly like the body of a non-multipart message
would seem the obvious choice to me.

Is there a way to manually call a MessageBodyReader to deserialize an
attachment?

> If you expect a fixed number of parts, say the root providing some
> info about the (2nd) binary part, then you could have say
> 
> unpack(@Multipart("root", text/xml) MixedString str,
> @Multipart("2ndPart") InputStream is) {}

Alas I have to deal with a varying number of parts so it seems I will
have to use MultipartBody for at least some of them.

Anyway, seeing that my original approach couldn’t work I can now in good
conscience look for a different solution.

Thanks again.

Bye,
Bernhard

Reply via email to