axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r496028 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: context/MessageContext.java engine/AxisEngine.java transport/TransportUtils.java
Date Sun, 14 Jan 2007 03:49:47 GMT
Author: chamikara
Date: Sat Jan 13 19:49:46 2007
New Revision: 496028

URL: http://svn.apache.org/viewvc?view=rev&rev=496028
Log:
A couple of null checks.
Modified the 'TransportUtils.createSOAPMessage' method to make it usable, even when the OperationContext
is null.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=496028&r1=496027&r2=496028
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Sat Jan 13 19:49:46 2007
@@ -1343,7 +1343,7 @@
         this.setParent(operationContext);
 
         if (operationContext != null) {
-            if ((serviceContext != null) && (operationContext.getParent() == null))
{
+            if ((operationContext!=null) && (serviceContext != null) && (operationContext.getParent()
== null)) {
                 operationContext.setParent(serviceContext);
             }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=496028&r1=496027&r2=496028
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
Sat Jan 13 19:49:46 2007
@@ -171,8 +171,8 @@
               checkMustUnderstand(msgContext);
               
               MessageReceiver receiver = msgContext.getAxisOperation().getMessageReceiver();
-
-              receiver.receive(msgContext);
+              if (receiver!=null)
+            	  receiver.receive(msgContext);
             }
             flowComplete(msgContext, true);
           }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?view=diff&rev=496028&r1=496027&r2=496028
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
Sat Jan 13 19:49:46 2007
@@ -66,15 +66,9 @@
 			}
 			Object contentType;
 			boolean isMIME = false;
-			OperationContext opContext = msgContext.getOperationContext();
 
-			if (opContext != null) {
-				contentType = opContext
-						.getProperty(HTTPConstants.MTOM_RECEIVED_CONTENT_TYPE);
-			} else {
-				throw new AxisFault(Messages
-						.getMessage("cannotBeNullOperationContext"));
-			}
+			contentType = msgContext.getProperty(HTTPConstants.MTOM_RECEIVED_CONTENT_TYPE);
+			
 			//TODO: we can improve this logic
 			if (contentType!=null){
 				isMIME=true;
@@ -83,7 +77,7 @@
 			String charSetEnc = (String) msgContext
 					.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
 			if (charSetEnc == null) {
-				charSetEnc = (String) opContext
+				charSetEnc = (String) msgContext
 						.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
 			}
 			if (charSetEnc == null) {



---------------------------------------------------------------------
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