ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r389313 - /webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java
Date Mon, 27 Mar 2006 22:25:44 GMT
Author: dug
Date: Mon Mar 27 14:25:43 2006
New Revision: 389313

URL: http://svn.apache.org/viewcvs?rev=389313&view=rev
Log:
reenable tracking of processed headers during serialization

Modified:
    webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java

Modified: webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java?rev=389313&r1=389312&r2=389313&view=diff
==============================================================================
--- webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java (original)
+++ webservices/axis/trunk/proposals/dug/java/src/org/apache/axis/MessageContext.java Mon
Mar 27 14:25:43 2006
@@ -33,6 +33,8 @@
 import org.apache.axis.utils.LockableHashtable;
 import org.apache.axis.utils.Messages;
 import org.apache.commons.logging.Log;
+import org.apache.axis.message.SOAPEnvelope;
+import org.apache.axis.message.SOAPHeaderElement;
 
 import javax.xml.namespace.QName;
 import javax.xml.rpc.Call;
@@ -45,6 +47,7 @@
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.Vector;
 
 // fixme: fields are declared throughout this class, some at the top, and some
 //  near to where they are used. We should move all field declarations into a
@@ -386,7 +389,6 @@
       Hashtable table = new Hashtable();
 
       if ( requestMessage != null )  {
-        /* skip this for now
         SOAPEnvelope env = requestMessage.getSOAPEnvelope();
         if ( env != null ) {
           Vector headers = env.getHeaders();
@@ -403,11 +405,9 @@
           if ( muHdrs.size() > 0 )
             table.put( "msg.reqMU", muHdrs );
         }
-        */
         table.put("msg.req", requestMessage.getSOAPPartAsString() );
       }
       if ( responseMessage != null )  {
-        /* Skip this for now 
         SOAPEnvelope env = responseMessage.getSOAPEnvelope();
         if ( env != null ) {
           Vector headers = env.getHeaders();
@@ -424,7 +424,6 @@
           if ( muHdrs.size() > 0 )
             table.put( "msg.resMU", muHdrs );
         }
-        */
         table.put("msg.res", responseMessage.getSOAPPartAsString() );
       }
       if ( targetService != null ) table.put("msg.svc", targetService );
@@ -486,7 +485,7 @@
       highFidelity = "true".equals((String)table.get("msg.hig"));
       username = (String) table.get("msg.usr");
       password = (String) table.get("msg.pwd");
-      encodingStyle = (String) table.get("msg.enc");
+      // encodingStyle = (String) table.get("msg.enc");
       useSOAPAction = "true".equals((String)table.get("msg.usa"));
       SOAPActionURI = (String) table.get("msg.act");
 
@@ -496,16 +495,19 @@
           bag.put( name.substring(2), table.get(name) );
       }
 
-      /*
+      // Special because it will look up the service object
+      setTargetService( (String) table.get("msg.svc") );
+
       // Mark all processed headers as processed
+      Enumeration ee ;
       if ( (obj = table.get("msg.reqMU")) != null ) {
         Vector MUs = (Vector) obj ;
         SOAPEnvelope env = requestMessage.getSOAPEnvelope();
         for ( int i = 0 ; i < MUs.size() ; i++ ) {
           QName qn = (QName) MUs.get(i);
-          enum = env.getHeadersByName(qn.getNamespaceURI(), qn.getLocalPart());
-          while (enum.hasMoreElements()) 
-            ((SOAPHeaderElement) enum.nextElement()).setProcessed(true);
+          ee = env.getHeadersByName(qn.getNamespaceURI(), qn.getLocalPart());
+          while (ee.hasMoreElements()) 
+            ((SOAPHeaderElement) ee.nextElement()).setProcessed(true);
         }
       }
 
@@ -514,15 +516,11 @@
         SOAPEnvelope env = responseMessage.getSOAPEnvelope();
         for ( int i = 0 ; i < MUs.size() ; i++ ) {
           QName qn = (QName) MUs.get(i);
-          enum = env.getHeadersByName(qn.getNamespaceURI(), qn.getLocalPart());
-          while (enum.hasMoreElements()) 
-            ((SOAPHeaderElement) enum.nextElement()).setProcessed(true);
+          ee = env.getHeadersByName(qn.getNamespaceURI(), qn.getLocalPart());
+          while (ee.hasMoreElements()) 
+            ((SOAPHeaderElement) ee.nextElement()).setProcessed(true);
         }
       }
-      */
-
-      // Special because it will look up the service object
-      setTargetService( (String) table.get("msg.svc") );
     }
 
     /**



Mime
View raw message