tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r1042738 - in /tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http: format/ provider/
Date Mon, 06 Dec 2010 17:34:21 GMT
Author: lresende
Date: Mon Dec  6 17:34:20 2010
New Revision: 1042738

URL: http://svn.apache.org/viewvc?rev=1042738&view=rev
Log:
Removing duplicated HTTPContext class from binding-http and using the one from common-http

Removed:
    tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPContext.java
Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultServiceOperationSelectorInterceptor.java
    tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultWireFormatServiceInterceptor.java
    tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPXMLWireFormatServiceInterceptor.java
    tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultServiceOperationSelectorInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultServiceOperationSelectorInterceptor.java?rev=1042738&r1=1042737&r2=1042738&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultServiceOperationSelectorInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultServiceOperationSelectorInterceptor.java
Mon Dec  6 17:34:20 2010
@@ -23,7 +23,7 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.tuscany.sca.binding.http.provider.HTTPContext;
+import org.apache.tuscany.sca.common.http.HTTPContext;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Interceptor;
@@ -56,7 +56,7 @@ public class HTTPDefaultServiceOperation
     @Override
     public Message invoke(Message msg) {
         HTTPContext context = msg.getBindingContext();
-        HttpServletRequest request = context.getRequest();
+        HttpServletRequest request = context.getHttpRequest();
         String path = request.getPathInfo();
         if (path.startsWith("/")) {
             path = path.substring(1);

Modified: tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultWireFormatServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultWireFormatServiceInterceptor.java?rev=1042738&r1=1042737&r2=1042738&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultWireFormatServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPDefaultWireFormatServiceInterceptor.java
Mon Dec  6 17:34:20 2010
@@ -35,7 +35,7 @@ import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.tuscany.sca.binding.http.provider.HTTPContext;
+import org.apache.tuscany.sca.common.http.HTTPContext;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Interceptor;
@@ -87,7 +87,7 @@ public class HTTPDefaultWireFormatServic
 
     private Message invokeRequest(Message msg) throws IOException {
         HTTPContext context = msg.getBindingContext();
-        HttpServletRequest servletRequest = context.getRequest();
+        HttpServletRequest servletRequest = context.getHttpRequest();
         if ("GET".equals(servletRequest.getMethod())) {
             msg.setBody(getRequestFromQueryString(msg.getOperation(), servletRequest));
         } else {
@@ -120,8 +120,8 @@ public class HTTPDefaultWireFormatServic
 
     private Message invokeResponse(Message msg) throws IOException {
         HTTPContext context = msg.getBindingContext();
-        HttpServletRequest servletRequest = context.getRequest();
-        HttpServletResponse servletResponse = context.getResponse();
+        HttpServletRequest servletRequest = context.getHttpRequest();
+        HttpServletResponse servletResponse = context.getHttpResponse();
         
         if (msg.isFault()) {            
             servletResponse.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, String.valueOf(msg.getBody()));

Modified: tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPXMLWireFormatServiceInterceptor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPXMLWireFormatServiceInterceptor.java?rev=1042738&r1=1042737&r2=1042738&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPXMLWireFormatServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/format/HTTPXMLWireFormatServiceInterceptor.java
Mon Dec  6 17:34:20 2010
@@ -34,7 +34,7 @@ import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.tuscany.sca.binding.http.provider.HTTPContext;
+import org.apache.tuscany.sca.common.http.HTTPContext;
 import org.apache.tuscany.sca.common.xml.dom.DOMHelper;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.util.FaultException;
@@ -80,7 +80,7 @@ public class HTTPXMLWireFormatServiceInt
 
     private Message invokeRequest(Message msg) throws IOException, SAXException {
         HTTPContext context = msg.getBindingContext();
-        HttpServletRequest servletRequest = context.getRequest();
+        HttpServletRequest servletRequest = context.getHttpRequest();
         if ("GET".equals(servletRequest.getMethod())) {
             msg.setBody(getRequestFromQueryString(msg.getOperation(), servletRequest));
         } else {
@@ -91,7 +91,7 @@ public class HTTPXMLWireFormatServiceInt
 
     private Message invokeResponse(Message msg) throws IOException {
         HTTPContext context = msg.getBindingContext();
-        HttpServletResponse servletResponse = context.getResponse();
+        HttpServletResponse servletResponse = context.getHttpResponse();
 
         servletResponse.setContentType("text/xml");
         

Modified: tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java?rev=1042738&r1=1042737&r2=1042738&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingServiceServlet.java
Mon Dec  6 17:34:20 2010
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.tuscany.sca.common.http.HTTPContext;
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
@@ -44,8 +45,8 @@ public class HTTPBindingServiceServlet e
     @Override
     protected void service(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
         HTTPContext bindingContext = new HTTPContext();
-        bindingContext.setRequest(request);
-        bindingContext.setResponse(response);
+        bindingContext.setHttpRequest(request);
+        bindingContext.setHttpResponse(response);
         Message msg = messageFactory.createMessage();
         msg.setBindingContext(bindingContext);
         wire.invoke(msg);



Mime
View raw message