geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r219764 - /geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
Date Tue, 19 Jul 2005 19:45:08 GMT
Author: djencks
Date: Tue Jul 19 12:45:08 2005
New Revision: 219764

URL: http://svn.apache.org/viewcvs?rev=219764&view=rev
Log:
Port GERONIMO-768 to M4. Handle wrapped doc/lit with no parameters/void return type

Modified:
    geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java

Modified: geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java?rev=219764&r1=219763&r2=219764&view=diff
==============================================================================
--- geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
(original)
+++ geronimo/branches/v1_0_M4-QA/modules/axis-builder/src/java/org/apache/geronimo/axis/builder/HeavyweightOperationDescBuilder.java
Tue Jul 19 12:45:08 2005
@@ -229,12 +229,21 @@
 
             // schemaType should be complex using xsd:sequence compositor
             SchemaParticle parametersType = operationType.getContentModel();
-            if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
-                expectedInParams.add(parametersType.getName().getLocalPart());
-            } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
-                SchemaParticle[] parameters = parametersType.getParticleChildren();
-                for (int i = 0; i < parameters.length; i++) {
-                    expectedInParams.add(parameters[i].getName().getLocalPart());
+            //parametersType can be null if the element has empty content such as
+//            <element name="getMarketSummary">
+//             <complexType>
+//              <sequence/>
+//             </complexType>
+//            </element>
+
+            if (parametersType != null) {
+                if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+                    expectedInParams.add(parametersType.getName().getLocalPart());
+                } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+                    SchemaParticle[] parameters = parametersType.getParticleChildren();
+                    for (int i = 0; i < parameters.length; i++) {
+                        expectedInParams.add(parameters[i].getName().getLocalPart());
+                    }
                 }
             }
             if (!inParamNames.equals(expectedInParams)) {
@@ -297,12 +306,15 @@
 
             // schemaType should be complex using xsd:sequence compositor
             SchemaParticle parametersType = operationType.getContentModel();
-            if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
-                expectedOutParams.add(parametersType.getName().getLocalPart());
-            } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
-                SchemaParticle[] parameters = parametersType.getParticleChildren();
-                for (int i = 0; i < parameters.length; i++) {
-                    expectedOutParams.add(parameters[i].getName().getLocalPart());
+            //again, no output can give null parametersType
+            if (parametersType != null) {
+                if (SchemaParticle.ELEMENT == parametersType.getParticleType()) {
+                    expectedOutParams.add(parametersType.getName().getLocalPart());
+                } else if (SchemaParticle.SEQUENCE == parametersType.getParticleType()) {
+                    SchemaParticle[] parameters = parametersType.getParticleChildren();
+                    for (int i = 0; i < parameters.length; i++) {
+                        expectedOutParams.add(parameters[i].getName().getLocalPart());
+                    }
                 }
             }
             if (!outParamNames.equals(expectedOutParams)) {



Mime
View raw message