ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/message SOAPFaultDetailsBuilder.java
Date Tue, 20 Apr 2004 18:28:34 GMT
dims        2004/04/20 11:28:34

  Modified:    java/src/org/apache/axis/message
                        SOAPFaultDetailsBuilder.java
  Log:
  fix for getting custom faults to work with wrapped/literal
  
  Notes:
  - deploy modified version of deploy.wsdd in samples/faults (see snippet below)
  - run wsdl2java on the runtime wsdl
  - add try/catch around getEmployee and ensure that the custom fault is caught.
  
  ==================================================
  <deployment xmlns="http://xml.apache.org/axis/wsdd/"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
  
      <service name="Employee2" provider="java:RPC" style="wrapped" use="literal">
          <namespace>http://faults2.samples</namespace>
          <parameter name="className" value="samples.faults2.EmployeeInfo"/>
          <parameter name="allowedMethods" value="addEmployee getEmployees getEmployee"/>
          <parameter name="scope" value="Session"/>
  
          <beanMapping qname="operNS:NoSuchEmployeeFault" xmlns:operNS="http://faults2.samples"
languageSpecificType="java:samples.faults2.NoSuchEmployeeFault"/>
      </service>
  </deployment>
  ==================================================
  
  Revision  Changes    Path
  1.18      +13 -0     ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.java
  
  Index: SOAPFaultDetailsBuilder.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPFaultDetailsBuilder.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SOAPFaultDetailsBuilder.java	2 Apr 2004 19:27:54 -0000	1.17
  +++ SOAPFaultDetailsBuilder.java	20 Apr 2004 18:28:34 -0000	1.18
  @@ -32,6 +32,7 @@
   import org.xml.sax.SAXException;
   
   import javax.xml.namespace.QName;
  +import java.util.Iterator;
   
   /**
    * Handle deserializing fault details.
  @@ -118,6 +119,18 @@
                   }
               }
   
  +            if (faultDesc == null) {
  +                Iterator i = op.getFaults().iterator();
  +                while(i.hasNext()) {
  +                    FaultDesc fdesc = (FaultDesc) i.next();
  +                    if(fdesc.getClassName().equals(name)) {
  +                        faultDesc = fdesc;  
  +                        faultXmlType = fdesc.getXmlType();
  +                        break;
  +                    }
  +                }
  +            }
  +            
               // Set the class if we found a description
               if (faultDesc != null) {
                   try {
  
  
  

Mime
View raw message