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 2008/03/24 12:11:17 UTC
svn commit: r640377 - in
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl: ./
codegen/ codegen/emitter/ i18n/ util/
Author: amilas
Date: Mon Mar 24 04:11:16 2008
New Revision: 640377
URL: http://svn.apache.org/viewvc?rev=640377&view=rev
Log:
added two options to specify a name to skelton interface and skelton
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/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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -40,7 +40,7 @@
System.out.println(CodegenMessages.getMessage("wsdl2code.arg"));
System.out.println(CodegenMessages.getMessage("wsdl2code.arg1"));
- for (int i = 2; i <= 43; i++) {
+ for (int i = 2; i <= 45; i++) {
System.out.println(" " + CodegenMessages.getMessage("wsdl2code.arg" + i));
}
System.exit(0);
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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -592,4 +592,23 @@
this.excludeProperties = excludeProperties;
}
+ private String skeltonInterfaceName;
+ private String skeltonClassName;
+
+ public String getSkeltonInterfaceName() {
+ return skeltonInterfaceName;
+ }
+
+ public void setSkeltonInterfaceName(String skeltonInterfaceName) {
+ this.skeltonInterfaceName = skeltonInterfaceName;
+ }
+
+ public String getSkeltonClassName() {
+ return skeltonClassName;
+ }
+
+ public void setSkeltonClassName(String skeltonClassName) {
+ this.skeltonClassName = skeltonClassName;
+ }
+
}
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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -278,6 +278,18 @@
config.setExcludeProperties(commandLineOption.getOptionValue());
}
+ commandLineOption = loadOption(WSDL2JavaConstants.SKELTON_INTERFACE_NAME_OPTION,
+ WSDL2JavaConstants.SKELTON_INTERFACE_NAME_OPTION_LONG, optionMap);
+ if (commandLineOption != null){
+ config.setSkeltonInterfaceName(commandLineOption.getOptionValue());
+ }
+
+ commandLineOption = loadOption(WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION,
+ WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION_LONG, optionMap);
+ if (commandLineOption != null){
+ config.setSkeltonClassName(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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -1540,13 +1540,27 @@
rootElement);
}
} else {
- addAttribute(doc, "skeletonname", localPart + SKELETON_CLASS_SUFFIX, rootElement);
+ if (this.codeGenConfiguration.getSkeltonClassName() != null){
+ addAttribute(doc, "skeletonname", this.codeGenConfiguration.getSkeltonClassName(), rootElement);
+ } else {
+ addAttribute(doc, "skeletonname", localPart + SKELETON_CLASS_SUFFIX, rootElement);
+ }
if (isServerSideInterface) {
- addAttribute(doc, "skeletonInterfaceName", localPart + SKELETON_INTERFACE_SUFFIX,
+ if (this.codeGenConfiguration.getSkeltonInterfaceName() != null){
+ addAttribute(doc, "skeletonInterfaceName", this.codeGenConfiguration.getSkeltonInterfaceName(),
rootElement);
+ } else {
+ addAttribute(doc, "skeletonInterfaceName", localPart + SKELETON_INTERFACE_SUFFIX,
+ rootElement);
+ }
} else {
- addAttribute(doc, "skeletonInterfaceName", localPart + SKELETON_CLASS_SUFFIX,
+ if (this.codeGenConfiguration.getSkeltonClassName() != null){
+ addAttribute(doc, "skeletonInterfaceName", this.codeGenConfiguration.getSkeltonClassName(),
rootElement);
+ } else {
+ addAttribute(doc, "skeletonInterfaceName", localPart + SKELETON_CLASS_SUFFIX,
+ rootElement);
+ }
}
}
@@ -1971,7 +1985,7 @@
return rootElement;
}
- protected void writeSkeleton() throws Exception {
+ protected void writeSkeleton() throws Exception {
Document skeletonModel =
createDOMDocumentForSkeleton(codeGenConfiguration.isServerSideInterface());
debugLogDocument("Document for skeleton:", skeletonModel);
@@ -2020,6 +2034,8 @@
makeJavaClassName(axisService.getBindingName()) +
SKELETON_CLASS_SUFFIX_BACK,
rootElement);
+ } else if (this.codeGenConfiguration.getSkeltonClassName() != null){
+ addAttribute(doc, "name", this.codeGenConfiguration.getSkeltonClassName(), rootElement);
} else {
addAttribute(doc, "name", serviceName + SKELETON_CLASS_SUFFIX, rootElement);
}
@@ -2034,6 +2050,9 @@
addAttribute(doc, "skeletonInterfaceName", makeJavaClassName(
axisService.getEndpointName()) + SKELETON_INTERFACE_SUFFIX_BACK,
rootElement);
+ } else if (this.codeGenConfiguration.getSkeltonInterfaceName() != null){
+ addAttribute(doc, "skeletonInterfaceName", this.codeGenConfiguration.getSkeltonInterfaceName(),
+ rootElement);
} else {
addAttribute(doc, "skeletonInterfaceName", serviceName + SKELETON_INTERFACE_SUFFIX,
rootElement);
@@ -2069,6 +2088,8 @@
if (this.codeGenConfiguration.isBackwordCompatibilityMode()) {
addAttribute(doc, "name", makeJavaClassName(axisService.getEndpointName()) +
SKELETON_INTERFACE_SUFFIX_BACK, rootElement);
+ } else if (this.codeGenConfiguration.getSkeltonInterfaceName() != null){
+ addAttribute(doc, "name", this.codeGenConfiguration.getSkeltonInterfaceName() , rootElement);
} else {
addAttribute(doc, "name", serviceName + SKELETON_INTERFACE_SUFFIX, rootElement);
}
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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -115,6 +115,8 @@
wsdl2code.arg41= --http-proxy-host Proxy host address if you are behind a firewall
wsdl2code.arg42= --http-proxy-port Proxy prot address if you are behind a firewall
wsdl2code.arg43= -ep Exclude packages - these packages are deleted after codegeneration
+wsdl2code.arg44= -sin Skelton interface name - used to specify a name for skelton interface other than the default one
+wsdl2code.arg45= -scn Skelton class name - used to specify a name for skelton class other than the default one
################## 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=640377&r1=640376&r2=640377&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 Mar 24 04:11:16 2008
@@ -94,6 +94,10 @@
WSDL2JavaConstants.HTTP_PROXY_PORT_OPTION_LONG.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.EXCLUDE_PAKAGES_OPTION.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.EXCLUDE_PAKAGES_OPTION_LONG.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.SKELTON_INTERFACE_NAME_OPTION.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.SKELTON_INTERFACE_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.SKELTON_CLASS_NAME_OPTION_LONG.equalsIgnoreCase(optionType) ||
XMLBeansExtension.XSDCONFIG_OPTION.equalsIgnoreCase(optionType) ||
XMLBeansExtension.XSDCONFIG_OPTION_LONG.equalsIgnoreCase(optionType)
);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org