svn commit: r1158848 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 17:43:57 2011
New Revision: 1158848

URL: http://svn.apache.org/viewvc?rev=1158848&view=rev
Log:
Fixed some code in DefaultSchemaGenerator that was adding a complex type to the 
wrong collection, namely as an element. Not sure if this bug had any visible 
consequences, but it was discovered while preparing to migrate to XmlSchema 2.0.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1158848&r1=1158847&r2=1158848&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 Wed Aug 17 17:43:57 2011
@@ -548,7 +548,7 @@ public class DefaultSchemaGenerator impl
 XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
 complexType.setName("Exception");
 xmlSchema.getItems().add(complexType);
-xmlSchema.getElements().add(elementName, complexType);
+xmlSchema.getSchemaTypes().add(elementName, complexType);
 typeTable.addComplexSchema(Exception.class.getName(), elementName);
 QName schemaTypeName = new 
QName(Java2WSDLConstants.URI_2001_SCHEMA_XSD, "string");
 addContentToMethodSchemaType(sequence, schemaTypeName, "Message", 
false);




svn commit: r1158850 - in /axis/axis2/java/core/branches/xmlschema2: ./ modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 17:53:41 2011
New Revision: 1158850

URL: http://svn.apache.org/viewvc?rev=1158850&view=rev
Log:
Reintegrated changes from trunk.

Modified:
axis/axis2/java/core/branches/xmlschema2/   (props changed)

axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Propchange: axis/axis2/java/core/branches/xmlschema2/
--
svn:mergeinfo = /axis/axis2/java/core/trunk:1158386-1158848

Modified: 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1158850&r1=1158849&r2=1158850&view=diff
==
--- 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 (original)
+++ 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 Wed Aug 17 17:53:41 2011
@@ -548,7 +548,7 @@ public class DefaultSchemaGenerator impl
 XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
 complexType.setName("Exception");
 xmlSchema.getItems().add(complexType);
-xmlSchema.getElements().add(elementName, complexType);
+xmlSchema.getSchemaTypes().add(elementName, complexType);
 typeTable.addComplexSchema(Exception.class.getName(), elementName);
 QName schemaTypeName = new 
QName(Java2WSDLConstants.URI_2001_SCHEMA_XSD, "string");
 addContentToMethodSchemaType(sequence, schemaTypeName, "Message", 
false);




svn commit: r1158870 - in /axis/axis2/java/core/trunk/modules/kernel: src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java test/org/apache/axis2/description/java2wsdl/DefaultSchemaGe

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 19:04:52 2011
New Revision: 1158870

URL: http://svn.apache.org/viewvc?rev=1158870&view=rev
Log:
Don't create an XmlSchemaElement if we don't add it to the schema.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1158870&r1=1158869&r2=1158870&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 Wed Aug 17 19:04:52 2011
@@ -582,10 +582,7 @@ public class DefaultSchemaGenerator impl
 XmlSchemaComplexContentExtension complexExtension =
 new XmlSchemaComplexContentExtension();
 
-XmlSchemaElement eltOuter = new XmlSchemaElement();
 schemaTypeName = new QName(targetNameSpace, simpleName, 
targetNamespacePrefix);
-eltOuter.setName(simpleName);
-eltOuter.setQName(schemaTypeName);
 
 Class sup = javaType.getSuperclass();
 if ((sup != null)
@@ -641,19 +638,15 @@ public class DefaultSchemaGenerator impl
 complexType.setAbstract(true);
 }
 
-//xmlSchema.getItems().add(eltOuter);
-xmlSchema.getElements().add(schemaTypeName, eltOuter);
-eltOuter.setSchemaTypeName(complexType.getQName());
-
 xmlSchema.getItems().add(complexType);
 xmlSchema.getSchemaTypes().add(schemaTypeName, complexType);
 
 // adding this type to the table
-typeTable.addComplexSchema(name, eltOuter.getQName());
+typeTable.addComplexSchema(name, schemaTypeName);
 // adding this type's package to the table, to support inheritance.
-
typeTable.addComplexSchema(getQualifiedName(javaType.getPackage()), 
eltOuter.getQName());
+
typeTable.addComplexSchema(getQualifiedName(javaType.getPackage()), 
schemaTypeName);
 
-typeTable.addClassNameForQName(eltOuter.getQName(), name);
+typeTable.addClassNameForQName(schemaTypeName, name);
 
 BeanExcludeInfo beanExcludeInfo = null;
 if (service.getExcludeInfo() != null) {

Modified: 
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java?rev=1158870&r1=1158869&r2=1158870&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java
 Wed Aug 17 19:04:52 2011
@@ -51,7 +51,7 @@ public class DefaultSchemaGeneratorTest 
 XmlSchema schema = schemaColl.iterator().next();
 
 boolean foundExtra = false;
-Iterator names = schema.getElements().getNames();
+Iterator names = schema.getSchemaTypes().getNames();
 while (names.hasNext()) {
 QName name = (QName) names.next();
 if (name.getLocalPart().equals("ExtraClass"))




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

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 19:11:46 2011
New Revision: 1158872

URL: http://svn.apache.org/viewvc?rev=1158872&view=rev
Log:
Reverted r1158146 which was causing a build failure.

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=1158872&r1=1158871&r2=1158872&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
 Wed Aug 17 19:11:46 2011
@@ -71,7 +71,6 @@ 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
@@ -147,28 +146,6 @@ 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=1158872&r1=1158871&r2=1158872&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
 Wed Aug 17 19:11:46 2011
@@ -2809,8 +2809,4 @@ public class SchemaCompiler {
 }
return isExists;
 }
-
-public Map getLoadedSchemaMap(){
-return this.loadedSchemaMap;
-}
 }




svn commit: r1158876 - in /axis/axis2/java/core/branches/xmlschema2: ./ modules/adb-codegen/src/org/apache/axis2/schema/ modules/kernel/src/org/apache/axis2/description/java2wsdl/ modules/kernel/test/

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 19:15:19 2011
New Revision: 1158876

URL: http://svn.apache.org/viewvc?rev=1158876&view=rev
Log:
Reintegrated changes from trunk.

Modified:
axis/axis2/java/core/branches/xmlschema2/   (props changed)

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

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

axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

axis/axis2/java/core/branches/xmlschema2/modules/kernel/test/org/apache/axis2/description/java2wsdl/DefaultSchemaGeneratorTest.java

Propchange: axis/axis2/java/core/branches/xmlschema2/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 17 19:15:19 2011
@@ -1 +1 @@
-/axis/axis2/java/core/trunk:1158386-1158848
+/axis/axis2/java/core/trunk:1158386-1158874

Modified: 
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java?rev=1158876&r1=1158875&r2=1158876&view=diff
==
--- 
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
 (original)
+++ 
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java
 Wed Aug 17 19:15:19 2011
@@ -71,7 +71,6 @@ 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
@@ -147,28 +146,6 @@ 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/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java?rev=1158876&r1=1158875&r2=1158876&view=diff
==
--- 
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
 (original)
+++ 
axis/axis2/java/core/branches/xmlschema2/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java
 Wed Aug 17 19:15:19 2011
@@ -2809,8 +2809,4 @@ public class SchemaCompiler {
 }
return isExists;
 }
-
-public Map getLoadedSchemaMap(){
-return this.loadedSchemaMap;
-}
 }

Modified: 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1158876&r1=1158875&r2=1158876&view=diff
==
--- 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 (original)
+++ 
axis/axis2/java/core/branches/xmlschema2/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 Wed Aug 17 19:15:19 2011
@@ -582,10 +582,7 @@ public class DefaultSchemaGenerator impl
 XmlSchemaComplexContentExtension complexExtension =
 new XmlSchemaComplexContentExtension();
 
-  

svn commit: r1158883 - in /axis/axis2/java/core/branches/1_6: ./ modules/distribution/ modules/kernel/src/org/apache/axis2/description/ modules/kernel/test-resources/wsdl/ modules/kernel/test/org/apac

2011-08-17 Thread veithen
Author: veithen
Date: Wed Aug 17 19:55:54 2011
New Revision: 1158883

URL: http://svn.apache.org/viewvc?rev=1158883&view=rev
Log:
AXIS2-4533 / AXIS2-5034: Merged r1157211 and r1157265 to the 1.6 branch.

Added:

axis/axis2/java/core/branches/1_6/modules/kernel/test-resources/wsdl/faults.wsdl
  - copied unchanged from r1157211, 
axis/axis2/java/core/trunk/modules/kernel/test-resources/wsdl/faults.wsdl

axis/axis2/java/core/branches/1_6/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
  - copied unchanged from r1157211, 
axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java
Modified:
axis/axis2/java/core/branches/1_6/   (props changed)
axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml

axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/client/src/example/BankClient.java

axis/axis2/java/core/branches/1_6/modules/samples/faulthandling/service/src/example/BankServiceSkeleton.java

Propchange: axis/axis2/java/core/branches/1_6/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 17 19:55:54 2011
@@ -1 +1 @@
-/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1156305,1156382,1157373,1157415,1157424,1157501,1157517,1157522,1157535
+/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1156305,1156382,1157211,1157265,1157373,1157415,1157424,1157501,1157517,1157522,1157535

Modified: axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml?rev=1158883&r1=1158882&r2=1158883&view=diff
==
--- axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml (original)
+++ axis/axis2/java/core/branches/1_6/modules/distribution/pom.xml Wed Aug 17 
19:55:54 2011
@@ -352,6 +352,9 @@
 
 
 
+
+
+
 
 
 

Modified: 
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=1158883&r1=1158882&r2=1158883&view=diff
==
--- 
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
 (original)
+++ 
axis/axis2/java/core/branches/1_6/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
 Wed Aug 17 19:55:54 2011
@@ -115,6 +115,15 @@ public class WSDL11ToAxisServiceBuilder 
 public static final int COMPONENT_MESSAGE = 2;
 public static final int COMPONENT_BINDING = 3;
 
+/**
+ * Parameter used on {@link AxisMessage} objects to track the value of the 
name
+ * attribute of the wsdl:fault. Note that this is more like a 
workaround. The problem
+ * is that {@link AxisMessage} stores the faults as a simple list. A 
better fix would be to
+ * replace that by a map with the fault name as key, similar to what 
WSDL4J does (see
+ * {@link Operation#getFaults()}).
+ */
+private static final String FAULT_NAME = "faultName";
+
 protected static final Log log = LogFactory
 .getLog(WSDL11ToAxisServiceBuil