Author: keithc Date: Sun Jan 13 05:27:26 2008 New Revision: 611574 URL: http://svn.apache.org/viewvc?rev=611574&view=rev Log: Setting the HTTPMethod as a property to the messageContext when simpleAxisServer is used. Needed for REST dispatching
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java?rev=611574&r1=611573&r2=611574&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java Sun Jan 13 05:27:26 2008 @@ -57,6 +57,7 @@ import org.apache.http.ProtocolException; import org.apache.http.ProtocolVersion; import org.apache.http.UnsupportedHttpVersionException; +import org.apache.http.RequestLine; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpParamsLinker; import org.apache.http.protocol.HttpContext; @@ -140,6 +141,10 @@ HttpResponse response; try { HttpRequest request = conn.receiveRequest(); + RequestLine requestLine = request.getRequestLine(); + if (requestLine != null) { + msgContext.setProperty(HTTPConstants.HTTP_METHOD, requestLine.getMethod()); + } HttpParamsLinker.link(request, this.params); ProtocolVersion ver = request.getRequestLine().getProtocolVersion(); if (!ver.lessEquals(HttpVersion.HTTP_1_1)) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]