Skip to content
Ryan Heaton edited this page Jun 21, 2024 · 31 revisions

Note: The following is applicable to Enunciate 2. For Enunciate 1.x modules, see Modules (Version 1).

Modules

The work of Enunciate is divided into modules. Modules are loosely coupled, loosely-interdependant extensions to the Enunciate engine. Each module has a specific set of work to perform. For example, the IDL module generates the IDL and schemas for the API, the Java XML client module generates the Java XML client libraries, etc. Since each module has a specific set of work to do, each module has also a separate set of configuration options.

The modules that are to be included in the Enunciate mechanism are discovered at runtime using the Java Service Loader.

There is a set of "provider" modules that you will likely always want enabled. The "provider" modules each interpret and provide a model to the Enunciate engine on which the various other modules might depend in order to do their work. Each provider module defines its model based on the various specifications and libraries that define the model. For example, JAXB provides a specification that describes how Java objects are (de)serialized to/from XML. The JAXB Enunciate Module uses the Java classes to provide an XML model to Enunciate. Other modules (e.g. C# XML, Java XML, etc.) use the model provided by the JAXB module to generate code. You'll want to be thoughtful about disabling a provider module because it may have the side-effect of disabling depending modules.

To disable a module, set disabled="true" on the module configuration in the Enunciate configuration file, e.g.:

<?xml version="1.0" encoding="UTF-8"?>
<enunciate
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.18.0.xsd">
  <modules>
    <gwt-json-overlay disabled="true"/>
  </modules>
</enunciate>

For more information about how to write your own module, see Custom Modules.

Provider Modules

module description coordinates
jaxb Provides the model for the JAXB API. com.webcohesion.enunciate:enunciate-jaxb
jackson Provides the model for the Jackson JSON API. com.webcohesion.enunciate:enunciate-jackson
jackson1 ~~Provides the model for the Jackson 1 JSON API. com.webcohesion.enunciate:enunciate-jackson1~~ (Removed since Enunciate 2.16.)
jaxws Provides the model for the JAX-WS API. com.webcohesion.enunciate:enunciate-jaxws
jaxrs Provides the model for the JAX-RS API. com.webcohesion.enunciate:enunciate-jaxrs
spring-web Provides the model for the Spring Web API. com.webcohesion.enunciate:enunciate-spring-web

Non-Provider Modules

module description coordinates
c-xml-client Generates the C/C++ XML client libraries. com.webcohesion.enunciate:enunciate-c-xml-client
csharp-xml-client Generates the C# XML client libraries. com.webcohesion.enunciate:enunciate-csharp-xml-client
docs Generates the API documentation. com.webcohesion.enunciate:enunciate-docs
java-xml-client Generates the Java XML client libraries. com.webcohesion.enunciate:enunciate-java-xml-client
java-json-client Generates the Java JSON client libraries. com.webcohesion.enunciate:enunciate-java-json-client
javascript-client The JavaScript client library for JSON. com.webcohesion.enunciate:enunciate-javascript-client
gwt-json-overlay Generates the GWT JSON Overlays. com.webcohesion.enunciate:enunciate-gwt-json-overlay
obj-c-xml-client Generates the Objective-C XML client libraries. com.webcohesion.enunciate:enunciate-obj-c-xml-client
php-xml-client Generates the PHP XML client libraries. com.webcohesion.enunciate:enunciate-php-xml-client
php-json-client Generates the PHP JSON client libraries. com.webcohesion.enunciate:enunciate-php-json-client
ruby-json-client Generates the Ruby JSON client libraries. com.webcohesion.enunciate:enunciate-ruby-json-client
idl Generates the XML Schemas and IDL files for the API. com.webcohesion.enunciate:enunciate-idl
swagger Builds the Swagger UI for the project. com.webcohesion.enunciate:enunciate-swagger
Clone this wiki locally