On 18/10/2013 17:08, Winnebeck, Jason wrote:
-----Original Message-----
From: Francesco Chicchiriccò [mailto:[email protected]]
Sent: Friday, October 18, 2013 10:21 AM

I could not get any XML type information about method parameters; WADL
fragment was something like

<param name="executionId" style="template"/>

while I would have expected (and which I actually get from CXF)

<param name="executionId" style="template" type="xs:long"/>
Thanks for sharing your story, so I can keep this in mind if I run into these 
issues myself. I didn't think about primitive returns. I didn't have any in my 
web service. When I read your first mail I got the impression you meant it 
didn't support primitives or collections anywhere in the data model, which 
sounded a little too wild.

This is exactly what I did for a couple of days: playing with source
code and fmt files, rebuilding Enunciate and checking in my project:
too much long, error prone and ineffective.
Yes, I also had to fight with it for a long time, ultimately I was successful except I 
found a bug where in WSDL (http://jira.codehaus.org/browse/ENUNCIATE-804) when it never 
can generate elementFormDefault="qualified", and I couldn't find a reason not 
to use unqualified in XSD so I ended up doing that as a workaround. So in the end I got 
lucky enough but if anything else came about I would probably have given up. So I think I 
will have some big reservations to suggest Enunciate in the future.

My XSLT-based processing tool is instead progressing well: if you are
interested I'll let you know when it's ready.
I think this would be very useful for people who have gotten CXF to generate 
documentation through annotations, or contract-first development. Myself 
specifically I can't use it because my docs are in Javadoc so CXF-generated 
WADL would be missing all documentation. I also have the issue that my service 
is JAX-RS and WS at the same time. For example, Jersey for JAX-RS can do WADL 
from javadocs, but I chose CXF to do RS and WS at the same time.

Have you looked at Swagger? I originally got into Enunciate because my initial 
approach was to create a Swagger file by hand, and on their site they have a 
link to Enunciate because it can generate the Swagger description file (in 
addition to everything else, plus taking its info from Javadocs). But maybe I 
took one step too far...

Oh yes, I've tried Swagger (via their JAX-RS / CXF sample [1]) and I really like its output; however, the final WAR from such very basic sample is about 40 MB, mainly due to Scala compiler and other artifacts: definitely too loaded for my needs, so I gave up.

Regards.

[1] https://github.com/wordnik/swagger-core/tree/master/samples/java-jaxrs-cxf

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to