I am trying to use Spring Wadl Generator : https://github.com/autentia/wadl-tools .
AFAIK, this tool uses the same idea of Tomasz Nurkiewicz @ tomasz-nurkiewicz: get RequestMappingHandlerMapping from Spring, check each one and create the corresponding WADL.
Internally, the tool will use JAXB to create XML parameters in controllers. How good, but nothing works out well with my application.
I got the following exception:
2014-02-07 15:33:41,827 WARN user=unauthenticatedUser com.autentia.xml.namespace.QNameBuilder - Cannot discover QName from JAXB annotations for class: java.util.Map. Preparing generic QName.com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.util.Map
What comes from (simplified stacktrack)
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:471)
(...)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:248)
(...)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
at com.autentia.xml.namespace.QNameBuilder.discoverQNameFromJaxb(QNameBuilder.java:68)
(...)
at com.autentia.web.rest.wadl.builder.ApplicationBuilder.build(ApplicationBuilder.java:36)
Question
Can I connect the default adapter to the interface?
, / .
Edited
, API REST.
javadoc MessageWriter:
, Java . MessageBodyWriter, @Provider.
WADL , . MessageBodyWriter , , API. QNameBuilder.discoverQNameFromJaxb, / "" MessageBodyWriter java.util.Map WADL-?