Hi Sergey, Thank you for your reply again. I finally came up with this API
@POST @Path("/convertDocumentFormat/") @Consumes("multipart/related") @Produces("multipart/related;type=text/xml") @Multipart("xop") public ResultType convertDocumentFormat(@Multipart DocumentConversionParameters docConversionParameters); and the generated WADL, looks like this: <resource path="convertDocumentFormat/"> <method name="POST"> <request> <representation mediaType="application/x-www-form-urlencoded"/> </request> <response> <representation mediaType="multipart/related;type=text/xml"/> </response> </method> </resource> I wonder, if the media type in the request is correct? and if I have to start WADL first, then I do not think I will be getting the same definition for this operation as posted above. I am sure I must be missing something, as the "element" attribute describing the types is missing in both request and response elements above. Please help Thanks and regards, Priya -- View this message in context: http://cxf.547215.n5.nabble.com/Best-way-to-send-and-receive-a-document-from-a-resource-method-in-rest-based-webservice-tp5745338p5745469.html Sent from the cxf-user mailing list archive at Nabble.com.