Hi Dmitry,
XOP attachment support is not currently required by JAX-RS
implementations. IMHO i do not think XOP should be required. XOP is
really an encoding trick necessary when the abstract model of messages
is the XML infoset, which is the case for SOAP-based Web services, but
not for RESTful Web services.
Support is required for the javax.mail.MimeMultipart Java type, that API
can be used to parse the XOP message at the level of multipart/related
[1] semantics but not at the level of XOP semantics and the XOP
processing model.
JAX-RS provides plugable support for Java types and media types via the
MessageBodyReader and MessageBodyWriter interfaces. Thus you could add
support for XOP, as hinted above using JavaMail, or another way is to
use JAXB [2].
Paul.
[1]
http://www.w3.org/TR/2005/REC-xop10-20050125/#mime_xop_packages
[2]
http://java.sun.com/javase/6/docs/api/javax/xml/bind/attachment/AttachmentUnmarshaller.html
Dmitry Repchevsky wrote:
> Hello,
>
> Can't find an information about XOP (attachments) support in jsr311.
> In JAX-WS there is a MTOM, but since we do not use a SOAP in REST is
> there a possibility to return an XML with mime attachment (XOP )like
> using MTOM?
>
> Thank you in advance,
>
> Dmitry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109