axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/message SOAPFaultElement.java
Date Thu, 14 Jun 2001 16:29:03 GMT
gdaniels    01/06/14 09:29:03

  Modified:    java/src/org/apache/axis/message SOAPFaultElement.java
  Log:
  Do a better job with faultcodes/QFaults.  Play nice with the XML rules.
  
  Revision  Changes    Path
  1.4       +9 -2      xml-axis/java/src/org/apache/axis/message/SOAPFaultElement.java
  
  Index: SOAPFaultElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPFaultElement.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SOAPFaultElement.java	2001/05/31 15:34:40	1.3
  +++ SOAPFaultElement.java	2001/06/14 16:28:58	1.4
  @@ -62,6 +62,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.encoding.*;
   import org.apache.axis.utils.QName;
  +import org.apache.axis.utils.QFault;
   import java.util.*;
   import java.io.*;
   
  @@ -109,7 +110,11 @@
               fault = new AxisFault();
           
           if (currentSubElement.equals("faultcode")) {
  -            fault.setFaultCode(currentValue.toString());
  +            fault.setFaultCode(
  +                      new QFault(
  +                         context.getQNameFromString(currentValue.toString())
  +                                )
  +                              );
           } else if (currentSubElement.equals("faultstring")) {
               fault.setFaultString(currentValue.toString());
           } else if (currentSubElement.equals("faultactor")) {
  @@ -146,7 +151,9 @@
           if (fault.getFaultCode() != null) {
             MessageElement element = new 
               MessageElement(Constants.URI_SOAP_ENV, "faultcode", null, null);
  -          element.setValue(fault.getFaultCode());
  +          QFault code = fault.getFaultCode();
  +          String prefix = context.getPrefixForURI(code.getNamespaceURI());
  +          element.setValue(prefix + ":" + code.getLocalPart());
             element.output(context);
           }
       
  
  
  

Mime
View raw message