You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ga...@apache.org on 2005/01/05 07:15:13 UTC

cvs commit: ws-axis/java/src/org/apache/axis/description JavaServiceDesc.java OperationDesc.java

gawor       2005/01/04 22:15:13

  Modified:    java/src/org/apache/axis/description JavaServiceDesc.java
                        OperationDesc.java
  Log:
  don't lookup super classses when generating fault metadata for service operations. super class lookup might lead to missing fault metadata
  
  Revision  Changes    Path
  1.17      +1 -1      ws-axis/java/src/org/apache/axis/description/JavaServiceDesc.java
  
  Index: JavaServiceDesc.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/JavaServiceDesc.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JavaServiceDesc.java	17 Dec 2004 19:17:21 -0000	1.16
  +++ JavaServiceDesc.java	5 Jan 2005 06:15:13 -0000	1.17
  @@ -1324,7 +1324,7 @@
                   operation.addFault(fault);
                   */
   
  -                FaultDesc fault = operation.getFaultByClass(ex);
  +                FaultDesc fault = operation.getFaultByClass(ex, false);
                   boolean isNew;
                   
                   // If we didn't find one, create a new one
  
  
  
  1.41      +23 -0     ws-axis/java/src/org/apache/axis/description/OperationDesc.java
  
  Index: OperationDesc.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/OperationDesc.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- OperationDesc.java	22 Jun 2004 16:58:19 -0000	1.40
  +++ OperationDesc.java	5 Jan 2005 06:15:13 -0000	1.41
  @@ -481,6 +481,29 @@
       }
   
       /**
  +     * Returns the FaultDesc for the fault class given.
  +     * Returns null if not found.
  +     */ 
  +    public FaultDesc getFaultByClass(Class cls, boolean checkParents) {
  +        if (checkParents) {
  +            return getFaultByClass(cls);
  +        } 
  +        
  +        if (faults == null || cls == null) {
  +            return null;
  +        }
  +        
  +        for (Iterator iterator = faults.iterator(); iterator.hasNext();) {
  +            FaultDesc desc = (FaultDesc) iterator.next();
  +            if (cls.getName().equals(desc.getClassName())) {
  +                return desc;
  +            }
  +        }
  +        
  +        return null;
  +    }
  +
  +    /**
        * Returns the FaultDesc for a QName (which is typically found
        * in the details element of a SOAP fault).
        * Returns null if not found.