[jboss-svn-commits] JBoss Portal SVN: r5636 - in trunk: common/src/main/org/jboss/portal/common common/src/main/org/jboss/portal/common/http core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin server server/src/main/org/jboss/portal/test/framework/server/driver server/src/main/org/jboss/portal/test/server server/src/main/org/jboss/portal/test/server/parameters server/src/main/org/jboss/portal/test/server/response server/src/resources/test server/src/resources/test/test-response-sar server/src/resources/test/test-response-sar/META-INF server/src/resources/test/test-response-sar/conf test/src/main/org/jboss/portal/test/framework/driver/http test/src/main/org/jboss/portal/test/framework/driver/http/command test/src/main/org/jboss/portal/test/framework/driver/http/response

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Nov 13 19:12:58 EST 2006


Author: julien at jboss.com
Date: 2006-11-13 19:12:28 -0500 (Mon, 13 Nov 2006)
New Revision: 5636

Added:
   trunk/common/src/main/org/jboss/portal/common/http/
   trunk/common/src/main/org/jboss/portal/common/http/HttpHeader.java
   trunk/common/src/main/org/jboss/portal/common/http/HttpHeaders.java
   trunk/common/src/main/org/jboss/portal/common/http/HttpResponse.java
   trunk/server/src/main/org/jboss/portal/test/server/ResponseTestCase.java
   trunk/server/src/main/org/jboss/portal/test/server/Utils.java
   trunk/server/src/main/org/jboss/portal/test/server/response/
   trunk/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java
   trunk/server/src/resources/test/test-response-sar/
   trunk/server/src/resources/test/test-response-sar/META-INF/
   trunk/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml
   trunk/server/src/resources/test/test-response-sar/conf/
   trunk/server/src/resources/test/test-response-sar/conf/config.xml
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommandContext.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SendResponseCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponse.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponseContext.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SendResponseResponse.java
Removed:
   trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java
   trunk/server/src/resources/test/test-session-war/
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java
Modified:
   trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/editbinary.jsp
   trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/upload.jsp
   trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp
   trunk/server/build.xml
   trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java
   trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java
   trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java
   trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoGetCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoPostCommand.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokeGetResponse.java
   trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokePostResponse.java
Log:
add test case to properly check the encoding of the body of the http response

Added: trunk/common/src/main/org/jboss/portal/common/http/HttpHeader.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/http/HttpHeader.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/common/src/main/org/jboss/portal/common/http/HttpHeader.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,214 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.common.http;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Modelize an http header structure.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpHeader implements Serializable
+{
+
+   /** . */
+   private String name;
+
+   /** . */
+   private List elements = new ArrayList();
+
+   public HttpHeader(String name)
+   {
+      if (name == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      this.name = name;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public Element addElement(String name)
+   {
+      return addElement(new Element(name));
+   }
+
+   public Element addElement(String name, String value)
+   {
+      return addElement(new Element(name, value));
+   }
+
+   public Element addElement(Element element)
+   {
+      if (element == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      elements.add(element);
+      return element;
+   }
+
+   public Element getElement()
+   {
+      if (elements.size() > 0)
+      {
+         return (Element)elements.get(0);
+      }
+      return null;
+   }
+
+   public Iterator elements()
+   {
+      return elements.iterator();
+   }
+
+   /**
+    * An element of an header
+    */
+   public static class Element implements Serializable
+   {
+      /** The mandatory name. */
+      private String name;
+
+      /** The optional value. */
+      private String value;
+
+      /** The params. */
+      private List params;
+
+      public Element(String name)
+      {
+         this(name, null);
+      }
+
+      public Element(String name, String value)
+      {
+         if (name == null)
+         {
+            throw new IllegalArgumentException();
+         }
+         this.name = name;
+         this.value = value;
+         this.params = new ArrayList();
+      }
+
+      public String getName()
+      {
+         return name;
+      }
+
+      public String getValue()
+      {
+         return value;
+      }
+
+      public Param addParam(String name)
+      {
+         return addParam(new Param(name));
+      }
+
+      public Param addParam(String name, String value)
+      {
+         return addParam(new Param(name, value));
+      }
+
+      public Param addParam(Param param)
+      {
+         if (param == null)
+         {
+            throw new IllegalArgumentException();
+         }
+         params.add(param);
+         return param;
+      }
+
+      /**
+       * Return the first param of this element or null.
+       *
+       * @return the first param
+       */
+      public Param getParam()
+      {
+         if (params.size() > 0)
+         {
+            return (Param)params.get(0);
+         }
+         return null;
+      }
+
+      /**
+       * Returns an iterator over the params.
+       *
+       * @return a param iterator
+       */
+      public Iterator params()
+      {
+         return params.iterator();
+      }
+
+      /**
+       * A param of an element.
+       */
+      public static class Param implements Serializable
+      {
+         /** The mandatory name. */
+         private String name;
+
+         /** The optional value. */
+         private String value;
+
+         public Param(String name)
+         {
+            this(name, null);
+         }
+
+         public Param(String name, String value)
+         {
+            if (name == null)
+            {
+               throw new IllegalArgumentException();
+            }
+            this.name = name;
+            this.value = value;
+         }
+
+         public String getName()
+         {
+            return name;
+         }
+
+         public String getValue()
+         {
+            return value;
+         }
+      }
+   }
+}

Added: trunk/common/src/main/org/jboss/portal/common/http/HttpHeaders.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/http/HttpHeaders.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/common/src/main/org/jboss/portal/common/http/HttpHeaders.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,105 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.common.http;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpHeaders implements Serializable
+{
+
+   /** . */
+   private List headers = new ArrayList();
+
+   public HttpHeader addHeader(String name)
+   {
+      return addHeader(new HttpHeader(name));
+   }
+
+   public HttpHeader addHeader(HttpHeader header)
+   {
+      if (header == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      headers.add(header);
+      return header;
+   }
+
+   public HttpHeader getHeader(String name)
+   {
+      if (name == null)
+      {
+         throw new IllegalArgumentException();
+      }
+      for (Iterator i = headers.iterator();i.hasNext();)
+      {
+         HttpHeader header = (HttpHeader)i.next();
+         if (header.getName().equals(name))
+         {
+            return header;
+         }
+      }
+      return null;
+   }
+
+   public String toString()
+   {
+      StringBuffer buffer = new StringBuffer();
+      for (Iterator i = headers.iterator();i.hasNext();)
+      {
+         HttpHeader header = (HttpHeader)i.next();
+         buffer.append(header.getName()).append(": ");
+         for (Iterator j = header.elements();j.hasNext();)
+         {
+            HttpHeader.Element elt = (HttpHeader.Element)j.next();
+            buffer.append(elt.getName());
+            if (elt.getValue() != null)
+            {
+               buffer.append("=").append(elt.getValue());
+            }
+            for (Iterator k = elt.params();k.hasNext();)
+            {
+               HttpHeader.Element.Param param = (HttpHeader.Element.Param)k.next();
+               buffer.append(";").append(param.getName());
+               if (param.getValue() != null)
+               {
+                  buffer.append("=").append(param.getValue());
+               }
+            }
+            if (j.hasNext())
+            {
+               buffer.append(",");
+            }
+         }
+         buffer.append("\n");
+      }
+      return buffer.toString();
+   }
+}

Added: trunk/common/src/main/org/jboss/portal/common/http/HttpResponse.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/http/HttpResponse.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/common/src/main/org/jboss/portal/common/http/HttpResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,36 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.common.http;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpResponse
+{
+
+   private byte[] body;
+
+   
+
+}

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/editbinary.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/editbinary.jsp	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/editbinary.jsp	2006-11-14 00:12:28 UTC (rev 5636)
@@ -45,11 +45,11 @@
                <tr>
                   <td valign="top">${n:i18n("CMS_LIVE")}:</td>
                   <td valign="top"><input type="checkbox" name="makelive" checked
-                             class="portlet-form-input-field"/></td>
+                                          class="portlet-form-input-field"/></td>
                </tr>
                <tr>
                   <td colspan="2">
-                     <input type="file" size="32" name="content" value="" class="portlet-form-input-field"/>
+                     <input type="file" size="32" name="response" value="" class="portlet-form-input-field"/>
                      <br>
                      <input type="submit" name="submit" value="${n:i18n("CMS_UPLOAD")}" class="portlet-form-button"/>
                   </td>

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/upload.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/upload.jsp	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/upload.jsp	2006-11-14 00:12:28 UTC (rev 5636)
@@ -68,7 +68,7 @@
                </tr>
                <tr>
                   <td colspan="2" align="left">
-                     <input type="file" size="32" name="content" value="" class="portlet-form-input-field"/>
+                     <input type="file" size="32" name="response" value="" class="portlet-form-input-field"/>
                      <br><br>
                      <input type="submit" name="submit" value="${n:i18n("CMS_UPLOAD")}" class="portlet-form-button"/>
                   </td>

Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/cms/admin/uploadarchive.jsp	2006-11-14 00:12:28 UTC (rev 5636)
@@ -54,7 +54,7 @@
                </tr>
                <tr>
                   <td colspan="2">
-                     <input type="file" size="32" name="content" value="" class="portlet-form-input-field"/>
+                     <input type="file" size="32" name="response" value="" class="portlet-form-input-field"/>
                      <br><br>
                      <input type="submit" name="submit" value="${n:i18n("CMS_UPLOAD")}" class="portlet-form-button"/>
                   </td>

Modified: trunk/server/build.xml
===================================================================
--- trunk/server/build.xml	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/build.xml	2006-11-14 00:12:28 UTC (rev 5636)
@@ -238,6 +238,18 @@
             <fileset dir="${build.lib}" includes="portal-server-test-framework-lib.jar"/>
 	         <fileset dir="${build.resources}/test/test-charset-sar"/>
 	      </jar>      
+
+      <jar jarfile="${build.lib}/test-response.sar">
+         <fileset dir="${junit.junit.lib}" includes="junit.jar"/>
+         <fileset dir="${jboss.portal-test.root}/lib" includes="portal-test-lib.jar"/>
+         <fileset dir="${jboss.portal-common.root}/lib" includes="portal-common-lib.jar"/>
+         <fileset dir="${jboss.portal-jems.root}/lib" includes="portal-jems-lib.jar"/>
+         <fileset dir="${build.lib}" includes="test-agent.war"/>
+         <fileset dir="${build.lib}" includes="portal-server-lib.jar"/>
+         <fileset dir="${build.lib}" includes="portal-server-test-lib.jar"/>
+         <fileset dir="${build.lib}" includes="portal-server-test-framework-lib.jar"/>
+         <fileset dir="${build.resources}/test/test-response-sar"/>
+      </jar>
 	   </target>
 
    <!-- ================================================================== -->
@@ -298,9 +310,10 @@
          </x-sysproperty>
          <x-test>
             <!-- Server side tests -->
-            <test todir="${test.reports}" name="org.jboss.portal.test.server.CharsetTestCase"/>
-            <test todir="${test.reports}" name="org.jboss.portal.test.server.ParametersTestCase"/>
-            <test todir="${test.reports}" name="org.jboss.portal.test.server.ServletTestCase"/>
+            <!--<test todir="${test.reports}" name="org.jboss.portal.test.server.CharsetTestCase"/>-->
+            <!--<test todir="${test.reports}" name="org.jboss.portal.test.server.ParametersTestCase"/>-->
+            <!--<test todir="${test.reports}" name="org.jboss.portal.test.server.ServletTestCase"/>-->
+            <test todir="${test.reports}" name="org.jboss.portal.test.server.ResponseTestCase"/>
          </x-test>
          <x-classpath>
             <path refid="jboss.serialization.classpath"/>

Modified: trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/framework/server/driver/AbstractTest.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -27,6 +27,7 @@
 import org.jboss.portal.common.test.driver.DriverResponse;
 import org.jboss.portal.common.test.driver.DriverCommand;
 import org.jboss.portal.common.test.driver.TestDriverException;
+import org.jboss.portal.common.test.driver.response.ErrorResponse;
 import org.jboss.portal.common.test.driver.command.StartTestCommand;
 import org.jboss.portal.common.test.info.TestItemInfo;
 import org.jboss.portal.common.test.info.TestInfo;
@@ -56,23 +57,6 @@
    /** The test info. */
    private HttpTestContext context;
 
-   public DriverResponse invoke(String testId, DriverCommand cmd) throws TestDriverException
-   {
-      if (cmd instanceof StartTestCommand)
-      {
-         return new InvokeGetResponse(path);
-      }
-      else
-      {
-         throw new TestDriverException("Unrecognized command " + cmd);
-      }
-   }
-
-   public TestItemInfo getInfo()
-   {
-      return testInfo;
-   }
-
    public AbstractTest(String testCaseId, String path)
    {
       if (testCaseId == null)
@@ -90,6 +74,11 @@
       this.testInfo = new TestInfo(testCaseId);
    }
 
+   public TestItemInfo getInfo()
+   {
+      return testInfo;
+   }
+
    public HttpTestDriverRegistry getTestDriverRegistry()
    {
       return testDriverRegistry;
@@ -135,12 +124,52 @@
     */
    public void execute(ServerInvocation invocation)
    {
-      DriverResponse response = execute(invocation, context);
-      context.setResponse(response);
+      try
+      {
+         DriverResponse response = execute(invocation, context);
+         context.setResponse(response);
+      }
+      catch (Exception e)
+      {
+         context.setResponse(new ErrorResponse(e));
+      }
    }
 
    /**
     *
     */
-   public abstract DriverResponse execute(ServerInvocation invocation, HttpTestContext testContext);
+   public DriverResponse invoke(String testId, DriverCommand cmd) throws TestDriverException
+   {
+      if (cmd instanceof StartTestCommand)
+      {
+         return new InvokeGetResponse(path);
+      }
+      else
+      {
+         try
+         {
+            return execute(cmd, context);
+         }
+         catch (Exception e)
+         {
+            return new ErrorResponse(e);
+         }
+      }
+   }
+
+   /**
+    *
+    */
+   public DriverResponse execute(ServerInvocation invocation, HttpTestContext testContext) throws Exception
+   {
+      return new ErrorResponse("No default implementation");
+   }
+
+   /**
+    *
+    */
+   public DriverResponse execute(DriverCommand driverCommand, HttpTestContext testContext) throws Exception
+   {
+      return new ErrorResponse("No default implementation");
+   }
 }

Modified: trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/framework/server/driver/HttpTestDriverRegistryService.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -29,7 +29,6 @@
 import org.jboss.portal.common.test.driver.TestDriverException;
 import org.jboss.portal.common.test.driver.TestDriver;
 import org.jboss.portal.common.test.driver.DriverCommand;
-import org.jboss.portal.common.test.driver.command.StartTestCommand;
 import org.jboss.portal.common.test.info.TestItemInfo;
 import org.jboss.portal.common.test.info.TestContainerInfo;
 
@@ -134,25 +133,18 @@
 
    public DriverResponse invoke(String testId, DriverCommand cmd) throws TestDriverException
    {
-      if (cmd instanceof StartTestCommand)
+      TestItemInfo item = _container.findItem(testId);
+      if (item == null)
       {
-         TestItemInfo item = _container.findItem(testId);
-         if (item == null)
-         {
-            throw new TestDriverException("Driver not found for " + testId);
-         }
+         throw new TestDriverException("Driver not found for " + testId);
+      }
 
-         // Get associated test driver
-         TestDriver driver = getDriver(testId);
+      // Get associated test driver
+      TestDriver driver = getDriver(testId);
 
-         // Route the command to the target driver
-         String newTestId = item.getId(driver.getInfo());
-         return driver.invoke(newTestId, cmd);
-      }
-      else
-      {
-         throw new TestDriverException("Unrecognized command " + cmd);
-      }
+      // Route the command to the target driver
+      String newTestId = item.getId(driver.getInfo());
+      return driver.invoke(newTestId, cmd);
    }
 
    public TestItemInfo getInfo()

Added: trunk/server/src/main/org/jboss/portal/test/server/ResponseTestCase.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/ResponseTestCase.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/server/ResponseTestCase.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.server;
+
+import org.jboss.portal.test.framework.server.runner.ServerTestRunner;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResponseTestCase extends ServerTestRunner
+{
+   public ResponseTestCase()
+   {
+      super("test-response.sar");
+   }
+}

Copied: trunk/server/src/main/org/jboss/portal/test/server/Utils.java (from rev 5624, trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java)
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java	2006-11-11 02:05:27 UTC (rev 5624)
+++ trunk/server/src/main/org/jboss/portal/test/server/Utils.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.server;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision$
+ */
+public class Utils
+{
+
+   public static String RANGE_0_255 = computeFrom0To255();
+
+   public static String RANGE_256_512 = computeFrom256To512();
+
+   private static String computeFrom0To255()
+   {
+      return compute(0, 256);
+   }
+
+   private static String computeFrom256To512()
+   {
+      return compute(256, 512);
+   }
+
+   public static String compute(int from, int to)
+   {
+      if (from < 0)
+      {
+         throw new IllegalArgumentException();
+      }
+      if (from > to)
+      {
+         throw new IllegalArgumentException();
+      }
+      StringBuffer tmp = new StringBuffer();
+      for (int i = from; i < to; i++)
+      {
+         char c = (char)i;
+         tmp.append(c);
+      }
+      return tmp.toString();
+   }
+
+   public static String compareString(String s1, String s2)
+   {
+      if (s1 == null)
+      {
+         return "s1 is null";
+      }
+      if (s2 == null)
+      {
+         return "s2 is null";
+      }
+      if (s1.length() != s2.length())
+      {
+         return "lengths don't match " + s1.length() + "!=" + s2.length();
+      }
+      for (int i = s1.length() - 1; i >= 0; i--)
+      {
+         char c1 = s1.charAt(i);
+         char c2 = s2.charAt(i);
+         if (c1 != c2)
+         {
+            return "char at position " + i + " are diffrent " + (int)c1 + "!=" + (int)c2;
+         }
+      }
+      return null;
+   }
+
+}


Property changes on: trunk/server/src/main/org/jboss/portal/test/server/Utils.java
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/GetTest.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -31,6 +31,7 @@
 import org.jboss.portal.common.test.driver.DriverResponse;
 import org.jboss.portal.common.junit.ExtendedAssert;
 import org.jboss.portal.test.framework.server.driver.AbstractTest;
+import org.jboss.portal.test.server.Utils;
 
 import java.util.Map;
 

Modified: trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/PostApplicationXWWWFormURLEncodedTest.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -29,6 +29,7 @@
 import org.jboss.portal.common.test.driver.response.EndTestResponse;
 import org.jboss.portal.test.framework.driver.http.response.InvokePostResponse;
 import org.jboss.portal.test.framework.server.driver.AbstractTest;
+import org.jboss.portal.test.server.Utils;
 import org.jboss.portal.common.test.driver.DriverResponse;
 import org.jboss.portal.common.junit.ExtendedAssert;
 

Deleted: trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/server/parameters/Utils.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -1,84 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portal.test.server.parameters;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision$
- */
-public class Utils
-{
-
-   public static String RANGE_0_255 = computeFrom0To255();
-
-   public static String RANGE_256_512 = computeFrom256To512();
-
-   private static String computeFrom0To255()
-   {
-      StringBuffer tmp = new StringBuffer();
-      for (int i = 0; i < 256; i++)
-      {
-         char c = (char)i;
-         tmp.append(c);
-      }
-      return tmp.toString();
-   }
-
-   private static String computeFrom256To512()
-   {
-      StringBuffer tmp = new StringBuffer();
-      for (int i = 256; i < 512; i++)
-      {
-         char c = (char)i;
-         tmp.append(c);
-      }
-      return tmp.toString();
-   }
-
-   public static String compareString(String s1, String s2)
-   {
-      if (s1 == null)
-      {
-         return "s1 is null";
-      }
-      if (s2 == null)
-      {
-         return "s2 is null";
-      }
-      if (s1.length() != s2.length())
-      {
-         return "lengths don't match " + s1.length() + "!=" + s2.length();
-      }
-      for (int i = s1.length() - 1; i >= 0; i--)
-      {
-         char c1 = s1.charAt(i);
-         char c2 = s2.charAt(i);
-         if (c1 != c2)
-         {
-            return "char at position " + i + " are diffrent " + (int)c1 + "!=" + (int)c2;
-         }
-      }
-      return null;
-   }
-
-}

Added: trunk/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/main/org/jboss/portal/test/server/response/EncodeResponseTest.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.server.response;
+
+import org.jboss.portal.test.framework.server.driver.AbstractTest;
+import org.jboss.portal.test.framework.driver.http.HttpTestContext;
+import org.jboss.portal.test.framework.driver.http.command.SendResponseCommand;
+import org.jboss.portal.test.framework.driver.http.response.SendResponseResponse;
+import org.jboss.portal.test.server.Utils;
+import org.jboss.portal.common.test.driver.DriverResponse;
+import org.jboss.portal.common.test.driver.DriverCommand;
+import org.jboss.portal.common.test.driver.response.EndTestResponse;
+import org.jboss.portal.common.test.driver.response.ErrorResponse;
+import org.jboss.portal.common.junit.ExtendedAssert;
+import org.jboss.portal.server.ServerInvocation;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.PrintWriter;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 5570 $
+ */
+public class EncodeResponseTest extends AbstractTest
+{
+
+   /** . */
+   private static final String content = Utils.compute(0, 10000);
+
+   public EncodeResponseTest()
+   {
+      super("EncodeResponseTest", "/test");
+   }
+
+   public DriverResponse execute(ServerInvocation invocation, HttpTestContext testContext) throws IOException
+   {
+      if (testContext.isRequestCount(0))
+      {
+         HttpServletResponse resp = invocation.getServerContext().getClientResponse();
+         resp.setContentType("text/html");
+         resp.setCharacterEncoding("utf-8");
+         PrintWriter pw = resp.getWriter();
+         pw.print(content);
+         pw.close();
+         return new SendResponseResponse();
+      }
+      else
+      {
+         return new ErrorResponse();
+      }
+   }
+
+   public DriverResponse execute(DriverCommand driverCommand, HttpTestContext testContext) throws UnsupportedEncodingException
+   {
+      if (testContext.isRequestCount(1))
+      {
+         SendResponseCommand src = (SendResponseCommand)driverCommand;
+         byte[] bytes = src.getBytes();
+         String s = new String(bytes, "utf-8");
+         String result = Utils.compareString(content, s);
+         ExtendedAssert.assertEquals(null, result);
+         return new EndTestResponse();
+      }
+      else
+      {
+         return new ErrorResponse();
+      }
+   }
+}

Added: trunk/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/resources/test/test-response-sar/META-INF/jboss-service.xml	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,96 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ JBoss, a division of Red Hat                                              ~
+  ~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
+  ~ contributors as indicated by the @authors tag. See the                    ~
+  ~ copyright.txt in the distribution for a full listing of                   ~
+  ~ individual contributors.                                                  ~
+  ~                                                                           ~
+  ~ This is free software; you can redistribute it and/or modify it           ~
+  ~ under the terms of the GNU Lesser General Public License as               ~
+  ~ published by the Free Software Foundation; either version 2.1 of          ~
+  ~ the License, or (at your option) any later version.                       ~
+  ~                                                                           ~
+  ~ This software is distributed in the hope that it will be useful,          ~
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
+  ~ Lesser General Public License for more details.                           ~
+  ~                                                                           ~
+  ~ You should have received a copy of the GNU Lesser General Public          ~
+  ~ License along with this software; if not, write to the Free               ~
+  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
+  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+
+   <!--  -->
+   <mbean
+      code="org.jboss.portal.test.framework.server.driver.HttpTestDriverRegistryService"
+      name="portal.test:service=HttpTestDriverServer"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends
+         optional-attribute-name="Agent"
+         proxy-type="attribute">portal.test:service=Agent</depends>
+   </mbean>
+   <mbean
+      code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+      name="portal.test:service=Invoker,name=HttpTestDriverServer">
+      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
+      <depends optional-attribute-name="TargetName">portal.test:service=HttpTestDriverServer</depends>
+      <attribute name="JndiName">HttpTestDriverServer</attribute>
+      <attribute name="ExportedInterfaces">org.jboss.portal.test.framework.driver.http.HttpTestDriverServer</attribute>
+   </mbean>
+
+   <!-- Server configuration service -->
+   <mbean
+      code="org.jboss.portal.server.config.ServerConfigService"
+      name="portal:service=ServerConfig"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <attribute name="ConfigLocation">conf/config.xml</attribute>
+   </mbean>
+
+   <!-- Server -->
+   <mbean
+      code="org.jboss.portal.server.impl.ServerImpl"
+      name="portal:service=Server"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends optional-attribute-name="Config" proxy-type="attribute">portal:service=ServerConfig</depends>
+   </mbean>
+
+   <!-- Server stack -->
+   <mbean
+      code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
+      name="portal:service=InterceptorStackFactory,type=Server"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends-list optional-attribute-name="InterceptorNames">
+      </depends-list>
+   </mbean>
+
+   <!-- Controller -->
+   <mbean
+      code="org.jboss.portal.test.server.TestRequestController"
+      name="portal:controller=Request"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends optional-attribute-name="TestDriverRegistry" proxy-type="attribute">portal.test:service=HttpTestDriverServer</depends>
+   </mbean>
+
+   <!--  -->
+   <mbean
+      code="org.jboss.portal.test.server.response.EncodeResponseTest"
+      name="portal:test=EncodeResponse"
+      xmbean-dd=""
+      xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+      <xmbean/>
+      <depends optional-attribute-name="TestDriverRegistry" proxy-type="attribute">portal:controller=Request</depends>
+   </mbean>
+</server>
\ No newline at end of file

Added: trunk/server/src/resources/test/test-response-sar/conf/config.xml
===================================================================
--- trunk/server/src/resources/test/test-response-sar/conf/config.xml	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/server/src/resources/test/test-response-sar/conf/config.xml	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,25 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ JBoss, a division of Red Hat                                              ~
+  ~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
+  ~ contributors as indicated by the @authors tag. See the                    ~
+  ~ copyright.txt in the distribution for a full listing of                   ~
+  ~ individual contributors.                                                  ~
+  ~                                                                           ~
+  ~ This is free software; you can redistribute it and/or modify it           ~
+  ~ under the terms of the GNU Lesser General Public License as               ~
+  ~ published by the Free Software Foundation; either version 2.1 of          ~
+  ~ the License, or (at your option) any later version.                       ~
+  ~                                                                           ~
+  ~ This software is distributed in the hope that it will be useful,          ~
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
+  ~ Lesser General Public License for more details.                           ~
+  ~                                                                           ~
+  ~ You should have received a copy of the GNU Lesser General Public          ~
+  ~ License along with this software; if not, write to the Free               ~
+  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
+  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<properties>
+</properties>

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -22,12 +22,15 @@
  ******************************************************************************/
 package org.jboss.portal.test.framework.driver.http;
 
-import org.jboss.portal.test.framework.driver.http.command.HttpCommand;
+import org.jboss.portal.test.framework.driver.http.command.HttpDriverCommand;
 import org.jboss.portal.test.framework.driver.http.command.DoPostCommand;
 import org.jboss.portal.test.framework.driver.http.command.DoGetCommand;
-import org.jboss.portal.test.framework.driver.http.response.HttpResponse;
+import org.jboss.portal.test.framework.driver.http.command.SendResponseCommand;
+import org.jboss.portal.test.framework.driver.http.command.HttpDriverCommandContext;
+import org.jboss.portal.test.framework.driver.http.response.HttpDriverResponse;
 import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
 import org.jboss.portal.test.framework.driver.http.response.InvokePostResponse;
+import org.jboss.portal.test.framework.driver.http.response.HttpDriverResponseContext;
 import org.jboss.portal.common.test.driver.command.StartTestCommand;
 import org.jboss.portal.common.test.driver.TestDriver;
 import org.jboss.portal.common.test.driver.DriverResponse;
@@ -36,6 +39,8 @@
 import org.jboss.portal.common.test.driver.response.ErrorResponse;
 import org.jboss.portal.common.test.driver.response.FailureResponse;
 import org.jboss.portal.common.test.info.TestItemInfo;
+import org.jboss.portal.common.http.HttpHeader;
+import org.jboss.portal.common.http.HttpHeaders;
 import org.jboss.portal.test.framework.server.Node;
 import org.jboss.portal.test.framework.server.NodeId;
 import org.jboss.portal.test.framework.server.NodeManager;
@@ -50,6 +55,7 @@
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.UsernamePasswordCredentials;
 import org.apache.commons.httpclient.SimpleHttpConnectionManager;
+import org.apache.commons.httpclient.HeaderElement;
 import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.commons.httpclient.params.HttpMethodParams;
 import org.apache.log4j.Logger;
@@ -149,7 +155,7 @@
          TestConversation conversation = new TestConversation(testId, node);
 
          //
-         return conversation.handleCommand(cmd);
+         return conversation.handleCommand(new HttpDriverCommandContext(cmd));
       }
       catch (Exception e)
       {
@@ -186,44 +192,76 @@
          client.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("test", "test"));
       }
 
-      private DriverResponse handleCommand(DriverCommand cmd) throws Exception
+      private DriverResponse handleCommand(HttpDriverCommandContext cmdCtx) throws Exception
       {
-         DriverResponse resp = invokeHttp(cmd);
-         if (resp instanceof HttpResponse)
+         HttpDriverResponseContext respCtx = invokeHttp(cmdCtx);
+         if (respCtx.getResponse() instanceof HttpDriverResponse)
          {
-            HttpResponse httpResp = (HttpResponse)resp;
-            HttpCommand httpCmd = createHttpCommand(httpResp);
-            return handleCommand(httpCmd);
+            HttpDriverCommand httpCmdDriver = createHttpCommand(respCtx);
+            return handleCommand(new HttpDriverCommandContext(respCtx, httpCmdDriver));
          }
          else
          {
-            return resp;
+            return respCtx.getResponse();
          }
       }
 
       /**
        * Create an http command from an http response.
        */
-      private HttpCommand createHttpCommand(HttpResponse httpResp) throws Exception
+      private HttpDriverCommand createHttpCommand(HttpDriverResponseContext respCtx) throws Exception
       {
-         if (httpResp instanceof InvokeGetResponse)
+         DriverResponse resp = respCtx.getResponse();
+         if (resp instanceof InvokeGetResponse)
          {
-            InvokeGetResponse igr = (InvokeGetResponse)httpResp;
+            InvokeGetResponse igr = (InvokeGetResponse)resp;
             return new DoGetCommand(igr.getURL(), igr.getHeaders());
          }
-         else
+         else if (resp instanceof InvokePostResponse)
          {
-            InvokePostResponse ipr = (InvokePostResponse)httpResp;
+            InvokePostResponse ipr = (InvokePostResponse)resp;
             DoPostCommand.Body dpcb = ipr.getBody().getBody();
             return new DoPostCommand(ipr.getURL(), ipr.getContentType(), dpcb);
          }
+         else
+         {
+            HttpMethod method = respCtx.getHttpMethod();
+            byte[] body = method.getResponseBody();
+            HttpHeaders _headers = new HttpHeaders();
+            Header[] headers = method.getResponseHeaders();
+            for (int i = 0;i < headers.length;i++)
+            {
+               Header header = headers[i];
+               HttpHeader _header = _headers.addHeader(header.getName());
+               HeaderElement[] elts = header.getElements();
+               if (elts != null)
+               {
+                  for (int j = 0;j < elts.length;j++)
+                  {
+                     HeaderElement elt = elts[j];
+                     HttpHeader.Element _elt = _header.addElement(elt.getName(), elt.getValue());
+                     NameValuePair[] params = elt.getParameters();
+                     if (params != null)
+                     {
+                        for (int k = 0;k < params.length;k++)
+                        {
+                           NameValuePair param = params[k];
+                           _elt.addParam(param.getName(), param.getValue());
+                        }
+                     }
+                  }
+               }
+            }
+            return new SendResponseCommand(_headers, body);
+         }
       }
 
       /**
        *
        */
-      private DriverResponse invokeHttp(DriverCommand cmd) throws Exception
+      private HttpDriverResponseContext invokeHttp(HttpDriverCommandContext cmdCtx) throws Exception
       {
+         DriverCommand cmd = cmdCtx.getCommand();
          if (cmd instanceof DoPostCommand)
          {
             DoPostCommand doPostCmd = (DoPostCommand)cmd;
@@ -306,21 +344,26 @@
             pushContext();
             DriverResponse response = getServer().invoke(testId, cmd);
             requestCount = 0;
-            return response;
+            return new HttpDriverResponseContext(response);
          }
+         else if (cmd instanceof SendResponseCommand)
+         {
+            pushContext();
+            DriverResponse response = getServer().invoke(testId, cmd);
+            requestCount++;
+            return new HttpDriverResponseContext(response);
+         }
          else
          {
-            return new ErrorResponse("Unexpected response");
+            return new HttpDriverResponseContext(new ErrorResponse("Unexpected response"));
          }
       }
 
-
-
-      private DriverResponse decodeHttpResponse(HttpMethod hm) throws Exception
+      private HttpDriverResponseContext decodeHttpResponse(HttpMethod httpMethod) throws Exception
       {
          HttpTestContext ctx = popContext();
          DriverResponse response = ctx.getResponse();
-         int status = hm.getStatusCode();
+         int status = httpMethod.getStatusCode();
          switch (status)
          {
             case 200:
@@ -332,7 +375,7 @@
                {
                   log.info("# Received '200' code");
                   requestCount++;
-                  return response;
+                  return new HttpDriverResponseContext(httpMethod, response);
                }
                // Send redirect
             case 302:
@@ -341,17 +384,20 @@
                {
                   log.info("# Received Result object which overrides the 302");
                   requestCount++;
-                  return response;
+                  return new HttpDriverResponseContext(httpMethod, response);
                }
 
                // Otherwise satisfy the 302 code
-               Header locationHeader = hm.getResponseHeader("location");
+               Header locationHeader = httpMethod.getResponseHeader("location");
                if (locationHeader != null)
                {
                   String redirectLocation = locationHeader.getValue();
                   log.info("# Received '302' code --> " + redirectLocation);
                   DoGetCommand cmd = new DoGetCommand(redirectLocation);
-                  return invokeHttp(cmd);
+
+                  // For now we don't add any contextual payload as
+                  // 302 is some kind of implicit redirect response
+                  return invokeHttp(new HttpDriverCommandContext(cmd));
                }
                else
                {
@@ -360,12 +406,12 @@
                }
             case 500:
                log.info("# Received '500' code");
-               return new FailureResponse("Received '500' code at " + hm.getURI());
+               return new HttpDriverResponseContext(httpMethod, new FailureResponse("Received '500' code at " + httpMethod.getURI()));
             case 404:
                log.info("# Received '404' code");
-               return new FailureResponse("Received '404' code at " + hm.getURI());
+               return new HttpDriverResponseContext(httpMethod, new FailureResponse("Received '404' code at " + httpMethod.getURI()));
             default:
-               return new ErrorResponse("Unexpected http code " + status + " at " + hm.getURI());
+               return new HttpDriverResponseContext(httpMethod, new ErrorResponse("Unexpected http code " + status + " at " + httpMethod.getURI()));
          }
       }
 
@@ -401,8 +447,13 @@
 
          //
          log.info("# Invoking test case over http " + cfg + " " + method.getURI());
+         int status = client.executeMethod(cfg, method);
 
-         return client.executeMethod(cfg, method);
+         // Force to read the response body before we close the connection
+         // otherwise the content will be lost
+         method.getResponseBody();
+
+         return status;
       }
 
       private void pushContext()

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoGetCommand.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoGetCommand.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoGetCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -31,7 +31,7 @@
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 5448 $
  */
-public class DoGetCommand extends HttpCommand
+public class DoGetCommand extends HttpDriverCommand
 {
 
    /** . */

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoPostCommand.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoPostCommand.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/DoPostCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -28,7 +28,7 @@
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 5448 $
  */
-public class DoPostCommand extends HttpCommand
+public class DoPostCommand extends HttpDriverCommand
 {
 
    private String url;

Deleted: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portal.test.framework.driver.http.command;
-
-import org.jboss.portal.common.test.driver.DriverCommand;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class HttpCommand extends DriverCommand
-{
-}

Copied: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommand.java (from rev 5624, trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java)
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpCommand.java	2006-11-11 02:05:27 UTC (rev 5624)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.command;
+
+import org.jboss.portal.common.test.driver.DriverCommand;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpDriverCommand extends DriverCommand
+{
+}

Added: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommandContext.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommandContext.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/HttpDriverCommandContext.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.command;
+
+import org.jboss.portal.common.test.driver.DriverCommand;
+import org.jboss.portal.test.framework.driver.http.response.HttpDriverResponseContext;
+
+/**
+ * The context of the command invoked by the client.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpDriverCommandContext
+{
+
+   /** The previous response if not null. */
+   private HttpDriverResponseContext responseContext;
+
+   /** The command to invoke. */
+   private DriverCommand command;
+
+   public HttpDriverCommandContext(HttpDriverResponseContext responseContext, DriverCommand command)
+   {
+      this.responseContext = responseContext;
+      this.command = command;
+   }
+
+   public HttpDriverCommandContext(DriverCommand command)
+   {
+      this.command = command;
+   }
+
+   public HttpDriverResponseContext getResponseContext()
+   {
+      return responseContext;
+   }
+
+   public DriverCommand getCommand()
+   {
+      return command;
+   }
+}

Copied: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SendResponseCommand.java (from rev 5629, trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java)
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SendResponseCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.command;
+
+import org.jboss.portal.common.http.HttpHeaders;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SendResponseCommand extends HttpDriverCommand
+{
+
+   /** . */
+   private HttpHeaders headers;
+
+   /** . */
+   private byte[] bytes;
+
+   public SendResponseCommand(HttpHeaders headers, byte[] bytes)
+   {
+      this.headers = headers;
+      this.bytes = bytes;
+   }
+
+   public HttpHeaders getHeaders()
+   {
+      return headers;
+   }
+
+   public byte[] getBytes()
+   {
+      return bytes;
+   }
+}

Deleted: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/command/SubmitResponseCommand.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -1,38 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portal.test.framework.driver.http.command;
-
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class SubmitResponseCommand extends HttpCommand
-{
-
-   private Map headers;
-
-   private byte[] bytes;
-
-}

Copied: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponse.java (from rev 5624, trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java)
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java	2006-11-11 02:05:27 UTC (rev 5624)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.response;
+
+import org.jboss.portal.common.test.driver.DriverResponse;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpDriverResponse extends DriverResponse
+{
+}

Added: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponseContext.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponseContext.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpDriverResponseContext.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.response;
+
+import org.apache.commons.httpclient.HttpMethod;
+import org.jboss.portal.common.test.driver.DriverResponse;
+
+/**
+ * The context of the response received by the client.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HttpDriverResponseContext
+{
+
+   /** The http method if not null. */
+   private HttpMethod httpMethod;
+
+   /** . */
+   private DriverResponse response;
+
+
+   public HttpDriverResponseContext(HttpMethod httpMethod, DriverResponse response)
+   {
+      this.httpMethod = httpMethod;
+      this.response = response;
+   }
+
+   public HttpDriverResponseContext(DriverResponse response)
+   {
+      this(null, response);
+   }
+
+   public HttpMethod getHttpMethod()
+   {
+      return httpMethod;
+   }
+
+   public DriverResponse getResponse()
+   {
+      return response;
+   }
+}

Deleted: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/HttpResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portal.test.framework.driver.http.response;
-
-import org.jboss.portal.common.test.driver.DriverResponse;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class HttpResponse extends DriverResponse
-{
-}

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokeGetResponse.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokeGetResponse.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokeGetResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -22,8 +22,6 @@
  ******************************************************************************/
 package org.jboss.portal.test.framework.driver.http.response;
 
-import org.jboss.portal.common.test.driver.DriverResponse;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -32,7 +30,7 @@
  * @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
  * @version $Revision: 5448 $
  */
-public class InvokeGetResponse extends HttpResponse
+public class InvokeGetResponse extends HttpDriverResponse
 {
 
    /** The serialVersionUID */

Modified: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokePostResponse.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokePostResponse.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/InvokePostResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -23,7 +23,6 @@
 package org.jboss.portal.test.framework.driver.http.response;
 
 import org.jboss.portal.test.framework.driver.http.command.DoPostCommand;
-import org.jboss.portal.common.test.driver.DriverResponse;
 
 import java.io.Serializable;
 import java.util.Collections;
@@ -37,7 +36,7 @@
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 5448 $
  */
-public class InvokePostResponse extends HttpResponse
+public class InvokePostResponse extends HttpDriverResponse
 {
 
    /** The serialVersionUID */

Copied: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SendResponseResponse.java (from rev 5629, trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java)
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java	2006-11-13 16:39:12 UTC (rev 5629)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SendResponseResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.test.framework.driver.http.response;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SendResponseResponse extends HttpDriverResponse
+{
+}

Deleted: trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java	2006-11-13 23:11:18 UTC (rev 5635)
+++ trunk/test/src/main/org/jboss/portal/test/framework/driver/http/response/SubmitResponseResponse.java	2006-11-14 00:12:28 UTC (rev 5636)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
- * contributors as indicated by the @authors tag. See the                     *
- * copyright.txt in the distribution for a full listing of                    *
- * individual contributors.                                                   *
- *                                                                            *
- * This is free software; you can redistribute it and/or modify it            *
- * under the terms of the GNU Lesser General Public License as                *
- * published by the Free Software Foundation; either version 2.1 of           *
- * the License, or (at your option) any later version.                        *
- *                                                                            *
- * This software is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
- * Lesser General Public License for more details.                            *
- *                                                                            *
- * You should have received a copy of the GNU Lesser General Public           *
- * License along with this software; if not, write to the Free                *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
- ******************************************************************************/
-package org.jboss.portal.test.framework.driver.http.response;
-
-/**
- * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class SubmitResponseResponse extends HttpResponse
-{
-}




More information about the jboss-svn-commits mailing list