Appears the solution was to include @xmlrootelement on each of my models. Then I used the doc generator: http://enunciate.codehaus.org/index.html
As long as my models have the element defined, it de-serializes as expected.
Pregunta
I have a rest app using fasterxml jackson for serialization.
I wanted to enhance the wadl to show the model fields inside the representation tag, such as
<representation mediaType="application/json">
<doc>...</doc>
<param name="myField" type="xs:string"/>
...
</representation>
instead of the vanilla description of:
<representation mediaType="application/json">
<doc>...</doc>
</representation>
I thought adding a bean for WadlGeneration was all I needed to do...
<bean id="jacksonProvider" class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider">
<constructor-arg><ref bean="customObjectMapper"/></constructor-arg>
</bean>
<bean id="wadlGenerator" class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
<property name="linkJsonToXmlSchema" value="true" />
<property name="supportCollections" value="true"/>
<property name="ignoreMessageWriters" value="false"/>
<property name="useJaxbContextForQnames" value="false"/>
</bean>
<jaxrs:server id="restContainer" address="/">
<jaxrs:serviceBeans>
...
</jaxrs:serviceBeans>
<jaxrs:extensionMappings>
<entry key="xml" value="application/xml"/>
<entry key="json" value="application/json"/>
</jaxrs:extensionMappings>
<jaxrs:providers>
<ref bean="jacksonProvider" />
<ref bean="wadlGenerator" />
</jaxrs:providers>
</jaxrs:server>
.. but apparently there is more to do. I have seen examples in jaxb and codehaus jackson, but any ideas on how to make this work with fasterxml jackson?
Solución
Appears the solution was to include @xmlrootelement on each of my models. Then I used the doc generator: http://enunciate.codehaus.org/index.html
As long as my models have the element defined, it de-serializes as expected.