You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ro...@apache.org on 2020/01/05 23:54:25 UTC
svn commit: r1872364 -
/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Author: robertlazarski
Date: Sun Jan 5 23:54:24 2020
New Revision: 1872364
URL: http://svn.apache.org/viewvc?rev=1872364&view=rev
Log:
AXIS2-5943, simply return false in MessageContext.isFault() if the envelope is null. This can happen in JSON based REST services
Modified:
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java?rev=1872364&r1=1872363&r2=1872364&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/MessageContext.java Sun Jan 5 23:54:24 2020
@@ -4286,6 +4286,16 @@ public class MessageContext extends Abst
}
public boolean isFault() {
+ if (getEnvelope() == null) {
+ // AXIS2-5943 , the basic assumption that the Axis2 architecture makes
+ // is that any payload always has some form of SOAP representation and
+ // the envelope should therefore never be null.
+ // In the HTTP Response of JSON based REST services, the axisOperation
+ // is null so no envelope is created
+ log.debug(getLogIDString() + ", " + myClassName +
+ " , isFault() found a null soap envelope, returning false. This can happen in REST HTTP responses. ");
+ return false;
+ }
return getEnvelope().hasFault();
}