ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r545542 - /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
Date Fri, 08 Jun 2007 16:07:01 GMT
Author: gdaniels
Date: Fri Jun  8 09:07:00 2007
New Revision: 545542

URL: http://svn.apache.org/viewvc?view=rev&rev=545542
Log:
Override getText() in SOAP12FaultReasonImpl to return the text value of the first SOAPFaultText.
 This allows any SOAPFaultReason.getText() to return something reasonable.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java?view=diff&rev=545542&r1=545541&r2=545542
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/soap12/SOAP12FaultReasonImpl.java
Fri Jun  8 09:07:00 2007
@@ -26,7 +26,6 @@
 import org.apache.axiom.soap.impl.llom.SOAPFaultReasonImpl;
 
 public class SOAP12FaultReasonImpl extends SOAPFaultReasonImpl {
-    /** Eran Chinthaka (chinthaka@apache.org) */
     public SOAP12FaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder,
                                  SOAPFactory factory) {
         super(parent, builder, factory);
@@ -36,7 +35,6 @@
         super(factory.getNamespace(), factory);
     }
 
-    /** @param parent  */
     public SOAP12FaultReasonImpl(SOAPFault parent, SOAPFactory factory)
             throws SOAPProcessingException {
         super(parent, true, factory);
@@ -54,6 +52,18 @@
 
     public SOAPFaultText getFirstSOAPText() {
         return (SOAPFaultText)getFirstChildWithName(SOAP12Constants.QNAME_FAULT_TEXT);
+    }
+
+
+    /**
+     * getText() is overridden here in order to provide a uniform way for SOAP 1.1
+     * and SOAP 1.2 to get the "default" reason string.
+     *
+     * @return the default (local language, or first) reason string
+     */
+    public String getText() {
+        // TODO: Make this look for the correct lang for our locale first
+        return getFirstSOAPText().getText();
     }
 
     protected void checkParent(OMElement parent) throws SOAPProcessingException {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


Mime
View raw message