svn commit: r1158146 - in /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema: ExtensionUtility.java SchemaCompiler.java

2011-08-16 Thread amilas
Author: amilas
Date: Tue Aug 16 08:21:32 2011
New Revision: 1158146

URL: http://svn.apache.org/viewvc?rev=1158146&view=rev
Log:
replace the existing schemas with the processed ones. for -uw option to work 
some metadata is required

Modified:

axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java

axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java

Modified: 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1158146&r1=1158145&r2=1158146&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
 Tue Aug 16 08:21:32 2011
@@ -71,6 +71,7 @@ public class ExtensionUtility {
 // add all the schemas to the list
 for (AxisService service : configuration.getAxisServices()) {
 schemaList.addAll(service.getSchema());
+
 }
 
 //hashmap that keeps the targetnamespace and the xmlSchema object
@@ -146,6 +147,28 @@ public class ExtensionUtility {
 
 }
 
+
+//replace the Axis2 schemas with the processed ones.
+//otherwise it gives some problems if we try to code generate with 
multiple
+//services with the -uw option.
+//inorder to work for -uw option there must be some metadata with the 
schema list
+
+Map loadedSchemaMap = 
schemaCompiler.getLoadedSchemaMap();
+for (AxisService service : configuration.getAxisServices()) {
+List serviceSchemaList = service.getSchema();
+List schemaListToAdd = new ArrayList();
+for (XmlSchema xmlSchema : serviceSchemaList){
+if 
(loadedSchemaMap.containsKey(xmlSchema.getTargetNamespace())){
+
schemaListToAdd.add(loadedSchemaMap.get(xmlSchema.getTargetNamespace()));
+} else {
+schemaListToAdd.add(xmlSchema);
+}
+}
+service.releaseSchemaList();
+service.addSchema(schemaListToAdd);
+}
+
+
 //process the unwrapped parameters
 if (!configuration.isParametersWrapped()) {
 //figure out the unwrapped operations

Modified: 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1158146&r1=1158145&r2=1158146&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
 Tue Aug 16 08:21:32 2011
@@ -2809,4 +2809,8 @@ public class SchemaCompiler {
 }
return isExists;
 }
+
+public Map getLoadedSchemaMap(){
+return this.loadedSchemaMap;
+}
 }




svn commit: r1158386 - /axis/axis2/java/core/branches/xmlschema2/

2011-08-16 Thread veithen
Author: veithen
Date: Tue Aug 16 17:23:58 2011
New Revision: 1158386

URL: http://svn.apache.org/viewvc?rev=1158386&view=rev
Log:
Created a branch to prepare the migration to XmlSchema 2.0.

Added:
axis/axis2/java/core/branches/xmlschema2/
  - copied from r1158385, axis/axis2/java/core/trunk/



svn commit: r1158417 - in /axis/axis2/java/core/branches/xmlschema2/modules: adb-codegen/pom.xml fastinfoset/pom.xml java2wsdl/pom.xml kernel/pom.xml parent/pom.xml tool/axis2-ant-plugin/pom.xml tool/

2011-08-16 Thread veithen
Author: veithen
Date: Tue Aug 16 18:43:37 2011
New Revision: 1158417

URL: http://svn.apache.org/viewvc?rev=1158417&view=rev
Log:
Modified the POMs to refer to XmlSchema 2.0.

Modified:
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/pom.xml
axis/axis2/java/core/branches/xmlschema2/modules/fastinfoset/pom.xml
axis/axis2/java/core/branches/xmlschema2/modules/java2wsdl/pom.xml
axis/axis2/java/core/branches/xmlschema2/modules/kernel/pom.xml
axis/axis2/java/core/branches/xmlschema2/modules/parent/pom.xml

axis/axis2/java/core/branches/xmlschema2/modules/tool/axis2-ant-plugin/pom.xml

axis/axis2/java/core/branches/xmlschema2/modules/tool/axis2-idea-plugin/pom.xml

Modified: axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/pom.xml 
(original)
+++ axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/pom.xml Tue 
Aug 16 18:43:37 2011
@@ -47,8 +47,8 @@
 ${project.version}
 
 
-org.apache.ws.commons.schema
-XmlSchema
+org.apache.ws.xmlschema
+xmlschema-core
 
 
 commons-cli

Modified: axis/axis2/java/core/branches/xmlschema2/modules/fastinfoset/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/fastinfoset/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- axis/axis2/java/core/branches/xmlschema2/modules/fastinfoset/pom.xml 
(original)
+++ axis/axis2/java/core/branches/xmlschema2/modules/fastinfoset/pom.xml Tue 
Aug 16 18:43:37 2011
@@ -62,8 +62,8 @@
 commons-fileupload
 
 
-org.apache.ws.commons.schema
-XmlSchema
+org.apache.ws.xmlschema
+xmlschema-core
 
 
 org.apache.axis2

Modified: axis/axis2/java/core/branches/xmlschema2/modules/java2wsdl/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/java2wsdl/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- axis/axis2/java/core/branches/xmlschema2/modules/java2wsdl/pom.xml 
(original)
+++ axis/axis2/java/core/branches/xmlschema2/modules/java2wsdl/pom.xml Tue Aug 
16 18:43:37 2011
@@ -58,8 +58,8 @@
 
 
 
-org.apache.ws.commons.schema
-XmlSchema
+org.apache.ws.xmlschema
+xmlschema-core
 
 
 org.apache.geronimo.specs

Modified: axis/axis2/java/core/branches/xmlschema2/modules/kernel/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/kernel/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- axis/axis2/java/core/branches/xmlschema2/modules/kernel/pom.xml (original)
+++ axis/axis2/java/core/branches/xmlschema2/modules/kernel/pom.xml Tue Aug 16 
18:43:37 2011
@@ -65,8 +65,8 @@
 wsdl4j
 
 
-org.apache.ws.commons.schema
-XmlSchema
+org.apache.ws.xmlschema
+xmlschema-core
 
 
 org.apache.neethi

Modified: axis/axis2/java/core/branches/xmlschema2/modules/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/parent/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- axis/axis2/java/core/branches/xmlschema2/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/branches/xmlschema2/modules/parent/pom.xml Tue Aug 16 
18:43:37 2011
@@ -70,7 +70,7 @@
 1.2.13-SNAPSHOT
 3.0.2-SNAPSHOT
 1.0-SNAPSHOT
-1.4.8-SNAPSHOT
+2.0.1-SNAPSHOT
 

 1.7.0
@@ -610,8 +610,8 @@
 ${axiom.version}
 
 
-org.apache.ws.commons.schema
-XmlSchema
+org.apache.ws.xmlschema
+xmlschema-core
 ${xmlschema.version}
 
 

Modified: 
axis/axis2/java/core/branches/xmlschema2/modules/tool/axis2-ant-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/tool/axis2-ant-plugin/pom.xml?rev=1158417&r1=1158416&r2=1158417&view=diff
==
--- 
axis/axis2/java/core/branches/xmlschema2/modules/tool/axis2-ant-plugin/pom.xml 
(original)
+++ 
axis/axis2/java/core/branches/xmlsche