Return-Path: Delivered-To: apmail-ws-woden-dev-archive@www.apache.org Received: (qmail 2517 invoked from network); 19 Jun 2007 14:37:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 14:37:49 -0000 Received: (qmail 62582 invoked by uid 500); 19 Jun 2007 14:37:52 -0000 Delivered-To: apmail-ws-woden-dev-archive@ws.apache.org Received: (qmail 62448 invoked by uid 500); 19 Jun 2007 14:37:51 -0000 Mailing-List: contact woden-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: woden-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list woden-dev@ws.apache.org Received: (qmail 62416 invoked by uid 99); 19 Jun 2007 14:37:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 07:37:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 07:37:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EEC88714201 for ; Tue, 19 Jun 2007 07:37:26 -0700 (PDT) Message-ID: <1801362.1182263846974.JavaMail.jira@brutus> Date: Tue, 19 Jun 2007 07:37:26 -0700 (PDT) From: "John Kaputin (JIRA)" To: woden-dev@ws.apache.org Subject: [jira] Updated: (WODEN-163) Provide a mechanism for registering extensions and their error message formats independently of the API. In-Reply-To: <21798578.1178801895964.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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: woden-dev-unsubscribe@ws.apache.org For additional commands, e-mail: woden-dev-help@ws.apache.org