Hi
On 27/11/12 21:41, Javier Delgadillo wrote:
Hello all,

I want to create HTML pages that my JAX-RS services produce.  The services are 
currently using JacksonJaxbJsonProvider and the CXF JAXBELementPRovider to 
generate JSON and XML.  We're happy with the output the produce.  I'd like to 
take the XML produce by the XML Provider and use XSLT to produce the final 
html.  I tried playing with the XsltJaxbProvider, but when I included in my 
list of providers, I could no longer get the XML nor JSON from my endpoints.

XSLTJaxbProvider should certainly work alongside JAXB and JSON providers.

You can actually have only XSLTJaxbProvider there and set its 'supportJaxbOnly' property - XSLTJaxbProvider will simply delegate to the superclass in its writeTo whenever it has no any specific work to do for a given bean; so you can configure it exactly the same way as you configure JAXBElementProvider plus all the XSLT extras...

Another option is to use RequestDispatcherProvider and get the response redirected to JSP or some other view handler:

http://cxf.apache.org/docs/jax-rs-redirection.html

Or may try XMLInstruction annotation:

http://cxf.apache.org/docs/jax-rs-advanced-xml.html#JAX-RSAdvancedXML-XMLProcessingInstructions

HTH, Sergey

 So I decided to try plugging in my own HTML provider.  This is working fine, 
but I'd like to have breadcrumbs at the top of each page to so that users can 
navigate the endpoints that way (similar to how nabble list breadcrumbs in 
sites like this http://cxf.547215.n5.nabble.com/cxf-user-f547216.html ).

What's the best way to put the breadcrumbs in there?  In the Provider's writeTo 
method, I don't have access to the original request so I'm not sure what the 
path is.  Can this be done using an Interceptor further down the chain (ie some 
Interceptor that case also use XSLT to insert the breadcrumbs later on)?

If someone knows of an easier way to do this, I'd appreciate that as well.

Thanks for your time.
--
Javier Delgadillo
Esri / Implementation Services




--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to