jmsnell     2003/02/27 13:12:11

  Modified:    java/src/org/apache/axis/message RPCElement.java
  Log:
  FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16519
  
  Added checks
  
  1. If we get an array when we're not expecting it, 
     no match unless we're expecting a generic Object
  
     if (!sigType.isArray() && value.getClass().isArray() &&
      !sigType.equals(Object.class)) {
          match = false;  
     }
  
  2. If we're expecting an array and don't get one and we're not using a LITERAL 
style, no match.  If we're using LITERAL, fall through and see if we get an 
appropriate match later.
  
     if (operation.getUse() == Use.ENCODED &&
         sigType.isArray() &&
         !value.getClass().isArray()) {
           match = false;
     } 
  
  
  Revision  Changes    Path
  1.82      +12 -1     xml-axis/java/src/org/apache/axis/message/RPCElement.java
  
  Index: RPCElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCElement.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- RPCElement.java   16 Jan 2003 23:47:28 -0000      1.81
  +++ RPCElement.java   27 Feb 2003 21:12:10 -0000      1.82
  @@ -249,7 +249,18 @@
                                   // Get the type in the signature (java type or its 
holder)
                                   Class sigType = paramDesc.getJavaType();
                                   if(!JavaUtils.isConvertable(value, sigType))
  -                                    match = false;
  +                                    match = false;  
  +                                  
  +                                if (!sigType.isArray() && 
value.getClass().isArray() &&
  +                                    !sigType.equals(Object.class)) {
  +                                      match = false;  
  +                                }
  +                                
  +                                if (operation.getUse() == Use.ENCODED &&
  +                                    sigType.isArray() &&
  +                                    !value.getClass().isArray()) {
  +                                      match = false;
  +                                }   
                               }
                           }
                           // This is not the right operation, try the next one.
  
  
  

Reply via email to