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 ke...@apache.org on 2007/07/26 08:15:11 UTC

svn commit: r559702 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java

Author: keithc
Date: Wed Jul 25 23:15:10 2007
New Revision: 559702

URL: http://svn.apache.org/viewvc?view=rev&rev=559702
Log:
Fix for Axis2-3007


Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?view=diff&rev=559702&r1=559701&r2=559702
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Wed Jul 25 23:15:10 2007
@@ -41,6 +41,7 @@
 import org.apache.axis2.transport.http.ApplicationXMLFormatter;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.axis2.transport.http.SOAPMessageFormatter;
+import org.apache.axis2.transport.http.XFormURLEncodedFormatter;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
@@ -278,7 +279,12 @@
 
             // If we are doing rest better default to Application/xml formatter
             if (msgContext.isDoingREST()) {
-                messageFormatter = new ApplicationXMLFormatter();
+                String httpMethod = (String) msgContext.getProperty(Constants.Configuration.HTTP_METHOD);
+                if (Constants.Configuration.HTTP_METHOD_GET.equals(httpMethod) ||
+                        Constants.Configuration.HTTP_METHOD_DELETE.equals(httpMethod)) {
+                    return new XFormURLEncodedFormatter();
+                }
+                return new ApplicationXMLFormatter();
             } else {
                 // Lets default to SOAP formatter
                 //TODO need to improve this to use the stateless nature



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