Hi
On Mon, Jun 6, 2011 at 9:57 PM, Pascal Leclercq <[email protected]> wrote: > Hi all, > > first of all I want to say that I'm a complete newbie in REST. > > We are working on a open source (Apache Licensed) project called > "xdocreport". > > http://code.google.com/p/xdocreport/ > > The goal of this project is to give the possibility to design a report > templare under OpenOffice or MS Word and merge live data to produce report > in Java. We also support PDF and HTML conversion. > (Demo App here : http://xdocreport.opensagres.cloudbees.net/) > > We aim to provide REST and SOAP Webservices on this project. > > I have several question : > > I wonder if we should create service this way : > > > byte[] processReport(String reportId, byte > Would you like to have a shared signature for SOAP and REST services ? You may want to have a method dedicated to serving SOAP requests only and which would return say DataSource. That method may work for JAX-RS too. And you may also try introducing a method which returns a JAXB bean capturing the data - this will work for SOAP but also use CXF JAX-RS RequestDispatcherProvider to redirect to HTML-aware handlers or use XSLTJaxbProvider http://cxf.apache.org/docs/jax-rs-redirection.html#JAX-RSRedirection-WithRequestDispatcherProvider http://cxf.apache.org/docs/jax-rs-advanced-xml.html#JAX-RSAdvancedXML-XSLTsupport RequestDispatcherProvider and XSLTJaxbProvider are not 'intrusive' and can help with separating the presentation logic from the main controller code. Some users are combining Struts with CXF as well - but I've no experience there Cheers, Sergey > > > -- > Pascal Leclercq > -- Sergey Beryozkin Application Integration Division of Talend http://sberyozkin.blogspot.com
