Hi all,
I'm quite new on web services generally and CXF specially. I want to use CXF
to implement a RESTful webservice which should return binary data directly
in the response with a content type of image/jpeg for example. What I want
to do is to call http://<host>/services/document/<id> and get this document
returned, so that the right application or Save file dialog appears in the
browser. Is this possible using the RESTful libraries with CXF? I think I
could implement this with my own Servlet implementation and setting the
content type and binaray data directly in HttpServletResponse, but I would
like to take advantages of CXF.
I think something like this:
@Get
@HttpResource(location="/document/{id}")
public BinaryData getDocument(String id) {
...
}
But this will probably just return a XML document with the encoded binary
data inside?
Any suggestions?
Thanks in advance
Harald
--
View this message in context:
http://www.nabble.com/RESTful-WebService-returning-a-binary-document-tp19402088p19402088.html
Sent from the cxf-user mailing list archive at Nabble.com.