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 di...@apache.org on 2005/07/27 05:44:02 UTC

cvs commit: ws-axis/java/src/org/apache/axis/message SOAPFaultBuilder.java

dims        2005/07/26 20:44:02

  Modified:    java/src/org/apache/axis/message SOAPFaultBuilder.java
  Log:
  Fix for AXIS-2121 - CLONE -IncompatibleClassChangeError when deploying Axis 1.2-RC3 on WebSphere 5.1 with PARENT_FIRST classloading
  
  Revision  Changes    Path
  1.41      +10 -5     ws-axis/java/src/org/apache/axis/message/SOAPFaultBuilder.java
  
  Index: SOAPFaultBuilder.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPFaultBuilder.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- SOAPFaultBuilder.java	3 Feb 2005 14:16:21 -0000	1.40
  +++ SOAPFaultBuilder.java	27 Jul 2005 03:44:02 -0000	1.41
  @@ -23,13 +23,14 @@
   import org.apache.axis.encoding.Deserializer;
   import org.apache.axis.soap.SOAPConstants;
   import org.apache.axis.utils.Messages;
  +import org.apache.axis.utils.XMLUtils;
   import org.w3c.dom.Element;
  +import org.w3c.dom.Node;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   
   import javax.xml.namespace.QName;
   import java.lang.reflect.Constructor;
  -import java.rmi.RemoteException;
   import java.util.HashMap;
   import java.util.List;
   import java.util.Vector;
  @@ -253,7 +254,7 @@
                   SOAPConstants.SOAP11_CONSTANTS :
                   context.getMessageContext().getSOAPConstants();
           
  -        QName qName = null;
  +        QName qName;
           // If we found the type for this field, get the deserializer
           // otherwise, if this is the details element, use the special 
           // SOAPFaultDetailsBuilder handler to take care of custom fault data 
  @@ -296,9 +297,13 @@
                   Element [] elements = new Element [children.size()];
                   for (int i = 0; i < elements.length; i++) {
                       try {
  -                        elements[i] = ((MessageElement)children.get(i)).
  -                                                                    getAsDOM();
  -                        
  +                        Node node = (Node) children.get(i);
  +                        if (node instanceof MessageElement) {
  +                            elements[i] = ((MessageElement) node).getAsDOM();
  +                        } else if(node instanceof Text){
  +                            elements[i] = XMLUtils.newDocument().createElement("text");
  +                            elements[i].appendChild(node);
  +                        }
                       } catch (Exception e) {
                           throw new SAXException(e);
                       }