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/09/02 15:21:00 UTC
svn commit: r691236 - in
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl: ./
codegen/ codegen/emitter/ i18n/ util/
Author: amilas
Date: Tue Sep 2 06:20:56 2008
New Revision: 691236
URL: http://svn.apache.org/viewvc?rev=691236&view=rev
Log:
Added a parameter to override the absolute addresses
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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -42,7 +42,7 @@
System.out.println(CodegenMessages.getMessage("wsdl2code.arg"));
System.out.println(CodegenMessages.getMessage("wsdl2code.arg1"));
- for (int i = 2; i <= 46; i++) {
+ for (int i = 2; i <= 47; 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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -611,4 +611,14 @@
this.skeltonClassName = skeltonClassName;
}
+ private boolean overrideAbsoluteAddress;
+
+ public boolean isOverrideAbsoluteAddress() {
+ return overrideAbsoluteAddress;
+ }
+
+ public void setOverrideAbsoluteAddress(boolean overrideAbsoluteAddress) {
+ this.overrideAbsoluteAddress = overrideAbsoluteAddress;
+ }
+
}
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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -299,6 +299,10 @@
WSDL2JavaConstants.OVERRIDE_OPTION_LONG,
optionMap) != null);
+ config.setOverrideAbsoluteAddress(loadOption(WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION,
+ WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION_LONG,
+ optionMap) != null);
+
// loop through the map and find parameters having the extra prefix.
//put them in the property map
Iterator keyIterator = optionMap.keySet().iterator();
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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -1386,7 +1386,7 @@
axisService.setSchemaLocationsAdjusted(false);
//when generating the code we should copy all the schemas to
// resource folder.
- Map changedMap = axisService.populateSchemaMappings(true);
+ Map changedMap = axisService.populateSchemaMappings(this.codeGenConfiguration.isOverrideAbsoluteAddress());
// add these two attribute to use the user defined wsdl to use.
try {
@@ -1407,12 +1407,12 @@
// then use the changedMap got above to adjust the names.
Map schemaMappings = axisService.getSchemaMappingTable();
Iterator keys = schemaMappings.keySet().iterator();
+ String key = null;
while (keys.hasNext()) {
- Object key = keys.next();
- schemaWriter.writeSchema(
- (XmlSchema) schemaMappings.get(key),
- (String) key
- );
+ key = (String) keys.next();
+ if (!key.startsWith("http")){
+ schemaWriter.writeSchema((XmlSchema) schemaMappings.get(key), key);
+ }
}
//switch between the correct writer
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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -81,6 +81,7 @@
wsdl2code.arg44= -sin <interface-name> Skeleton interface name - used to specify a name for skeleton interface other than the default one
wsdl2code.arg45= -scn <class-name> Skeleton class name - used to specify a name for skeleton class other than the default one
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
################## 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=691236&r1=691235&r2=691236&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 Tue Sep 2 06:20:56 2008
@@ -63,6 +63,8 @@
WSDL2JavaConstants.OUTPUT_LOCATION_OPTION_LONG.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.OVERRIDE_OPTION.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.OVERRIDE_OPTION_LONG.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION.equalsIgnoreCase(optionType) ||
+ WSDL2JavaConstants.OVERRIDE_ABSOLUTE_ADDRESS_OPTION_LONG.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.PACKAGE_OPTION.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.PACKAGE_OPTION_LONG.equalsIgnoreCase(optionType) ||
WSDL2JavaConstants.PORT_NAME_OPTION.equalsIgnoreCase(optionType) ||