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 2006/02/04 12:37:51 UTC

svn commit: r374860 - in /webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security: WSDoAllReceiver.java WSDoAllSender.java

Author: ruchithf
Date: Sat Feb  4 03:37:45 2006
New Revision: 374860

URL: http://svn.apache.org/viewcvs?rev=374860&view=rev
Log:
Fix for the AXIS2-428

Modified:
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java?rev=374860&r1=374859&r2=374860&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java Sat Feb  4 03:37:45 2006
@@ -68,31 +68,31 @@
 		String originalDOcumentBuilderFactory = System.getProperty(DocumentBuilderFactory.class.getName());
 		System.setProperty(DocumentBuilderFactory.class.getName(),DocumentBuilderFactoryImpl.class.getName());
 
-    	//populate the properties
-    	try {
-    		HandlerParameterDecoder.processParameters(msgContext,true);
-    	} catch (Exception e) {
-    		throw new AxisFault("Configureation error", e);
-    	}
-    	/**
-    	 * Cannot do the following right now since we cannot access the req 
-    	 * mc when this handler runs in the client side.
-    	 */
-    	
-    	//Copy the WSHandlerConstants.SEND_SIGV over to the new message 
-    	//context - if it exists
-    	if(!msgContext.isServerSide()) {//To make sure this is a response message 
-    		OperationContext opCtx = msgContext.getOperationContext();
-    		MessageContext outMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
-    		msgContext.setProperty(WSHandlerConstants.SEND_SIGV,outMsgCtx.getProperty(WSHandlerConstants.SEND_SIGV));
-    	}
-    	
-        if (doDebug) {
-            log.debug("WSDoAllReceiver: enter invoke() ");
-        }
-        reqData = new RequestData();
-        
         try {
+        	//populate the properties
+        	try {
+        		HandlerParameterDecoder.processParameters(msgContext,true);
+        	} catch (Exception e) {
+        		throw new AxisFault("Configureation error", e);
+        	}
+        	/**
+        	 * Cannot do the following right now since we cannot access the req 
+        	 * mc when this handler runs in the client side.
+        	 */
+        	
+        	//Copy the WSHandlerConstants.SEND_SIGV over to the new message 
+        	//context - if it exists
+        	if(!msgContext.isServerSide()) {//To make sure this is a response message 
+        		OperationContext opCtx = msgContext.getOperationContext();
+        		MessageContext outMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+        		msgContext.setProperty(WSHandlerConstants.SEND_SIGV,outMsgCtx.getProperty(WSHandlerConstants.SEND_SIGV));
+        	}
+        	
+            if (doDebug) {
+                log.debug("WSDoAllReceiver: enter invoke() ");
+            }
+            reqData = new RequestData();
+        
         	reqData.setMsgContext(msgContext);
         	
         	//Figureout if the handler should run

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java?rev=374860&r1=374859&r2=374860&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java Sat Feb  4 03:37:45 2006
@@ -58,51 +58,50 @@
     }
 	
 	public void invoke(MessageContext msgContext) throws AxisFault {
-		
-		//Set the DOM impl to DOOM
-		String originalDOcumentBuilderFactory = System.getProperty(DocumentBuilderFactory.class.getName());
-		System.setProperty(DocumentBuilderFactory.class.getName(),DocumentBuilderFactoryImpl.class.getName());
-		
-        boolean doDebug = log.isDebugEnabled();
-        
-        try {
-        	HandlerParameterDecoder.processParameters(msgContext,false);
-        } catch (Exception e) {
-    		throw new AxisFault("Configureation error", e);
-    	}
-        
-        if (doDebug) {
-            log.debug("WSDoAllSender: enter invoke()");
-        }
-    	
-        /*
-         * Copy the RECV_RESULTS over to the current message context
-         * - IF available 
-         */
-        OperationContext opCtx = msgContext.getOperationContext();
-        MessageContext inMsgCtx;
-        if(opCtx != null && 
-        		(inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
-        	msgContext.setProperty(WSHandlerConstants.RECV_RESULTS, 
-        			inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
-        }
-        
-        reqData = new RequestData();
-        
-        reqData.setNoSerialization(false);
-        reqData.setMsgContext(msgContext);
-        
-    	//Figureout if the handler should run
-    	Object outFlowSecurity;
-    	if((outFlowSecurity = getOption(WSSHandlerConstants.OUTFLOW_SECURITY)) == null) {
-    		outFlowSecurity = getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY);
-    	}
+        //Set the DOM impl to DOOM
+        String originalDOcumentBuilderFactory = System.getProperty(DocumentBuilderFactory.class.getName());
+        System.setProperty(DocumentBuilderFactory.class.getName(),DocumentBuilderFactoryImpl.class.getName());
 
-    	if(outFlowSecurity == null) {
-    		return;
-    	}
-    	
         try {
+            boolean doDebug = log.isDebugEnabled();
+            
+            try {
+            	HandlerParameterDecoder.processParameters(msgContext,false);
+            } catch (Exception e) {
+        		throw new AxisFault("Configureation error", e);
+        	}
+            
+            if (doDebug) {
+                log.debug("WSDoAllSender: enter invoke()");
+            }
+        	
+            /*
+             * Copy the RECV_RESULTS over to the current message context
+             * - IF available 
+             */
+            OperationContext opCtx = msgContext.getOperationContext();
+            MessageContext inMsgCtx;
+            if(opCtx != null && 
+            		(inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
+            	msgContext.setProperty(WSHandlerConstants.RECV_RESULTS, 
+            			inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
+            }
+            
+            reqData = new RequestData();
+            
+            reqData.setNoSerialization(false);
+            reqData.setMsgContext(msgContext);
+            
+        	//Figureout if the handler should run
+        	Object outFlowSecurity;
+        	if((outFlowSecurity = getOption(WSSHandlerConstants.OUTFLOW_SECURITY)) == null) {
+        		outFlowSecurity = getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY);
+        	}
+    
+        	if(outFlowSecurity == null) {
+        		return;
+        	}
+    	
 	        Vector actions = new Vector();
 	        String action = null;
             if ((action = (String) getOption(WSSHandlerConstants.ACTION_ITEMS)) == null) {