You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2009/02/06 10:58:24 UTC
svn commit: r741498 - in
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl:
codegen/ codegen/emitter/ i18n/ util/
Author: amilas
Date: Fri Feb 6 09:58:24 2009
New Revision: 741498
URL: http://svn.apache.org/viewvc?rev=741498&view=rev
Log:
adding the uom option. will commit this to branch soon
Modified:
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/util/WSDL2JavaOptionsValidator.java
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=741498&r1=741497&r2=741498&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 Fri Feb 6 09:58:24 2009
@@ -631,13 +631,13 @@
this.exceptionBaseClassName = exceptionBaseClassName;
}
- private boolean isLowerCaseMethodName;
+ private boolean isUseOperationName;
- public boolean isLowerCaseMethodName() {
- return isLowerCaseMethodName;
+ public boolean isUseOperationName() {
+ return isUseOperationName;
}
- public void setLowerCaseMethodName(boolean lowerCaseMethodName) {
- isLowerCaseMethodName = lowerCaseMethodName;
+ public void setUseOperationName(boolean useOperationName) {
+ isUseOperationName = useOperationName;
}
}
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=741498&r1=741497&r2=741498&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 Fri Feb 6 09:58:24 2009
@@ -309,8 +309,8 @@
WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION_LONG,
optionMap) != null);
- config.setLowerCaseMethodName(loadOption(WSDL2JavaConstants.LOWER_CASE_METHOD_NAME,
- WSDL2JavaConstants.LOWER_CASE_METHOD_NAME_LONG, optionMap) != null);
+ config.setUseOperationName(loadOption(WSDL2JavaConstants.USE_OPERATION_NAME,
+ WSDL2JavaConstants.USE_OPERATION_NAME_LONG, optionMap) != null);
// loop through the map and find parameters having the extra prefix.
//put them in the property map
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=741498&r1=741497&r2=741498&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 Fri Feb 6 09:58:24 2009
@@ -1585,7 +1585,9 @@
addAttribute(doc, "name", localPart + mepToSuffixMap.get(mep), rootElement);
- if (this.codeGenConfiguration.isLowerCaseMethodName()) {
+ // here set the isLowerCaseMethodName variable to have the negative on useOperationName to
+ // make it easier to handle in Message receiver template.
+ if (!this.codeGenConfiguration.isUseOperationName()) {
addAttribute(doc, "isLowerCaseMethodName", "true", rootElement);
}
@@ -2258,10 +2260,10 @@
methodElement = doc.createElement("method");
String localPart = axisOperation.getName().getLocalPart();
- if (this.codeGenConfiguration.isLowerCaseMethodName()) {
- addAttribute(doc, "name", JavaUtils.xmlNameToJavaIdentifier(localPart), methodElement);
- } else {
+ if (this.codeGenConfiguration.isUseOperationName()) {
addAttribute(doc, "name", JavaUtils.xmlNameToJava(localPart), methodElement);
+ } else {
+ addAttribute(doc, "name", JavaUtils.xmlNameToJavaIdentifier(localPart), methodElement);
}
addAttribute(doc, "originalName", localPart, methodElement);
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=741498&r1=741497&r2=741498&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 Fri Feb 6 09:58:24 2009
@@ -83,7 +83,7 @@
wsdl2code.arg46= \t\t\t -EbindingFileName <path> (for jaxbri) - specify the file path for the episode file
wsdl2code.arg47= -oaa <override-absolute-address> -change the absolute http addresses to local file addresses generated by wsdl2java tool
wsdl2code.arg48= -ebc <exception-base-class> -generated Exceptions are inherited from this exception rather than the java.lang.Exception class
-wsdl2code.arg49= -lcmn <lower-case-method-name> -normally generated method names for operation is same as operation name. This option make first letter lower case
+wsdl2code.arg49= -uon <use-operation-name> -by default the first letter of the generated method name changeed to lowercase. This option stops that and make it same as operation name
################## 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/util/WSDL2JavaOptionsValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/util/WSDL2JavaOptionsValidator.java?rev=741498&r1=741497&r2=741498&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 Fri Feb 6 09:58:24 2009
@@ -102,8 +102,8 @@
WSDL2JavaConstants.SKELTON_INTERFACE_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
- WSDL2JavaConstants.LOWER_CASE_METHOD_NAME.equalsIgnoreCase(optionType) ||
- WSDL2JavaConstants.LOWER_CASE_METHOD_NAME_LONG.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.USE_OPERATION_NAME.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.USE_OPERATION_NAME_LONG.equalsIgnoreCase(optionType) ||
XMLBeansExtension.XSDCONFIG_OPTION.equalsIgnoreCase(optionType) ||
XMLBeansExtension.XSDCONFIG_OPTION_LONG.equalsIgnoreCase(optionType)
);