Hi,

I've been experimenting with Woden and Axis2 a bit trying to exercise
Woden's extensibility features.  I've created some extensions and have
been trying to find the best way to register them and their error
message formats without having to change Woden or Axis2 code.  I'm
wondering if any thought has been given to the idea of Woden "plugins"
that would be a way to package extensions, their message formats, and
a means of registering both with the core?

It looks like the current, expected way to register extensions is to
sub-class WSDLFactory and override the newPopulatedExtensionRegistry()
method, then set the "org.apache.woden.WSDLFactory" property to the
sub-class' name. This works, but if multiple sets of
independently-developed extensions (not part of Woden distribution)
need to be registered, a user will need to create a "composite"
sub-class that will register their extensions and those developed by
others.

I'd like to offer a suggestion that would eliminate the need for
different users to write their own composite sub-classes and would
help modularize the registration of extensions.  The idea is to create
a new interface, ExtensionRegistrar, with a single method:
 void registerExtensions(ExtensionRegistry registry)
Each set of extensions provides a class that implements this
interface.  The implementation registers all extensions belonging to
its set. A new property contains a list of ExtensionRegistrar classes
whose "registerExtensions" methods are called after the standard
PopulatedExtensionRegistry has been created.  Using the property
achieves the effect of the composite sub-class without having to write
it.

With respect to error message formats, it looks like the current way
to do this is to add them directly to Woden's Messages.properties
file.  Would it instead be possible to modify MessageFormatter to
allow the registration of additional resource bundles containing the
message formats for extension sets?  MessageFormatter's "format"
method would then look for the format key in each of the registered
bundles.  An ExtensionRegistrar would be responsible for registering
the resource bundle for its extension set.

The net result of the above might be that a set of extensions could be
packaged in a jar file containing:
- the extension set's classes
- the ExtensionRegistrar implementation
- the extension set's message format resource bundle

I think the use of an ExtensionRegistrar could be fairly easily
incorporated into DOMWSDLFactory. I have more thoughts on this,
including error handling, please let me know if you're interested in
pursuing this further.  I hope this is a useful suggestion.


Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to