Annotation Type XopWithMultipartRelated

    public @interface XopWithMultipartRelated
    This annotation can be used to process/produce incoming/outgoing XOP messages (packaged as multipart/related) to/from JAXB annotated objects.

    XOP packaging can be suitable if you have to work with binary content and you don't want to encode it (for example in base64 or hex inside an xml). XOP makes it possible to pass binary through the network without any encoding on it (binary contents will travel in separate parts of the multipart/related message).

    Example. A bean annotated with JAXB. XmlMimeType tells JAXB the mime type of the binary content (its not required to do XOP packaging but it is recommended to be set if you know the exact type):

     public static class Xop {
         private Customer bill;
         private Customer monica;
         private byte[] myBinary;
         private DataHandler myDataHandler;
         // methods, other fields ...
    A REST Service method parameters/return value annotated with XopWithMultipartRelated and consuming/producing MultipartConstants.MULTIPART_RELATED:
     public void putXopWithMultipartRelated(@XopWithMultipartRelated Xop xop) {

    More about XOP can be read here:

    $Revision: 1 $
    Attila Kiraly