axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r431319 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
Date Mon, 14 Aug 2006 10:27:11 GMT
Author: chinthaka
Date: Mon Aug 14 03:27:07 2006
New Revision: 431319

URL: http://svn.apache.org/viewvc?rev=431319&view=rev
Log:
Enabling content type to be used even when the output stream is being used. Content type handling
was working when we use the http 
client, but not when using output stream.
This is a temp solution and all the options, that are working with the http client,  should
work even with the outputstream case. 


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

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=431319&r1=431318&r2=431319&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
Mon Aug 14 03:27:07 2006
@@ -241,11 +241,19 @@
                             .getProperty(Constants.OUT_TRANSPORT_INFO);
 
             if (transportInfo != null) {
-                boolean soap11 = msgContext.isSOAP11();
+                String contentType;
+
+                Object contentTypeObject = msgContext.getProperty(Constants.Configuration.CONTENT_TYPE);
+                if (contentTypeObject != null) {
+                    contentType = (String) contentTypeObject;
+                } else if (msgContext.isDoingREST()) {
+                    contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_XML;
+                } else {
+                    contentType = format.getContentType();
+                    format.setSOAP11(msgContext.isSOAP11());
+                }
 
-                format.setSOAP11(soap11);
 
-                String contentType = format.getContentType();
                 String encoding = contentType + "; charset="
                         + format.getCharSetEncoding();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message