[
https://issues.apache.org/jira/browse/WODEN-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Kaputin updated WODEN-163:
-------------------------------
Fix Version/s: M8
> Provide a mechanism for registering extensions and their error message
> formats independently of the API.
> --------------------------------------------------------------------------------------------------------
>
> Key: WODEN-163
> URL: https://issues.apache.org/jira/browse/WODEN-163
> Project: Woden
> Issue Type: Improvement
> Components: Parser
> Reporter: Peter Danielsen
> Assignee: John Kaputin
> Fix For: M8
>
> Attachments: woden-extensions-example.jar
>
>
> Woden currently provides a means of registering extensions through methods of
> the ExtensionRegistry. An ExtensionRegistry is a member of a WSDLReader
> produced by a WSDLFactory. The current means of registering error message
> formats is to add them to the core Woden resource bundle in
> org.apache.woden.internal.Messages.
> As Woden is currently used in Axis2 codegen, it is not possible to access the
> WSDLReader and its ExtensionRegistry to register extensions before parsing
> begins. The way around this is to subclass WSDLFactory, register the
> extensions in the subclass, and set the "org.apache.woden.WSDLFactory"
> property to tell Woden to use the subclass. This works, but if multiple sets
> of independently-developed extensions (not part of the Woden distribution)
> need to be registered, a user will need to create a "composite" subclass that
> will register their extensions and those developed by others.
> Woden needs a mechanism to allow the modularization of the registration of
> extensions and their error message formats. It should allow the registration
> of multiple sets of independently-developed extensions without requiring
> users to write code to perform the registration.
> One Proposal
> There are likely to be several implementation alternatives. Here's one.
> Create a new interface,
> org.apache.woden.wsdl20.extensions.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, org.apache.woden.extensionregistrars, contains a list of
> ExtensionRegistrar classes whose "registerExtensions" methods are called by
> org.apache.woden.WSDLFactory's constructor after the standard
> PopulatedExtensionRegistry has been created. Using the property achieves the
> effect of the composite sub-class without having to write it.
> A simple means of registering error message formats would be to modify
> org.apache.woden.internal.MessageFormatter to allow the registration of
> additional resource bundles. MessageFormatter's "formatMessage" method would
> 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 this implementation proposal is that a set of extensions
> could be packaged in a jar file containing:
> - the extension set's classes
> - the extension set's error message format resource bundle.
> - the ExtensionRegistrar implementation
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]