geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r164907 - /geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java
Date Tue, 26 Apr 2005 23:08:29 GMT
Author: djencks
Date: Tue Apr 26 16:08:29 2005
New Revision: 164907

URL: http://svn.apache.org/viewcvs?rev=164907&view=rev
Log:
don't leave holes for out parameters

Modified:
    geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java

Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java?rev=164907&r1=164906&r2=164907&view=diff
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java
(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/client/ServiceEndpointMethodInterceptor.java
Tue Apr 26 16:08:29 2005
@@ -85,7 +85,7 @@
         }
         Object response = null;
         List parameterDescs = operationInfo.getOperationDesc().getParameters();
-        Object[] unwrapped = extractFromHolders(objects, parameterDescs);
+        Object[] unwrapped = extractFromHolders(objects, parameterDescs, operationInfo.getOperationDesc().getNumInParams());
         try {
             response = call.invoke(unwrapped);
         } catch (RemoteException e) {
@@ -108,19 +108,20 @@
         }
     }
 
-    private Object[] extractFromHolders(Object[] objects, List parameterDescs) throws JavaUtils.HolderException
{
+    private Object[] extractFromHolders(Object[] objects, List parameterDescs, int inParameterCount)
throws JavaUtils.HolderException {
         if (objects.length != parameterDescs.size()) {
             throw new IllegalArgumentException("Mismatch parameter count: expected: " + parameterDescs.size()
+ ", actual: " + objects.length);
         }
-        Object[] unwrapped = new Object[objects.length];
+        Object[] unwrapped = new Object[inParameterCount];
+        int j = 0;
         for (int i = 0; objects != null && i < objects.length; i++) {
             Object parameter = objects[i];
             ParameterDesc parameterDesc = (ParameterDesc) parameterDescs.get(i);
 
             if (parameterDesc.getMode() == ParameterDesc.INOUT) {
-                unwrapped[i] = JavaUtils.getHolderValue((Holder) parameter);
+                unwrapped[j++] = JavaUtils.getHolderValue((Holder) parameter);
             } else if (parameterDesc.getMode() == ParameterDesc.IN) {
-                unwrapped[i] = parameter;
+                unwrapped[j++] = parameter;
             }
         }
         return unwrapped;



Mime
View raw message