axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r179370 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis: Constants.java transport/http/AxisServlet.java transport/http/HTTPTransportSender.java
Date Wed, 01 Jun 2005 09:54:29 GMT
Author: hemapani
Date: Wed Jun  1 02:54:27 2005
New Revision: 179370

URL: http://svn.apache.org/viewcvs?rev=179370&view=rev
Log:
fix the error with the writng the response http headers

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java?rev=179370&r1=179369&r2=179370&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java Wed Jun  1
02:54:27 2005
@@ -158,5 +158,6 @@
     }
     public static final String VALUE_TRUE = "true";
     public static final String VALUE_FALSE = "false";
+    public static final String CONTAINER_MANAGED = "ContainerManaged";
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=179370&r1=179369&r2=179370&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
Wed Jun  1 02:54:27 2005
@@ -221,6 +221,8 @@
                             engineContext.getAxisConfiguration().getTransportOut(
                                     new QName(Constants.TRANSPORT_HTTP)));
             msgContext.setServerSide(true);
+            msgContext.setProperty(Constants.CONTAINER_MANAGED,Constants.VALUE_TRUE);
+            
             String filePart = req.getRequestURL().toString();
             msgContext.setTo(
                     new EndpointReference(AddressingConstants.WSA_TO, filePart));

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java?rev=179370&r1=179369&r2=179370&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/HTTPTransportSender.java
Wed Jun  1 02:54:27 2005
@@ -15,6 +15,7 @@
 */
 package org.apache.axis.transport.http;
 
+import org.apache.axis.Constants;
 import org.apache.axis.addressing.EndpointReference;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.engine.AxisFault;
@@ -83,7 +84,7 @@
         buf.append("Cache-Control: no-cache\n");
         buf.append("Pragma: no-cache\n");
         buf.append("Content-Length: " + contentLength + "\n");
-        if(!this.doREST){
+        if (!this.doREST) {
             buf.append("SOAPAction: \"" + soapActionString + "\"\n");
         }
         buf.append("\n");
@@ -142,12 +143,15 @@
         MessageContext msgContext,
         Writer writer)
         throws AxisFault {
-        try {
-            writer.write(new String(HTTPConstants.HTTP).toCharArray());
-            writer.write(new String(HTTPConstants.OK).toCharArray());
-            writer.write("\n\n".toCharArray());
-        } catch (IOException e) {
-            throw new AxisFault(e);
+        Object contianerManaged = msgContext.getProperty(Constants.CONTAINER_MANAGED);
+        if (contianerManaged == null || !Constants.VALUE_TRUE.equals(contianerManaged)) {
+            try {
+                writer.write(new String(HTTPConstants.HTTP).toCharArray());
+                writer.write(new String(HTTPConstants.OK).toCharArray());
+                writer.write("\n\n".toCharArray());
+            } catch (IOException e) {
+                throw new AxisFault(e);
+            }
         }
     }
 



Mime
View raw message