Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 561B360B4 for ; Fri, 20 May 2011 16:15:32 +0000 (UTC) Received: (qmail 86880 invoked by uid 500); 20 May 2011 16:15:31 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 86747 invoked by uid 500); 20 May 2011 16:15:31 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 86739 invoked by uid 99); 20 May 2011 16:15:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 16:15:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 16:15:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 58C75D3192 for ; Fri, 20 May 2011 16:14:47 +0000 (UTC) Date: Fri, 20 May 2011 16:14:47 +0000 (UTC) From: "Artur Linhart (JIRA)" To: java-dev@axis.apache.org Message-ID: <1724889021.30902.1305908087360.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1881051123.30893.1305907848710.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (AXIS2-5051) wsdl2java Stub generation shoudl be optimized to allow better customization of exception mappings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-5051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Artur Linhart updated AXIS2-5051: --------------------------------- Description: The Stub generates the processing methods with the help of the internal variables for exception mappings //hashmaps to keep the fault mapping private java.util.HashMap faultExceptionNameMap = new java.util.HashMap(); private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap(); private java.util.HashMap faultMessageMap = new java.util.HashMap(); which are populate in private method populateFaults. All internal access to the internal mappings is done through the direct call of the methods of the given maps, like: faultExceptionNameMap.containsKey(faultElt.getQName()) it makes to the user of the generated classes impossible to define some own exception mappings without the change of the generated code, so after the regeneration it has to be again resynced, etc. - a lot of unnecessary work. Also the split of the data into three lists is not very systematic. Solution for this would be to define the methods, hiding the concrete implementation of the retrieving of the meppings and use them everywhere instead of calling the methods of faultExceptionNameMap, faultExceptionClassNameMap and faultMessageMap directly. They could be created similary to following proposal: protected boolean exceptionQNameRegistered(QName) protected String getFaultExceptionName(QName) protected String getFaultExceptionClassName(QName) protected String getFaultMessageName(QName) The default implementation could simply hide the same maps into the given maps, but everybody could redefine the methods in inherited stub class without the necessity to change the generated class and append some own exception, which could be also inherited from the generated one. This would be with a small amount of work a great improvement the possibility to use the generated stub classes without modifications. Also, today, because of the impossibility to redefine simply the exception mappings, nobody can see the fault messages by the faults thrown in client (see the issue AXIS2-5050). was: The Stub generates the processing methods with the help of the internal variables for exception mappings //hashmaps to keep the fault mapping private java.util.HashMap faultExceptionNameMap = new java.util.HashMap(); private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap(); private java.util.HashMap faultMessageMap = new java.util.HashMap(); which are populate in private method populateFaults. All internal access to the internal mappings is done through the direct call of the methods of the given maps, like: faultExceptionNameMap.containsKey(faultElt.getQName()) it makes to the user of the generated classes impossible to define some own exception mappings without the change of the generated code, so after the regeneration it has to be again resynced, etc. - a lot of unnecessary work. Also the split of the data into three lists is not very systematic. Solution for this would be to define the methods, hiding the concrete implementation of the retrieving of the meppings and use them everywhere. They could be created similary to following proposal: protected boolean exceptionQNameRegistered(QName) protected String getFaultExceptionName(QName) protected String getFaultExceptionClassName(QName) protected String getFaultMessageName(QName) The default implementation could simply hide the same maps into the given maps, but everybody could redefine the methods in inherited stub class without the necessity to change the generated class and append some own exception, which could be also inherited from the generated one. This would be a great improvement the possibility to use the generated stub classes without modifications. Also, today, because of the impossibility to redefine simply the exception mappings, nobody can see the fault messages by the faults thrown in client (see the issue AXIS2-5050). Remaining Estimate: 8h (was: 24h) Original Estimate: 8h (was: 24h) > wsdl2java Stub generation shoudl be optimized to allow better customization of exception mappings > ------------------------------------------------------------------------------------------------- > > Key: AXIS2-5051 > URL: https://issues.apache.org/jira/browse/AXIS2-5051 > Project: Axis2 > Issue Type: Improvement > Components: wsdl > Affects Versions: 1.4.1, 1.5.4 > Environment: java > Reporter: Artur Linhart > Labels: wsdl2java > Original Estimate: 8h > Remaining Estimate: 8h > > The Stub generates the processing methods with the help of the internal variables for exception mappings > //hashmaps to keep the fault mapping > private java.util.HashMap faultExceptionNameMap = new java.util.HashMap(); > private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap(); > private java.util.HashMap faultMessageMap = new java.util.HashMap(); > which are populate in private method populateFaults. > All internal access to the internal mappings is done through the direct call of the methods of the given maps, like: > faultExceptionNameMap.containsKey(faultElt.getQName()) > it makes to the user of the generated classes impossible to define some own exception mappings without the change of the generated code, so after the regeneration it has to be again resynced, etc. - a lot of unnecessary work. Also the split of the data into three lists is not very systematic. > Solution for this would be to define the methods, hiding the concrete implementation of the retrieving of the meppings and use them everywhere instead of calling the methods of faultExceptionNameMap, faultExceptionClassNameMap and faultMessageMap directly. They could be created similary to following proposal: > protected boolean exceptionQNameRegistered(QName) > protected String getFaultExceptionName(QName) > protected String getFaultExceptionClassName(QName) > protected String getFaultMessageName(QName) > The default implementation could simply hide the same maps into the given maps, but everybody could redefine the methods in inherited stub class without the necessity to change the generated class and append some own exception, which could be also inherited from the generated one. > This would be with a small amount of work a great improvement the possibility to use the generated stub classes without modifications. > Also, today, because of the impossibility to redefine simply the exception mappings, nobody can see the fault messages by the faults thrown in client (see the issue AXIS2-5050). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org