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 st...@apache.org on 2005/10/27 15:20:04 UTC

svn commit: r328870 - in /webservices/axis2/trunk/java/modules/core: ./ src/org/apache/axis2/transport/http/

Author: stevel
Date: Thu Oct 27 06:19:56 2005
New Revision: 328870

URL: http://svn.apache.org/viewcvs?rev=328870&view=rev
Log:
Roll back to servlets API 2.3

1. explicitly import that version of the API; no accidental use of 2.4 features can happen

2. fix encoding setting to use the 2.3-compatible mechanism to set the encoding.

Modified:
    webservices/axis2/trunk/java/modules/core/project.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPOutTransportInfo.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ServletBasedOutTransportInfo.java

Modified: webservices/axis2/trunk/java/modules/core/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/project.xml?rev=328870&r1=328869&r2=328870&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/project.xml (original)
+++ webservices/axis2/trunk/java/modules/core/project.xml Thu Oct 27 06:19:56 2005
@@ -77,14 +77,14 @@
                 <module>true</module>
             </properties>
         </dependency>
-        <dependency>
-            <groupId>geronimo-spec</groupId>
-            <artifactId>geronimo-spec-servlet</artifactId>
-            <version>${geronimo.spec.servlet.version}</version>
-            <properties>
-                <module>true</module>
-            </properties>
-        </dependency>
+      <dependency>
+        <groupId>servletapi</groupId>
+        <artifactId>servletapi</artifactId>
+        <version>${servletapi.version}</version>
+        <properties>
+          <module>true</module>
+        </properties>
+      </dependency>
         <dependency>
             <groupId>commons-httpclient</groupId>
             <artifactId>commons-httpclient</artifactId>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=328870&r1=328869&r2=328870&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Thu Oct 27 06:19:56 2005
@@ -151,8 +151,9 @@
                                     HTTPConstants.HTTPOutTransportInfo);
                     if (transportInfo != null) {
                         omOutput.setSoap11(msgContext.isSOAP11());
-                        transportInfo.setCharacterEncoding(omOutput.getCharSetEncoding());
-                        transportInfo.setContentType(omOutput.getContentType());
+                        //this is the servlet2.3 way of setting encodings
+                        String encoding= omOutput.getContentType() +"; charset="+ omOutput.getCharSetEncoding();
+                        transportInfo.setContentType(encoding);
                     } else {
                         throw new AxisFault(HTTPConstants.HTTPOutTransportInfo + " does not set");
                     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPOutTransportInfo.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPOutTransportInfo.java?rev=328870&r1=328869&r2=328870&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPOutTransportInfo.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPOutTransportInfo.java Thu Oct 27 06:19:56 2005
@@ -18,5 +18,4 @@
 
 public interface HTTPOutTransportInfo {
     public abstract void setContentType(String contentType);
-    public abstract void setCharacterEncoding(String encoding);
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ServletBasedOutTransportInfo.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ServletBasedOutTransportInfo.java?rev=328870&r1=328869&r2=328870&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ServletBasedOutTransportInfo.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ServletBasedOutTransportInfo.java Thu Oct 27 06:19:56 2005
@@ -29,7 +29,4 @@
         response.setContentType(contentType);
     }
 
-    public void setCharacterEncoding(String encoding) {
-        response.setCharacterEncoding(encoding);
-    }
 }