geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r555378 - /geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Date Wed, 11 Jul 2007 19:39:40 GMT
Author: gawor
Date: Wed Jul 11 12:39:39 2007
New Revision: 555378

URL: http://svn.apache.org/viewvc?view=rev&rev=555378
Log:
pass transport headers correctly

Modified:
    geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java

Modified: geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?view=diff&rev=555378&r1=555377&r2=555378
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Wed Jul 11 12:39:39 2007
@@ -58,6 +58,7 @@
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.transport.http.HTTPTransportReceiver;
 import org.apache.axis2.transport.http.HTTPTransportUtils;
+import org.apache.axis2.transport.http.TransportHeaders;
 import org.apache.axis2.transport.http.util.RESTUtil;
 import org.apache.axis2.util.MessageContextBuilder;
 import org.apache.commons.logging.Log;
@@ -173,15 +174,12 @@
         MessageContext msgContext = new MessageContext();
         msgContext.setIncomingTransportName(Constants.TRANSPORT_HTTP);
         msgContext.setProperty(MessageContext.REMOTE_ADDR, request.getRemoteAddr());
-        
 
         try {
             TransportOutDescription transportOut = this.configurationContext.getAxisConfiguration()
                     .getTransportOut(Constants.TRANSPORT_HTTP);
             TransportInDescription transportIn = this.configurationContext.getAxisConfiguration()
                     .getTransportIn(Constants.TRANSPORT_HTTP);
-            
-            
 
             msgContext.setConfigurationContext(this.configurationContext);
 
@@ -197,17 +195,6 @@
             msgContext.setServerSide(true);
             msgContext.setAxisService(this.service);
             
-
-//            // set the transport Headers
-//            HashMap headerMap = new HashMap();
-//            for (Iterator it = request.headerIterator(); it.hasNext();) {
-//                Header header = (Header) it.next();
-//                headerMap.put(header.getName(), header.getValue());
-//            }
-//            msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, headerMap);
-//
-//            this.httpcontext.setAttribute(AxisParams.MESSAGE_CONTEXT, msgContext);
-
             doService2(request, response, msgContext);
         } catch (Throwable e) {
             String msg = "Exception occurred while trying to invoke service method doService()";
@@ -346,6 +333,11 @@
         ServletContext servletContext =
             (ServletContext)request.getAttribute(WebServiceContainer.SERVLET_CONTEXT);
         msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT, servletContext);   

+        
+        if (servletRequest != null) {
+            msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, 
+                                   new TransportHeaders(servletRequest));
+        }
         
         if (this.binding != null) {
             msgContext.setProperty(JAXWSMessageReceiver.PARAM_BINDING, this.binding);  



Mime
View raw message