Published on WSO2 Oxygen Tank (http://wso2.org)

How should I change axis2.xml to add a custom handler to the dispatch phase?

By deepal
Created 2006-06-26 20:18

Q : How should I change axis2.xml in order to add a custom handler to the dispatch phase? If you want to add a handler to axis2.xml, then that handler should be available in context class loader. In simple terms, the handler class should be available in the class path. For example, all the handlers listed in axis2.xml are available in the system class path so context class loader can pick them up. Engaging a module globally has nothing to do with axis2.xml handlers, and handlers in a module can not be accessed via context class loader. So if you add a handler reference to axis2.xml while the actual handler is in the module you will get 'class not found' exception. So the correct way of adding a handler to axis2.xml is by adding the handler class in to class path and then adding the handler entry into axis2.xml. In the meantime with the use of phases and phase rules, you can add handlers into any location by engaging module.

Applies To:

Apache Axis2/Java version 1.0


Source URL:
http://wso2.org/library/190