axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java
Date Sat, 30 Nov 2002 23:00:10 GMT
dims        2002/11/30 15:00:10

  Modified:    java/src/org/apache/axis AxisFault.java
  Log:
  Fix for Bug 12818 - Wrong namespace for SOAP faultcode value
  
  Notes:
  - cleaned up a bit of javadoc
  - cleaned up imports.
  
  Revision  Changes    Path
  1.63      +7 -12     xml-axis/java/src/org/apache/axis/AxisFault.java
  
  Index: AxisFault.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- AxisFault.java	20 Nov 2002 16:37:40 -0000	1.62
  +++ AxisFault.java	30 Nov 2002 23:00:10 -0000	1.63
  @@ -62,19 +62,19 @@
   import org.apache.axis.message.SOAPHeaderElement;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.XMLUtils;
  -import org.apache.axis.utils.Messages;
  +import org.apache.axis.soap.SOAPConstants;
   import org.apache.commons.logging.Log;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Text;
   
   import javax.xml.namespace.QName;
  +import javax.xml.parsers.ParserConfigurationException;
   import java.io.PrintStream;
   import java.lang.reflect.InvocationTargetException;
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.Vector;
  -import javax.xml.parsers.ParserConfigurationException;
   
   /**
    * An exception which maps cleanly to a SOAP fault.
  @@ -205,7 +205,6 @@
       public AxisFault(String message)
       {
           super (message);
  -        //TODO: SOAP 1.2 or 1.1 ?
           setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL);
           setFaultString(message);
           initFromException(this);
  @@ -217,7 +216,6 @@
       public AxisFault()
       {
           super();
  -        //TODO: 1.2 or 1.1 ?
           setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL);     
           initFromException(this);
       }
  @@ -232,7 +230,6 @@
       public AxisFault (String message, Throwable t)
       {
           super (message, t);
  -        //TODO: SOAP 1.2 or 1.1 ?
           setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL);
           setFaultString(message);
       }
  @@ -340,7 +337,11 @@
        * @param code fault code
        */
       public void setFaultCodeAsString(String code) {
  -        faultCode = new QName(Constants.URI_SOAP12_ENV, code);
  +        SOAPConstants soapConstants = MessageContext.getCurrentContext() == null ?
  +                                        SOAPConstants.SOAP11_CONSTANTS :
  +                                        MessageContext.getCurrentContext().getSOAPConstants();
  +        
  +        faultCode = new QName(soapConstants.getEnvelopeURI(), code);
       }
   
       /**
  @@ -353,7 +354,6 @@
   
       /**
        * This is new in SOAP 1.2, ignored in SOAP 1.1
  -     * @return
        */
       public void addFaultSubCodeAsString(String code) {
           if (faultSubCode == null)
  @@ -363,7 +363,6 @@
   
       /**
        * This is new in SOAP 1.2, ignored in SOAP 1.1
  -     * @return
        */
       public void addFaultSubCode(QName code) {
           if (faultSubCode == null)
  @@ -373,7 +372,6 @@
   
       /**
        * This is new in SOAP 1.2, ignored in SOAP 1.1
  -     * @return
        */
       public void clearFaultSubCodes() {
           faultSubCode = null;
  @@ -412,7 +410,6 @@
   
       /**
        * This is SOAP 1.2 equivalent of {@link #setFaultString(java.lang.String)}
  -     * @return
        */
       public void setFaultReason(String str) {
           setFaultString(str);
  @@ -452,7 +449,6 @@
   
       /**
        * This is SOAP 1.2 equivalent of {@link #setFaultActor(java.lang.String)}
  -     * @return
        */
       public void setFaultRole(String role) {
           setFaultActor(role);
  @@ -468,7 +464,6 @@
   
       /**
        * This is new in SOAP 1.2
  -     * @return
        */
       public void setFaultNode(String node) {
           faultNode = node;
  
  
  

Mime
View raw message