Extensibility Architecture for Axis
When a web services extension spec such as WS-Security or the SOAP-over-email binding is implemented, there is usually a need to combine multiple pieces together in order to acheive the desired results. In particular, the given extension is often triggered by some sort of metadata in a WSDL document, and a set of Handlers needs to be deployed in services/engines which desire the extension.
General Architecture
One or more "extension directories" may be configured into Axis (by default, WEB-INF/AxisExtensions should probably be configured for Axis running in a webapp, and "./AxisExtensions" for SimpleAxisServer). These extensions directories will be scanned for jar files containing an "extension.xml" file at the root. The extension.xml file contains (to-be-specified) metadata which indicates to the WSDL processor / Axis engine the particular classes which are available in the jar file, and how they should be utilized. Details follow.
WSDL Processing
The WSDL processing system needs plug points for both WSDL reading and WSDL generation. When reading a WSDL, we need to set up a registry of "extension processors", which are classes within an extension jar whose job it is to understand certain extension elements. If an extension processor is configured for a particular QName, we give it a chance to assume control of the WSDL parsing process after the entire document has been read into an in-memory model. The extension may either indicate successful processing, in which case the program (WSDL2Java, Java2WSDL, or the Axis engine) continues, or may indicate failure, which will sometimes cause processing to halt, as in the case of a failed extension marked "wsdl:required".
Handlers
If an extension is engaged either through WSDL extensions or via WSDD configuration, we may need to automatically deploy certain handlers which also live in the extension jar file. The extension.xml configuration will determine how and when this occurs, including any constraints involving multiple extensions (i.e. "the signing extension must run after the encryption extension").
(original author :GlenDaniels)