axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r527743 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
Date Thu, 12 Apr 2007 01:37:26 GMT
Author: dims
Date: Wed Apr 11 18:37:25 2007
New Revision: 527743

URL: http://svn.apache.org/viewvc?view=rev&rev=527743
Log:
prevent NPE

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java?view=diff&rev=527743&r1=527742&r2=527743
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
Wed Apr 11 18:37:25 2007
@@ -71,13 +71,14 @@
     public void writeTo(MessageContext messageContext, OMOutputFormat format,
                         OutputStream outputStream, boolean preserve) throws AxisFault {
 
-        OMElement omElement;
+        OMElement omElement = null;
 
         if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW) {
             SOAPFault fault = messageContext.getEnvelope().getBody().getFault();
             SOAPFaultDetail soapFaultDetail = fault.getDetail();
-            omElement = soapFaultDetail.getFirstElement();
-
+            if (soapFaultDetail != null) {
+                omElement = soapFaultDetail.getFirstElement();
+            }
             if (omElement == null) {
                 omElement = fault.getReason();
             }



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


Mime
View raw message