Skip to end of metadata
Go to start of metadata

As of Enunciate 1.8, you can also explicitly list the classes that define your API. This is done with the <api-classes> element in the Enunciate configuration file. See the User Guide for more information.

Sometimes you create classes that should not be included as the public API.  Often, these are utility classes that are used by the service implementation beans and many will cause Enunciate to fail because they don't conform to the JAXB specification.  But you still want to compile these classes along with your normal API classes.

JAXB 2.0 provides an annotation, @javax.xml.bind.annotation.XmlTransient, that was provided for this purpose.  Unfortunately, JAXB 2.0 only allows this annotation to be applied to methods or fields and not to types (i.e. classes or interfaces).  This was fixed in JAXB 2.1, but it's often impractical to use 2.1 because 2.0 was the version that came bundled with the JRE.

So, you can alternatively use an annotation provided by Enunciate, @org.codehaus.enunciate.XmlTransient, to indicate that a class should be ignored as it pertains to the public API.  Enunciate will compile and include these classes in the package, but it will not show up as part of the API.

For example:

Labels
  • None