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 de...@apache.org on 2005/07/01 07:04:56 UTC

svn commit: r208714 - /webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java

Author: deepal
Date: Thu Jun 30 22:04:55 2005
New Revision: 208714

URL: http://svn.apache.org/viewcvs?rev=208714&view=rev
Log:
checking OM element is null or not when calling body.addChild

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java?rev=208714&r1=208713&r2=208714&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/RawXMLINOnlyMessageReceiver.java Thu Jun 30 22:04:55 2005
@@ -86,7 +86,7 @@
                 if (methods[i].getName().equals(methodName)) {
                     this.method = methods[i];
                     break;
-                } 
+                }
             }
             Class[] parameters = method.getParameterTypes();
             if ((parameters != null)
@@ -119,8 +119,12 @@
 
                     OMNamespace ns = fac.createOMNamespace("http://soapenc/", "res");
                     OMElement responseMethodName = fac.createOMElement(methodName + "Response", ns);
-                    responseMethodName.addChild(result);
-                    envelope.getBody().addChild(responseMethodName);
+                    if (result != null) {
+                        responseMethodName.addChild(result);
+                    }
+                    if (responseMethodName != null) {
+                        envelope.getBody().addChild(responseMethodName);
+                    }
                 } else {
                     throw new AxisFault("Unknown style ");
                 }