axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ig...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/providers/java RPCProvider.java
Date Tue, 09 Apr 2002 23:42:57 GMT
igors       02/04/09 16:42:57

  Modified:    java/src/org/apache/axis/providers/java RPCProvider.java
  Log:
  When scanning body elements, do not step on SOAP-ENC elements.
  Those are NOT parameters.
  At least do not step on elements parameters for which do not exist on the operation.
  
  Revision  Changes    Path
  1.54      +11 -4     xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- RPCProvider.java	5 Apr 2002 21:24:33 -0000	1.53
  +++ RPCProvider.java	9 Apr 2002 23:42:57 -0000	1.54
  @@ -126,12 +126,19 @@
               // FIXME : There should be a cleaner way to do this...
               if (!(bodies.get(bNum) instanceof RPCElement)) {
                   SOAPBodyElement bodyEl = (SOAPBodyElement)bodies.get(bNum);
  +                // igors: better check if bodyEl.getID() != null
  +                // to make sure this loop does not step on SOAP-ENC objects
  +                // that follow the parameters! FIXME?
                   if (bodyEl.isRoot() && operation != null) {
                       ParameterDesc param = operation.getParameter(bNum);
  -                    Object val = bodyEl.getValueAsType(param.getTypeQName());
  -                    body = new RPCElement("",
  -                                          operation.getName(),
  -                                          new Object [] { val });
  +                    // at least do not step on non-existent parameters!
  +                    if(param != null) {
  +                        Object val = bodyEl.getValueAsType(param.getTypeQName());
  +                        body = new RPCElement("",
  +                                              operation.getName(),
  +                                              new Object [] { val });
  +                    }
  +                    else continue;
                   } else {
                       continue;
                   }
  
  
  

Mime
View raw message