Skip to end of metadata
Go to start of metadata

As of Enunciate 1.12, this information is not applicable. Consider the information on Multi-Module Projects instead.

One of the primary features of Enunciate is to present a complete and consolidated view of your web service API. In order to do this, Enunciate requires you to specify each and every class that will be exposed as part of your public API. (If you do not do this, you'll get an error at compile-time: "Unknown xml type for class: com.yourcompay.YourClass".)

If your entire API is composed of only the Java source files upon which you invoke Enunciate, then you don't need to do anything custom: these classes will be picked up by Enunciate automatically.

Importing API Classes

But sometimes, you want to expose as part of the public API a set of classes that have already been compiled. Enunciate will not pick up these classes automatically. Instead, you need to specify them in the Enunciate configuration file with the "api-import" element (see the configuration section of the user guide), which would look something like this:

Labels
  • None
  1. Jun 26, 2008

    If all of your classes are being imported from an external jar etc. Enunciate will fail. See bug for details:

     http://jira.codehaus.org/browse/ENUNCIATE-181

     The workaround is to crreate a placeholder java source file in your enunciate project optionally with @org.codehaus.enunciate.XmlTransient annotation. This should avoid any issues.

    -Yousuf