Search code examples
javaxsdmaven-2jax-rsenunciate

How to have enunciate generate documentation referencing existing xsd


I am using enunciate 2.6.0 to generate documentation for jax-rs services. For 1 method I am using a custom MessageBodyWriter to serialize to xml. I have an xsd file describing the response. Is it possible to point enunciate to that schema doc? By default, enunciate generates an ns0.xsd that is basically empty.

This page in the wiki seems describes the ability to configure existing schema. I have configured that so that it finds the local xsd file (the build fails if it cannot find it), but the generated documentation still does not reference it. I believe the problem is that there does not appear to be a tie from the object returned from the method and the xml type.


Solution

  • It appears that the key is to use the default namespace in the idl schema configuration value, even though a "real" namespace is used at runtime.