Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 82487 invoked from network); 8 Sep 2008 07:28:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2008 07:28:38 -0000 Received: (qmail 63844 invoked by uid 500); 8 Sep 2008 07:28:36 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 63615 invoked by uid 500); 8 Sep 2008 07:28:35 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 63606 invoked by uid 500); 8 Sep 2008 07:28:35 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 63603 invoked by uid 99); 8 Sep 2008 07:28:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 00:28:35 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 07:27:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 650CE238889B; Mon, 8 Sep 2008 00:27:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r693005 - in /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl: ./ codegen/ codegen/emitter/ i18n/ template/java/ util/ Date: Mon, 08 Sep 2008 07:27:46 -0000 To: axis2-cvs@ws.apache.org From: amilas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080908072747.650CE238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: amilas Date: Mon Sep 8 00:27:44 2008 New Revision: 693005 URL: http://svn.apache.org/viewvc?rev=693005&view=rev Log: Added an option to set the exception base class name instead of java.lang.Exception Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/WSDL2Code.java Mon Sep 8 00:27:44 2008 @@ -42,7 +42,7 @@ System.out.println(CodegenMessages.getMessage("wsdl2code.arg")); System.out.println(CodegenMessages.getMessage("wsdl2code.arg1")); - for (int i = 2; i <= 47; i++) { + for (int i = 2; i <= 48; i++) { System.out.println(" " + CodegenMessages.getMessage("wsdl2code.arg" + i)); } } Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java Mon Sep 8 00:27:44 2008 @@ -621,4 +621,14 @@ this.overrideAbsoluteAddress = overrideAbsoluteAddress; } + private String exceptionBaseClassName; + + public String getExceptionBaseClassName() { + return exceptionBaseClassName; + } + + public void setExceptionBaseClassName(String exceptionBaseClassName) { + this.exceptionBaseClassName = exceptionBaseClassName; + } + } Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodegenConfigLoader.java Mon Sep 8 00:27:44 2008 @@ -290,6 +290,12 @@ config.setSkeltonClassName(commandLineOption.getOptionValue()); } + commandLineOption = loadOption(WSDL2JavaConstants.EXCEPTION_BASE_CLASS_OPTION, + WSDL2JavaConstants.EXCEPTION_BASE_CLASS_OPTION_LONG, optionMap); + if (commandLineOption != null){ + config.setExceptionBaseClassName(commandLineOption.getOptionValue()); + } + // setting the overrid and all ports options config.setAllPorts(loadOption(WSDL2JavaConstants.All_PORTS_OPTION, WSDL2JavaConstants.All_PORTS_OPTION_LONG, Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java Mon Sep 8 00:27:44 2008 @@ -1051,6 +1051,14 @@ (String) faultClassNameMap.get(key), faultElement); + //added the base exception class name + if (this.codeGenConfiguration.getExceptionBaseClassName() != null) { + addAttribute(doc, "exceptionBaseClass", + this.codeGenConfiguration.getExceptionBaseClassName(), faultElement); + } else { + addAttribute(doc, "exceptionBaseClass", Exception.class.getName(), faultElement); + } + //the type represents the type that will be wrapped by this //name String typeMapping = Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/i18n/resource.properties Mon Sep 8 00:27:44 2008 @@ -82,6 +82,7 @@ wsdl2code.arg45= -scn Skeleton class name - used to specify a name for skeleton class other than the default one wsdl2code.arg46= \t\t\t -EbindingFileName (for jaxbri) - specify the file path for the episode file wsdl2code.arg47= -oaa -change the absolute http addresses to local file addresses generated by wsdl2java tool +wsdl2code.arg48= -ebc -generated Exceptions are inherited from this exception rather than the java.lang.Exception class ################## prop file loader ################################# propfileload.frameworkMismatch=Number of frameworks and extension names do not match! Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/ExceptionTemplate.xsl Mon Sep 8 00:27:44 2008 @@ -29,7 +29,7 @@ package ; -public class extends java.lang.Exception{ +public class extends { private faultMessage; Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java?rev=693005&r1=693004&r2=693005&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java (original) +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java Mon Sep 8 00:27:44 2008 @@ -63,6 +63,8 @@ WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG.equalsIgnoreCase(optionType) || WSDL2JavaConstants.OVERRIDE_OPTION.equalsIgnoreCase(optionType) || WSDL2JavaConstants.OVERRIDE_OPTION_LONG.equalsIgnoreCase(optionType) || + WSDL2JavaConstants.EXCEPTION_BASE_CLASS_OPTION.equalsIgnoreCase(optionType) || + WSDL2JavaConstants.EXCEPTION_BASE_CLASS_OPTION_LONG.equalsIgnoreCase(optionType) || WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION.equalsIgnoreCase(optionType) || WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION_LONG.equalsIgnoreCase(optionType) || WSDL2JavaConstants.PACKAGE_OPTION.equalsIgnoreCase(optionType) ||