Hi! I have studied WebEngine functionality regarding REST API a little bit more and I have several questions related to REST API based on WebEngine.
How to access existing WebEngine document management API (I am talking in this thread about programming interface, not web user interface)? 1) In nuxeo-webengine-core/JAX-RS-README.txt file I have found the following words: > For example. Let say you want an ATOM API for DocumentModel. > How you can implement it using WebEngine? > The response is - you do nothing! :) Just use an atom client that will send > the correct mime-type through "Accept" headers and WebEngine will use proper > Writer and Readers to encode/decode requests. > All other functionality like accessing documents, locking, unlocking, > deleting etc. will be already implemented by the DocumentObejct Unfortunately, it does not work for me. I have played with different Accept HTTP values: application/atom+xml, application/atomcat+xml, application/xml. No one of them returns ATOM response. After that, I have reviewed nuxeo-webengine-base project sources and found that DocumentObject has only text/htm value in @Produces annatation. Does it mean that it does not support "application/atom+xml" now? 2) I have tried to register new media-type in module.xml of my application: <media-types><media-type id="atom">application/atom+xml</media-type></media-types> then I have created in my project the view file: /src/main/resources/skin/views/Document/index-atom.ftl. But, it did not help in my attempts to get ATOM response from WebEngine document. 3) May be it could be solved using JAX-RS @Provider (implementation of MessageBodyWriter). But, unfortunately, I do not see how to register new provider in web module without modifying nuxeo-webengine-core project files (I found only one place in code where providers were registered: org.nuxeo.ecm.webengine.WebEngine constructor). I will be very thankful for any advises. Best regards, Alexander Litvin. -- Posted by "alexander.litvin" at Nuxeo Discussions <http://nuxeo.org/discussions> View the complete thread: <http://www.nuxeo.org/discussions/thread.jspa?threadID=2941#8694> _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
