You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2005/08/01 07:10:55 UTC

svn commit: r226746 - /webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java

Author: ruchithf
Date: Sun Jul 31 22:10:49 2005
New Revision: 226746

URL: http://svn.apache.org/viewcvs?rev=226746&view=rev
Log:
Promting operation specific paramters in the message context to the operation context, used in the case of charset encoding

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java?rev=226746&r1=226745&r2=226746&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisEngine.java Sun Jul 31 22:10:49 2005
@@ -133,7 +133,13 @@
                     operationDescription.getRemainingPhasesInFlow();
             invokePhases(operationSpecificPhases, msgContext);
         }
-
+        
+        /**
+         * Promote the operation specific paramters in the message context to
+         * the operation context
+         */
+        promoteMessageContextProperties(msgContext);
+        
         if (msgContext.isServerSide() && !msgContext.isPaused()) {
             // invoke the Message Receivers
             MessageReceiver receiver =
@@ -474,6 +480,19 @@
     public boolean clearStorage(ConfigurationContext context) {
         return context.getStorage().clean();
     }
+    
+    /**
+     * This is used to promote operation/service specific properties that are 
+     * in the message context to the relevant context 
+     * @param msgContext The message context
+     */
+    private void promoteMessageContextProperties(MessageContext msgContext) {
+    	//Character set encoding
+    	String charSetEncoding = (String)msgContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
+		if(charSetEncoding != null){
+    		msgContext.getOperationContext().setProperty(MessageContext.CHARACTER_SET_ENCODING,charSetEncoding,true);
+    	}
+    }
 
     private String getSenderFaultCode(String soapNamespace) {
         return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapNamespace) ? SOAP12Constants.FAULT_CODE_SENDER : SOAP11Constants.FAULT_CODE_SENDER;
@@ -482,4 +501,5 @@
     private String getReceiverFaultCode(String soapNamespace) {
         return SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapNamespace) ? SOAP12Constants.FAULT_CODE_RECEIVER : SOAP11Constants.FAULT_CODE_RECEIVER;
     }
+
 }