Hi
On 18/10/13 15:04, Winnebeck, Jason wrote:
-----Original Message-----
From: Francesco Chicchiriccò [mailto:[email protected]]
Sent: Friday, October 18, 2013 5:00 AM
I've been trying Enunciate in these days, for documentation only [3],
via its maven plugin.
While generating <doc> elements from Javadocs was working fine (I guess
with an approach similar to what reported above), I have found some
other serious issues: no support for base types (xs:int, xs:string, ...
are just ignored), no support for JAXB collections [4], ...
I gave up with Enunciate then - even though their HTML output looks
quite nice - and came back to "pure" CXF WADL generation: I am now
working on something to generate some HTML from WADL via XSLT.
Can you explain a little bit more about the issues you have? The documentation
I'm getting looks reasonable, if something is a string it says it's a string,
on both attributes and elements? It also is supporting collections inside types
fine. But you linked to https://jira.codehaus.org/browse/ENUNCIATE-429 which is
an issue with collections as returns from service interface. When I first tried
JAX-RS I was doing that but I've never made it to a production service with
that technique because I've always run into problems if you want to support
XML, because there's no namespace/XSD/root element entry, and implementations
like Jersey create adhoc elements that wouldn't be defined in XSD, meaning
there's no schema validation. So I've always ended up having to make wrapper
classes similar to what you see with SOAP so that the request/responses are
always a concrete class (not an interface) with no generics
CXF will add schema xs:elements to the generated WADL grammar in case of
the explicit collections to represent the wrappers it puts around them;
same for @XmlType only beans (since yesterday)
Cheers, Sergey
. It appears issues with tools like Enunciate is another disadvantage of that
technique.
I certainly won't say that Enunciate isn't rock solid, I've encountered a bit
of limitations/bugs I've had to work around but it's not /that/ broken. Another
tip with Enunciate is all of the output is done through freemarker templates.
So even if you want to consider XSLT approach, you could do something similar
with Enunciate. I've been able to tweak the output via a custom template in the
modules/docs configuration. From that template you can completely adjust the
entire sites output except for the WSDL/WADL/XSD files themselves. Those are
also done with freemarker but I don't see a way to customize them; you'd have
to adjust and rebuild enunciate source to change those I think.
Jason Winnebeck
----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message and any attachments.