summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java b/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java
index 0c657756a0..09fc0a311b 100644
--- a/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java
+++ b/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java
@@ -231,6 +231,14 @@ public class OMElementWrapperHandler implements WrapperHandler<OMElement> {
private List<Object> getInvalidChildren(List<List<OMElement>> groupedElementList, List<ElementInfo> childElements) {
List<Object> retVal = new ArrayList<Object>();
+ // if this is an operation without arguments then it seems that
+ // the groupedElementList can have a list with an empty list in it while
+ // the child elements list is empty. This leads to an IndexOutOfBounds when
+ // trying to de-reference childElements. So check for this now
+ if (childElements.size() == 0){
+ return retVal;
+ }
+
// Since not all the ElementInfo(s) will be represented, (if some elements don't appear as children
// of the wrapper payload, we need to loop through the schema
for (int index=0; index < groupedElementList.size(); index++) {