You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by jo...@apache.org on 2005/10/26 23:13:47 UTC

svn commit: r328736 [1/2] - in /webservices/xmlrpc/branches/b20050512_streaming: ./ .settings/ src/java/org/apache/xmlrpc/serializer/ src/java/org/apache/xmlrpc/util/ src/java/org/apache/xmlrpc/webserver/

Author: jochen
Date: Wed Oct 26 14:13:21 2005
New Revision: 328736

URL: http://svn.apache.org/viewcvs?rev=328736&view=rev
Log:
First work on a basic servlet container implementation, for test purposes.

Added:
    webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.ui.prefs
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletResponseImpl.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/ServletConnection.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/ServletOutputStreamImpl.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/ServletWebServer.java
Modified:
    webservices/xmlrpc/branches/b20050512_streaming/.classpath
    webservices/xmlrpc/branches/b20050512_streaming/.project
    webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.core.prefs
    webservices/xmlrpc/branches/b20050512_streaming/build.xml
    webservices/xmlrpc/branches/b20050512_streaming/project.xml
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/ByteArraySerializer.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/SerializableSerializer.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/util/HttpUtil.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/Connection.java
    webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/WebServer.java

Modified: webservices/xmlrpc/branches/b20050512_streaming/.classpath
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/.classpath?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/.classpath (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/.classpath Wed Oct 26 14:13:21 2005
@@ -1,14 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <classpath>
-	<classpathentry kind="src" path="src/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry sourcepath="lib/ws-commons-java5-src.zip" kind="lib" path="lib/ws-commons-java5.jar"/>
-	<classpathentry sourcepath="lib/ws-commons-util-src.zip" kind="lib" path="lib/ws-commons-util.jar"/>
-	<classpathentry kind="src" path="src/test"/>
-	<classpathentry kind="lib" path="lib/junit-3.8.1.jar"/>
-	<classpathentry kind="lib" path="lib/commons-httpclient-2.0.2.jar"/>
-	<classpathentry kind="lib" path="lib/commons-logging.jar"/>
-	<classpathentry kind="lib" path="lib/jaxmeapi-0.4.jar"/>
-	<classpathentry kind="lib" path="lib/servletapi-2.2.jar"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+  <classpathentry excluding="" kind="src" path="src/java">
+  </classpathentry>
+  <classpathentry output="target/test-classes" kind="src" path="src/test">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
+  </classpathentry>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.2.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/servletapi/jars/servletapi-2.4.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/ws-commons-util/jars/ws-commons-util-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/ws-commons-java5/jars/ws-commons-java5-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/jaxme/jars/jaxmeapi-0.5.jar">
+  </classpathentry>
+  <classpathentry kind="output" path="target/classes">
+  </classpathentry>
+</classpath>
\ No newline at end of file

Modified: webservices/xmlrpc/branches/b20050512_streaming/.project
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/.project?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/.project (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/.project Wed Oct 26 14:13:21 2005
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <projectDescription>
-	<name>ws-xmlrpc</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
+  <name>xmlrpc</name>
+  <comment>Apache XML-RPC is a Java implementation of , a popular protocol that uses XML over HTTP to implement remote procedure calls. Apache XML-RPC was previously known as Helma XML-RPC. If you have code using the Helma library, all you should have to do is change the import statements in your code from helma.xmlrpc.* to org.apache.xmlrpc.*.</comment>
+  <projects>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Modified: webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.core.prefs?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.core.prefs (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.core.prefs Wed Oct 26 14:13:21 2005
@@ -1,4 +1,4 @@
-#Thu May 05 03:42:51 CEST 2005
+#Wed Aug 24 21:47:52 CEST 2005
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning

Added: webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.ui.prefs?rev=328736&view=auto
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.ui.prefs (added)
+++ webservices/xmlrpc/branches/b20050512_streaming/.settings/org.eclipse.jdt.ui.prefs Wed Oct 26 14:13:21 2005
@@ -0,0 +1,4 @@
+#Thu May 26 13:14:49 CEST 2005
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 1999,2005 The Apache Software Foundation.\n * \n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *      http\://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n</template><template context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>

Modified: webservices/xmlrpc/branches/b20050512_streaming/build.xml
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/build.xml?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/build.xml (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/build.xml Wed Oct 26 14:13:21 2005
@@ -1,512 +1,172 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 
-<project name="xmlrpc" default="jar" basedir=".">
+<!--build.xml generated by maven from project.xml version 3.0-dev
+  on date October 26 2005, time 2200-->
 
-  <!-- Properties which are not allowed to be overridden -->
-  <property name="version" value="2.0-beta"/>
-
-  <!-- Allow any locally-specified values to override the defaults -->
-  <property file="build.properties" />
-
-  <!-- Allow any user specific values to override the defaults -->
-  <property file="${user.home}/build.properties" />
-
-  <!-- Set default values for the build -->
-  <property file="default.properties" />
-
-  <!-- Source version -->
-  <property name="source.version" value="1.2"/>
-
-  <!-- Target version -->
-  <property name="target.version" value="1.1"/>
-
-  <!-- Construct compile classpath -->
-  <path id="classpath">
-    <pathelement location="${jsse.jar}"/>
-    <pathelement location="${jnet.jar}"/>
-    <pathelement location="${jcert.jar}"/>
-    <pathelement location="${servlet.jar}"/>
-    <pathelement location="${junit.jar}"/>
-    <pathelement location="${commons-httpclient.jar}"/>
-    <pathelement location="${commons-logging.jar}"/>
-    <pathelement location="${commons-codec.jar}"/>
+<project default="jar" name="xmlrpc" basedir=".">
+  <property name="defaulttargetdir" value="target">
+  </property>
+  <property name="libdir" value="target/lib">
+  </property>
+  <property name="classesdir" value="target/classes">
+  </property>
+  <property name="testclassesdir" value="target/test-classes">
+  </property>
+  <property name="testclassesdir" value="target/test-classes">
+  </property>
+  <property name="testreportdir" value="target/test-reports">
+  </property>
+  <property name="distdir" value="dist">
+  </property>
+  <property name="javadocdir" value="dist/docs/api">
+  </property>
+  <property name="final.name" value="xmlrpc-3.0-dev">
+  </property>
+  <path id="build.classpath">
+    <fileset dir="${libdir}">
+      <include name="**/*.jar">
+      </include>
+    </fileset>
   </path>
+  <target name="init" description="o Initializes some properties">
+    <mkdir dir="${libdir}">
+    </mkdir>
+    <condition property="noget">
+      <equals arg2="only" arg1="${build.sysclasspath}">
+      </equals>
+    </condition>
+    <!--Test if JUNIT is present in ANT classpath-->
 
-  <!-- ================================================================== -->
-  <!-- E N V I R O N M E N T                                              -->
-  <!-- ================================================================== -->
-  
-  <target name="env" description="Dumps the environment settings">
-    <echo message="lib.repo = ${lib.repo}"/>
-    <echo message="java.home = ${java.home}"/>
-    <echo message="user.home = ${user.home}"/>
-    <echo message="jsse.jar = ${jsse.jar}"/>
-    <echo message="jnet.jar = ${jnet.jar}"/>
-    <echo message="jcert.jar = ${jcert.jar}"/>
-    <echo message="servlet.jar = ${servlet.jar}"/>
-    <echo message="junit.jar = ${junit.jar}"/>
-    <echo message="commons-httpclient.jar = ${commons-httpclient.jar}"/>
-    <echo message="commons-logging.jar = ${commons-logging.jar}"/>
-    <echo message="commons-codec.jar = ${commons-codec.jar}"/>
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- D E P E N D E N C I E S                                            -->
-  <!-- ================================================================== -->
-
-  <target name="copy-deps" description="Copy dependent JARs into the lib folder"
-     unless="have.deps" depends="setup.proxy">
-    <mkdir dir="${lib.repo}"/>
-    <get dest="${lib.repo}/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
-    </get>
-    <get dest="${lib.repo}/commons-logging-1.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.2.jar">
-    </get>
-    <get dest="${lib.repo}/commons-codec-1.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven//commons-codec/jars/commons-codec-1.1.jar">
-    </get>
-    <get dest="${lib.repo}/servletapi-2.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.2.jar">
-    </get>
-    <get dest="${lib.repo}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar">
-    </get>
-  </target>
-
-  <target name="setup.proxy" depends="setup.proxy.if,setup.proxy.unless"/>
-
-  <target name="setup.proxy.if" if="http.proxyHost">
-    <echo>Using proxy server ${http.proxyHost} at port ${http.proxyPort}</echo>
-    <setproxy proxyhost="${http.proxyHost}" proxyport="${http.proxyPort}"/>
-  </target>
-
-  <target name="setup.proxy.unless" unless="http.proxyHost">
-    <echo>Property http.proxyHost not set, using no proxy</echo> 
-  </target>
-   
-  <!-- ================================================================== -->
-  <!-- U S A G E                                                          -->
-  <!-- ================================================================== -->
-  
-  <target name="usage">
-    <echo message="use -projecthelp to see the available targets"/>
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- I N I T                                                            -->
-  <!-- ================================================================== -->
-
-  <target name="init" depends="env,copy-deps">
-    <available 
-      classname="com.sun.net.ssl.SSLContext"
-      property="jsse.present"
-      classpathref="classpath"
-    />
-    
-    <available 
-      classname="javax.servlet.Servlet"
-      property="servlet.present"
-      classpathref="classpath"
-    />
-    
-    <available 
-      classname="org.apache.xerces.parsers.SAXParser"
-      property="xerces.present"
-      classpathref="classpath"
-    />
-
-    <available
-      classname="junit.framework.TestCase"
-      property="junit.present"
-      classpathref="classpath"
-    />
-
-    <available
-      classname="org.apache.commons.logging.LogFactory"
-      property="commons-logging.present"
-      classpathref="classpath"
-    />
-
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- P R O P E R T Y  C H E C K S  A N D  W A R N I N G S               -->
-  <!-- ================================================================== -->
-  
-  <!-- No additional classes are required to compile the
-       core package. If you wish to use the SSL extensions
-       or the XmlRpcProxyServlet than you can make the
-       necessary properties changes. -->
-  
-  <target name="check.jsse" unless="jsse.present">
-    <antcall target="property-warning">
-      <param name="name" value="jsse.jar"/>
-      <param name="value" value="${jsse.jar}"/>
-    </antcall>
-  </target>
-
-  <target name="check.junit" unless="junit.present">
-    <antcall target="property-warning">
-      <param name="name" value="junit.jar"/>
-      <param name="value" value="${junit.jar}"/>
-    </antcall>
-  </target>
-
-  <target name="check.commons-logging" unless="commons-logging.present">
-    <antcall target="property-warning">
-      <param name="name" value="commons-logging.jar"/>
-      <param name="value" value="${commons-logging.jar}"/>
-    </antcall>
-  </target>
-
-  <target name="property-warning">
-    <echo>
-      +----------------------------------------------------------------+
-      + F A I L E D  R E Q U I R E M E N T                             |
-      +----------------------------------------------------------------+
-      | You must define the following property in order                |
-      | to build XML-RPC:                                              |
-      |                                                                |
-      | ${name} = ${value}
-      |                                                                |
-      | You can set this property in the provided build.properties     |
-      | file, or you may set this property in your                     |
-      | ${user.home}/build.properties file.                            
-      +----------------------------------------------------------------+
-    </echo>
-    <fail message="Failed Requirement"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- P R E P A R E                                                       -->
-  <!-- =================================================================== -->
-
-  <target name="prepare" depends="init">
-    <mkdir dir="${build.dir}"/>
-    <mkdir dir="${build.dest}"/>
+    <available property="Junit.present" classname="junit.framework.Test">
+    </available>
   </target>
-
-  <!-- ================================================================== -->
-  <!-- C O M P I L E                                                      -->
-  <!-- ================================================================== -->
-  
-  <target name="compile" depends="prepare" description="Compiles the source code">
-    <javac 
-      srcdir="${src.dir}"
-      destdir="${build.dest}"
-      debug="${debug}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      source="${source.version}"
-      target="${target.version}"   
-    >
-      <classpath refid="classpath"/>
-
-      <!-- We don't care about the JavaScript interpreter or the the
-      applet code so we'll just exclude it from the build. For now,
-      all we want is the client and server code.  -->
-      <include name="**/*.java"/>
-      <exclude name="**/fesi/**"/>
-      <exclude name="**/secure/**" unless="jsse.present"/>
-      <exclude name="**/XmlRpcProxyServlet.java" unless="servlet.present"/>
-      <exclude name="**/test/**"/>
+  <target name="compile" description="o Compile the code" depends="get-deps">
+    <mkdir dir="${classesdir}">
+    </mkdir>
+    <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+      <src>
+        <pathelement location="src/java">
+        </pathelement>
+      </src>
+      <classpath refid="build.classpath">
+      </classpath>
     </javac>
   </target>
-  
-  <!-- ================================================================== -->
-  <!-- J A R                                                              -->
-  <!-- ================================================================== -->
-  
-  <target name="jar" depends="compile"
-    description="Builds the two JAR files from source">
-
-    <jar jarfile="${build.dir}/${final.name}.jar">
-      <fileset dir="${build.dest}" excludes="**/applet/*"/>
-    </jar>
-    <jar jarfile="${build.dir}/${final.name}-applet.jar">
-      <fileset dir="${build.dest}"
-      excludes="**/xmlrpc/*,**/fesi/*,**/secure/*"/>
+  <target name="jar" description="o Create the jar" depends="compile,test">
+    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
     </jar>
   </target>
-
-  <!-- ================================================================== -->
-  <!-- J A V A D O C S                                                    -->
-  <!-- ================================================================== -->
-  
-  <target name="javadocs" depends="prepare" description="Create the JavaDocs">
-    <mkdir dir="${javadoc.destdir}"/>
-    <javadoc
-      sourcepath="${src.dir}/java"
-      packagenames="org.apache.xmlrpc.*"
-      destdir="${javadoc.destdir}"
-      author="true"
-      private="true"
-      version="true"
-      use="true"
-      windowtitle="${name} ${version} API"
-      doctitle="${name} ${version} API"
-      bottom="Copyright &#169; ${year} Apache Software Foundation. All Rights Reserved."
-    >
-    <classpath refid="classpath"/>
-    </javadoc>
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- C L E A N                                                          -->
-  <!-- ================================================================== -->
-
-  <target name="clean" description="Deletes temporary files">
-    <delete file="${final.name}.tar.gz"/>
-    <delete file="${final.name}.zip"/>
-    <delete file="${final.name}-src.tar.gz"/>
-    <delete file="${final.name}-src.zip"/>
-    <delete dir="${build.dir}"/>
-    <delete dir="${test.reportsDirectory}"/>
-    <delete dir="${docs.dest}"/>
-    <delete dir="${lib.repo}"/>
+  <target name="clean" description="o Clean up the generated directories">
+    <delete dir="${defaulttargetdir}">
+    </delete>
+    <delete dir="${distdir}">
+    </delete>
   </target>
-
-  <!-- ================================================================== -->
-  <!-- T E S T                                                            -->
-  <!-- ================================================================== -->
-
-  <target name="compile-tests"
-    depends="init,check.junit,compile"
-    description="Compiles testing source code">
-    
-    <mkdir dir="${build.test.dest}"/>
-
-    <javac srcdir="${src.test.dir}"
-      destdir="${build.test.dest}"
-      includes="**/*Test.java"
-      excludes="**/package.html"
-      debug="on"
-      deprecation="off"
-      optimize="${optimize}">
-      <classpath refid="classpath"/>
-      <classpath>
-        <pathelement path="${build.dest}"/>
-      </classpath>
-    </javac>
-    
+  <target name="dist" description="o Create a distribution" depends="jar, javadoc">
+    <mkdir dir="dist">
+    </mkdir>
+    <copy todir="dist">
+      <fileset dir="${defaulttargetdir}" includes="*.jar">
+      </fileset>
+      <fileset dir="${basedir}" includes="LICENSE*, README*">
+      </fileset>
+    </copy>
   </target>
-
-  <target name="test"
-    depends="compile-tests"
-    description="Runs unit and run-time tests">
-    
-    <echo>
-      Running all JUnit tests
-    </echo>
-    
-    <delete dir="${test.reportsDirectory}"/>
-    <mkdir dir="${test.reportsDirectory}"/>
-    
-    <junit printSummary="yes">
-      <formatter type="plain"/>
-      <classpath refid="classpath"/>
+  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
+    <fail message="There were test failures.">
+    </fail>
+  </target>
+  <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
+    <mkdir dir="${testreportdir}">
+    </mkdir>
+    <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+      <sysproperty key="basedir" value=".">
+      </sysproperty>
+      <formatter type="xml">
+      </formatter>
+      <formatter usefile="false" type="plain">
+      </formatter>
       <classpath>
-        <!-- <pathelement location="${xerces.jar}"/> -->
-        <pathelement path="${build.dest}"/>
-        <pathelement location="${junit.jar}"/>
-        <pathelement path="${build.test.dest}"/>
+        <path refid="build.classpath">
+        </path>
+        <pathelement path="${testclassesdir}">
+        </pathelement>
+        <pathelement path="${classesdir}">
+        </pathelement>
       </classpath>
-      <batchtest todir="${test.reportsDirectory}">
-        <fileset dir="${build.test.dest}">
-          <include name="**/*Test.class"/>
-          <exclude name="**/XmlRpcTransportTest.class"/>
-          <exclude name="**/LocalServerRpcTest.class"/>
+      <batchtest todir="${testreportdir}">
+        <fileset dir="src/test">
+          <include name="**/*Test.java">
+          </include>
+          <exclude name="**/LocalServerRpcTest.java">
+          </exclude>
+          <exclude name="**/XmlRpcTransportTest.java">
+          </exclude>
         </fileset>
       </batchtest>
     </junit>
   </target>
-
-  <!-- ================================================================== -->
-  <!-- D O C S                                                            -->
-  <!-- ================================================================== -->
-  
-  <target 
-    name="check_for_jdom">
-    
-    <available 
-      property="jdom.present"
-      classname="org.jdom.JDOMException">
+  <target name="junit-present" unless="Junit.present" depends="init">
+    <echo>================================= WARNING ================================</echo>
+    <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
+    <echo>==========================================================================</echo>
+  </target>
+  <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
+    <mkdir dir="${testclassesdir}">
+    </mkdir>
+    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+      <src>
+        <pathelement location="src/test">
+        </pathelement>
+      </src>
       <classpath>
-        <pathelement location="${jakarta.site2}/lib/${jdom.jar}"/>
+        <path refid="build.classpath">
+        </path>
+        <pathelement path="${classesdir}">
+        </pathelement>
       </classpath>
-    </available>
-  </target>
-    
-  <target 
-    depends="check_for_jdom" 
-    name="docs-prepare-error" 
-    unless="jdom.present">
-    
-    <echo>
-      The Jakarta-Site2 module is not present! Please check
-      to make sure that you have checked it out from CVS.
-
-      &lt;http://jakarta.apache.org/site/jakarta-site2.html&gt;
-    </echo>
+    </javac>
   </target>
-
-  <target 
-    name="docs"
-    depends="docs-prepare-error,javadocs"
-    description="Generates the HTML documentation (including JavaDoc)"
-    if="jdom.present">
-
-    <taskdef 
-      name="anakia"
-      classname="org.apache.velocity.anakia.AnakiaTask">
+  <target name="javadoc" description="o Generate javadoc" depends="get-deps">
+    <mkdir dir="${javadocdir}">
+    </mkdir>
+    <tstamp>
+      <format pattern="2001-yyyy" property="year">
+      </format>
+    </tstamp>
+    <property name="copyright" value="Copyright &amp;copy;  Apache Software Foundation. All Rights Reserved.">
+    </property>
+    <property name="title" value="xmlrpc 3.0-dev API">
+    </property>
+    <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.xmlrpc.*">
       <classpath>
-        <fileset dir="${jakarta.site2}/lib">
-          <include name="*.jar"/>
-        </fileset>
+        <path refid="build.classpath">
+        </path>
       </classpath>
-    </taskdef>
-        
-    <anakia 
-      basedir="${docs.src}" 
-      destdir="${docs.dest}/"
-      extension=".html" 
-      style="./site.vsl"
-      projectFile="stylesheets/project.xml"
-      excludes="**/stylesheets/** empty.xml"
-      includes="**/*.xml"
-      lastModifiedCheck="true"
-      templatePath="${docs.src}/stylesheets">
-    </anakia>
-
-    <copy 
-      todir="${docs.dest}/images" 
-      filtering="no">
-      
-      <fileset dir="${docs.src}/images">
-        <include name="**/*.gif"/>
-        <include name="**/*.jpeg"/>
-        <include name="**/*.jpg"/>
-      </fileset>
-    </copy>
+    </javadoc>
   </target>
+  <target name="get-deps" unless="noget" depends="init">
+    <!--Proxy settings works only with a JDK 1.2 and higher.-->
 
-  <!-- ================================================================== -->
-  <!-- I N S T A L L  J A R                                               -->
-  <!-- ================================================================== -->
-
-  <target name="install-jar" depends="jar" 
-    description="Installs .jar file in ${lib.repo}">
-
-    <copy todir="${lib.repo}" filtering="no">
-      <fileset dir="${build.dir}">
-        <include name="${final.name}.jar"/>
-        <include name="${final.name}-applet.jar"/>
-      </fileset>
-    </copy>
+    <setproxy>
+    </setproxy>
+    <get dest="${libdir}/commons-httpclient-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-httpclient/jars/commons-httpclient-2.0.2.jar">
+    </get>
+    <get dest="${libdir}/commons-logging-1.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.2.jar">
+    </get>
+    <get dest="${libdir}/servletapi-2.4.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/servletapi/jars/servletapi-2.4.jar">
+    </get>
+    <get dest="${libdir}/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar">
+    </get>
+    <get dest="${libdir}/ws-commons-util-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ws-commons-util/jars/ws-commons-util-1.0.jar">
+    </get>
+    <get dest="${libdir}/ws-commons-java5-1.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ws-commons-java5/jars/ws-commons-java5-1.0.jar">
+    </get>
   </target>
-
-  <!-- ================================================================== -->
-  <!-- D I S T R I B U T I O N S                                          -->
-  <!-- ================================================================== -->
-
-  <target 
-    name="dist"
-    depends="jar,javadocs,docs"
-    description="Build source and binary distribution">
-
-    <property name="distDir" value="${build.dir}/${final.name}"/>
-
-    <!-- B I N A R Y  D I S T R I B U T I O N -->
-
-    <echo>
-      +-------------------------------------------------------+
-      | C R E A T I N G  B I N A R Y  D I S T R I B U T I O N |
-      +-------------------------------------------------------+
-    </echo>
-    
-    <mkdir dir="${distDir}"/>
-    <mkdir dir="${docs.dest}"/>
-
-    <!-- Copy README and LICENSE -->
-    <copy todir="${distDir}" file="README.txt"/>
-    <copy todir="${distDir}" file="LICENSE.txt"/>
-
-    <!-- Copy Jars -->
-    <copy todir="${distDir}">
-      <fileset dir="${build.dir}">
-        <include name="**/*.jar"/>
-      </fileset>
-    </copy>
-
-    <!-- Copy documentation -->
-    <copy todir="${distDir}/docs/apidocs">
-      <fileset dir="${javadoc.destdir}">
-        <include name="**"/>
-      </fileset>
-    </copy>
-
-    <!-- Create a tar.gz file -->
-    <tar longfile="gnu" tarfile="${final.name}.tar">
-      <tarfileset dir="${build.dir}">
-        <include name="${final.name}/**"/>
-      </tarfileset>
-    </tar>
-    
-    <gzip zipfile="${final.name}.tar.gz" src="${final.name}.tar"/>
-    <delete file="${final.name}.tar"/>
-    
-    <!-- Create a zip file -->
-    <zip zipfile="${final.name}.zip">
-      <zipfileset dir="${build.dir}">
-        <include name="${final.name}/**"/>
-      </zipfileset>
-    </zip>
-
-    <!-- S O U R C E  D I S T R I B U T I O N -->
-
-    <echo>
-      +-------------------------------------------------------+
-      | C R E A T I N G  S O U R C E  D I S T R I B U T I O N |
-      +-------------------------------------------------------+
-    </echo>
-
-    <delete>
-      <fileset dir="${distDir}">
-        <include name="**/*.jar"/>
-      </fileset>
-    </delete>
-    
-    <copy todir="${distDir}" file="default.properties"/>
-    <copy todir="${distDir}" file="build.xml"/>
-
-    <!-- Copy Source -->
-    <copy todir="${distDir}/src">
-      <fileset dir="${src.dir}">
-        <include name="**/*.java"/>
-      </fileset>
-    </copy>
-
-    <!-- Create a tar.gz file -->
-    <tar longfile="gnu" tarfile="${final.name}-src.tar">
-      <tarfileset dir="${build.dir}">
-        <include name="${final.name}/**"/>
-      </tarfileset>
-    </tar>
-    
-    <gzip zipfile="${final.name}-src.tar.gz" src="${final.name}-src.tar"/>
-    <delete file="${final.name}-src.tar"/>
-    
-    <!-- Create a zip file -->
-    <zip zipfile="${final.name}-src.zip">
-      <zipfileset dir="${build.dir}">
-        <include name="${final.name}/**"/>
-      </zipfileset>
-    </zip>
-
-    <checksum algorithm="MD5" fileext=".md5">
-        <fileset dir=".">
-            <include name="${final.name}.tar.gz"/>   
-            <include name="${final.name}-src.tar.gz"/>   
-            <include name="${final.name}.zip"/>
-            <include name="${final.name}-src.zip"/>   
-        </fileset>
-    </checksum>
+  <target name="install-maven">
+    <get dest="${user.home}/maven-install-latest.jar" usetimestamp="true" src="${repo}/maven/maven-install-latest.jar">
+    </get>
+    <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
+    </unjar>
   </target>
-
-</project>
+</project>
\ No newline at end of file

Modified: webservices/xmlrpc/branches/b20050512_streaming/project.xml
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/project.xml?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/project.xml (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/project.xml Wed Oct 26 14:13:21 2005
@@ -1,179 +1,183 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <project>
-
-  <pomVersion>3</pomVersion>
-  <name>xmlrpc</name>
-  <id>xmlrpc</id>
-  <currentVersion>2.0-beta</currentVersion>
-  <organization>
-    <name>Apache Software Foundation</name>
-    <url>http://ws.apache.org/</url>
-    <logo>/images/project-logo.jpg</logo>
-  </organization>
-  <inceptionYear>2001</inceptionYear>
-  <package>org.apache.xmlrpc</package>
-  <logo>/images/xmlrpc-logo.gif</logo>
-
-  <shortDescription>Project Management Tools</shortDescription>
-
-  <!-- Gump integration -->
-  <gumpRepositoryId>jakarta</gumpRepositoryId>
-
-  <description>
-    Apache XML-RPC is a Java implementation of <a
-    href="http://www.xmlrpc.com/"> XML-RPC</a>, a popular protocol
+    <pomVersion>3</pomVersion>
+    <artifactId>xmlrpc</artifactId>
+    <name>xmlrpc</name>
+    <groupId>xmlrpc</groupId>
+    <distributionSite>http://www.apache.org/dyn/closer.cgi/ws/xmlrpc/</distributionSite>
+    <id>xmlrpc</id>
+    <currentVersion>3.0-dev</currentVersion>
+    <organization>
+        <name>Apache Software Foundation</name>
+        <url>http://ws.apache.org/</url>
+        <logo>/images/project-logo.jpg</logo>
+    </organization>
+    <inceptionYear>2001</inceptionYear>
+    <package>org.apache.xmlrpc</package>
+    <logo>/images/xmlrpc-logo.gif</logo>
+    <shortDescription>XML RPC Server and Clients</shortDescription>
+    <!-- Gump integration -->
+    <gumpRepositoryId>jakarta</gumpRepositoryId>
+    <description>Apache XML-RPC is a Java implementation of , a popular protocol
     that uses XML over HTTP to implement remote procedure calls.
-    <br/> Apache XML-RPC was previously known as Helma XML-RPC. If you
+     Apache XML-RPC was previously known as Helma XML-RPC. If you
     have code using the Helma library, all you should have to do is
     change the import statements in your code from helma.xmlrpc.* to
-    org.apache.xmlrpc.*.
-  </description>
-
-  <url>http://ws.apache.org/xmlrpc/</url>
-  <issueTrackingUrl>http://issues.apache.org/jira/browse/XMLRPC</issueTrackingUrl>
-  <siteAddress>ws.apache.org</siteAddress>
-  <siteDirectory>/www/ws.apache.org/xmlrpc/</siteDirectory>
-  <distributionDirectory>/www/www.apache.org/dist/ws/xmlrpc/</distributionDirectory>
-
-  <repository>
-    <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:ws-xmlrpc</connection>
-    <developerConnection>scm:cvs:ext:${maven.username}@cvs.apache.org:/home/cvs:ws-xmlrpc</developerConnection>
-    <url>http://cvs.apache.org/viewcvs/ws-xmlrpc/</url>
-  </repository>
-
-  <versions>
-    <version>
-      <id>1.0</id>
-      <name>1.0</name>
-      <tag>XMLRPC_1_0</tag>
-    </version>
-    <version>
-      <id>1.1</id>
-      <name>1.1</name>
-      <tag>XMLRPC_1_1</tag>
-    </version>
-    <version>
-      <id>1.2</id>
-      <name>1.2</name>
-      <tag>XMLRPC_1_2_BRANCH</tag>
-    </version>
-  </versions>
-
-  <branches>
-  </branches>
-
-  <mailingLists>
-    <mailingList>
-      <name>XML-RPC User List</name>
-      <subscribe>xmlrpc-user-subscribe@ws.apache.org</subscribe>
-      <unsubscribe>xmlrpc-user-unsubscribe@ws.apache.org</unsubscribe>
-      <archive>http://mail-archives.eu.apache.org/mod_mbox/ws-xmlrpc-user/</archive>
-    </mailingList>
-    <mailingList>
-      <name>XML-RPC Developer List</name>
-      <subscribe>xmlrpc-dev-subscribe@ws.apache.org</subscribe>
-      <unsubscribe>xmlrpc-dev-unsubscribe@ws.apache.org</unsubscribe>
-      <archive>http://mail-archives.eu.apache.org/mod_mbox/ws-xmlrpc-dev/</archive>
-    </mailingList>
-  </mailingLists>
-
-  <developers>
-    <developer>
-      <name>Hannes Wallnoefer</name>
-      <id>hannes</id>
-      <email>hannes@apache.org</email>
-      <organization></organization>
-    </developer>
-    <developer>
-      <name>Daniel Rall</name>
-      <id>dlr</id>
-      <email>dlr@finemaltcoding.com</email>
-      <organization>CollabNet, Inc.</organization>
-    </developer>
-    <developer>
-      <name>Jon Scott Stevens</name>
-      <id>jon</id>
-      <email>jon@latchkey.com</email>
-      <organization>CollabNet, Inc.</organization>
-    </developer>
-    <developer>
-      <name>Jason van Zyl</name>
-      <id>jvanzyl</id>
-      <email>jason@zenplex.com</email>
-      <organization>Zenplex</organization>
-    </developer>
-    <developer>
-      <name>Leonard Richarson</name>
-      <id>leonardr</id>
-      <email>leonardr@collab.net</email>
-      <organization>CollabNet, Inc.</organization>
-    </developer>
-    <developer>
-      <name>John Wilson</name>
-      <id>jwilson</id>
-      <email>tug@wilson.co.uk</email>
-      <organization>The Wilson Partnership</organization>
-    </developer>
-    <developer>
-      <name>Ryan Hoegg</name>
-      <id>rhoegg</id>
-      <email>rhoegg@isisnetworks.net</email>
-      <organization>ISIS Networks</organization>
-    </developer>
-    <developer>
-      <name>Andrew Evers</name>
-      <id>aevers</id>
-      <email>aevers@redwood.nl</email>
-      <organization></organization>
-    </developer>
-    <developer>
-      <name>Jochen Wiedmann</name>
-      <id>jochen</id>
-      <email>jochen.wiedmann@gmail.com</email>
-      <organization></organization>
-    </developer>
-    <developer>
-      <name>Henri Gomez</name>
-      <id>hgomez</id>
-      <email>hgomez@apache.org</email>
-      <organization></organization>
-    </developer>
-    <developer>
-      <name>Siegfried Goeschl</name>
-      <id>sgoeschl</id>
-      <email>sgoeschl@apache.org</email>
-      <organization></organization>
-    </developer>
-  </developers>
-
-  <dependencies>
-
-   <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>2.0.2</version>
-      <url>http://jakarta.apache.org/commons/httpclient/</url>
-    </dependency>  
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>   
-      <version>1.0.2</version>
-      <url>http://jakarta.apache.org/commons/logging.html</url>
-    </dependency>
-    <dependency>
-      <groupId>commons-codec</groupId>
-      <artifactId>commons-codec</artifactId>       
-      <version>1.3</version>
-      <url>http://jakarta.apache.org/commons/codec/index.html</url>
-    </dependency>
-    <dependency>
-      <groupId>servletapi</groupId>
-      <artifactId>servletapi</artifactId>       
-      <version>2.2</version>
-      <url>http://java.sun.com/products/servlet/download.html</url>
-    </dependency>
-    <!-- This dependencies are only required for JDK 1.3.x -->
-    <!-- dependency>
+    org.apache.xmlrpc.*.</description>
+    <url>http://ws.apache.org/xmlrpc/</url>
+    <issueTrackingUrl>http://issues.apache.org/jira/browse/XMLRPC</issueTrackingUrl>
+    <siteAddress>ws.apache.org</siteAddress>
+    <siteDirectory>/www/ws.apache.org/xmlrpc/</siteDirectory>
+    <distributionDirectory>/www/www.apache.org/dist/ws/xmlrpc/</distributionDirectory>
+    <repository>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/webservices/xmlrpc/branches/b20050512_streaming/</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/webservices/xmlrpc/branches/b20050512_streaming/</developerConnection>
+        <url>http://svn.apache.org/viewcvs.cgi/webservices/xmlrpc/branches/b20050512_streaming/</url>
+    </repository>
+    <versions>
+        <version>
+            <id>1.0</id>
+            <name>1.0</name>
+            <tag>XMLRPC_1_0</tag>
+        </version>
+        <version>
+            <id>1.1</id>
+            <name>1.1</name>
+            <tag>XMLRPC_1_1</tag>
+        </version>
+        <version>
+            <id>1.2</id>
+            <name>1.2</name>
+            <tag>XMLRPC_1_2_BRANCH</tag>
+        </version>
+        <version>
+            <id>2.0</id>
+            <name>2.0</name>
+            <tag>XMLRPC_2_0_BRANCH</tag>
+        </version>
+    </versions>
+    <mailingLists>
+        <mailingList>
+            <name>XML-RPC User List</name>
+            <subscribe>xmlrpc-user-subscribe@ws.apache.org</subscribe>
+            <unsubscribe>xmlrpc-user-unsubscribe@ws.apache.org</unsubscribe>
+            <archive>http://mail-archives.eu.apache.org/mod_mbox/ws-xmlrpc-user/</archive>
+        </mailingList>
+        <mailingList>
+            <name>XML-RPC Developer List</name>
+            <subscribe>xmlrpc-dev-subscribe@ws.apache.org</subscribe>
+            <unsubscribe>xmlrpc-dev-unsubscribe@ws.apache.org</unsubscribe>
+            <archive>http://mail-archives.eu.apache.org/mod_mbox/ws-xmlrpc-dev/</archive>
+        </mailingList>
+    </mailingLists>
+    <developers>
+        <developer>
+            <name>Hannes Wallnoefer</name>
+            <id>hannes</id>
+            <email>hannes@apache.org</email>
+        </developer>
+        <developer>
+            <name>Daniel Rall</name>
+            <id>dlr</id>
+            <email>dlr@finemaltcoding.com</email>
+            <organization>CollabNet, Inc.</organization>
+        </developer>
+        <developer>
+            <name>Jon Scott Stevens</name>
+            <id>jon</id>
+            <email>jon@latchkey.com</email>
+            <organization>CollabNet, Inc.</organization>
+        </developer>
+        <developer>
+            <name>Jason van Zyl</name>
+            <id>jvanzyl</id>
+            <email>jason@zenplex.com</email>
+            <organization>Zenplex</organization>
+        </developer>
+        <developer>
+            <name>Leonard Richarson</name>
+            <id>leonardr</id>
+            <email>leonardr@collab.net</email>
+            <organization>CollabNet, Inc.</organization>
+        </developer>
+        <developer>
+            <name>John Wilson</name>
+            <id>jwilson</id>
+            <email>tug@wilson.co.uk</email>
+            <organization>The Wilson Partnership</organization>
+        </developer>
+        <developer>
+            <name>Ryan Hoegg</name>
+            <id>rhoegg</id>
+            <email>rhoegg@isisnetworks.net</email>
+            <organization>ISIS Networks</organization>
+        </developer>
+        <developer>
+            <name>Andrew Evers</name>
+            <id>aevers</id>
+            <email>aevers@redwood.nl</email>
+        </developer>
+        <developer>
+            <name>Jochen Wiedmann</name>
+            <id>jochen</id>
+            <email>jochen.wiedmann@gmail.com</email>
+        </developer>
+        <developer>
+            <name>Henri Gomez</name>
+            <id>hgomez</id>
+            <email>hgomez@apache.org</email>
+        </developer>
+        <developer>
+            <name>Siegfried Goeschl</name>
+            <id>sgoeschl</id>
+            <email>sgoeschl@apache.org</email>
+        </developer>
+    </developers>
+    <dependencies>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>2.0.2</version>
+            <type>jar</type>
+            <url>http://jakarta.apache.org/commons/httpclient/</url>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>1.0.2</version>
+            <type>jar</type>
+            <url>http://jakarta.apache.org/commons/logging.html</url>
+        </dependency>
+        <dependency>
+            <groupId>servletapi</groupId>
+            <artifactId>servletapi</artifactId>
+            <version>2.4</version>
+            <type>jar</type>
+            <url>http://java.sun.com/products/servlet/download.html</url>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <type>jar</type>
+            <url>http://www.junit.org/</url>
+        </dependency>
+        <dependency>
+            <groupId>ws-commons-util</groupId>
+            <artifactId>ws-commons-util</artifactId>
+            <version>1.0</version>
+            <type>jar</type>
+            <url>http://ws.apache.org/commons/util</url>
+        </dependency>
+        <dependency>
+            <groupId>ws-commons-java5</groupId>
+            <artifactId>ws-commons-java5</artifactId>
+            <version>1.0</version>
+            <type>jar</type>
+            <url>http://ws.apache.org/commons/java5</url>
+        </dependency>
+        <!-- This dependencies are only required for JDK 1.3.x -->
+        <!-- dependency>
       <groupId>jsse</groupId>
       <artifactId>jsse</artifactId>       
       <version>1.0.2</version>
@@ -191,66 +195,55 @@
       <version>1.0.2</version>
       <url>http://java.sun.com/products/jsse/</url>
     </dependency -->
-    <!-- dependency>
+        <!-- dependency>
       <groupId>fesi</groupId>
       <artifactId>fesi</artifactId>       
       <version>1.1.5</version>
       <url>http://home.worldcom.ch/jmlugrin/fesi/</url>
     </dependency -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>       
-      <version>3.8.1</version>
-      <url>http://www.junit.org/</url>
-    </dependency>
-  </dependencies>
-
-  <build>
-
-    <sourceDirectory>src/java</sourceDirectory>
-    <aspectSourceDirectory/>
-    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
-    <integrationUnitTestSourceDirectory/>
-
-    <!-- Unit test classes -->
-    <unitTest>
-      <includes>
-        <!-- TODO: There are more tests available -->
-        <include>**/*Test.java</include>
-      </includes>
-      <excludes>
-        <!-- Exclude abstract tests -->
-        <exclude>**/LocalServerRpcTest.java</exclude>
-        <exclude>**/XmlRpcTransportTest.java</exclude>
-      </excludes>
-    </unitTest>
-
-    <!-- Integration unit test classes -->
-    <integrationUnitTest/>
-
-    <!-- J A R  R E S O U R C E S -->
-    <!-- Resources that are packaged up inside the JAR file -->
-
-    <resources/>
-
-    <jars>
-    </jars>
-  </build>
-  
-  <reports>
-    <report>maven-jdepend-plugin</report>
-    <report>maven-changes-plugin</report>
-    <report>maven-changelog-plugin</report>
-    <report>maven-developer-activity-plugin</report>
-    <report>maven-file-activity-plugin</report>
-    <report>maven-javadoc-plugin</report>
-    <report>maven-jxr-plugin</report>      
-    <report>maven-junit-report-plugin</report>
-    <report>maven-tasklist-plugin</report>    
-    <report>maven-pmd-plugin</report>
-    <report>maven-faq-plugin</report>    
-    <report>maven-junit-report-plugin</report>    
-    <report>maven-clover-plugin</report>
-  </reports> 
-
+        <dependency>
+            <groupId>jaxme</groupId>
+            <artifactId>jaxmeapi</artifactId>
+            <version>0.5</version>
+            <type>jar</type>
+        </dependency>
+    </dependencies>
+    <build>
+        <nagEmailAddress>xmlrpc-dev@ws.apache.org</nagEmailAddress>
+        <sourceDirectory>src/java</sourceDirectory>
+        <!-- Unit test classes -->
+        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+        <unitTest>
+            <includes>
+                <!-- TODO: There are more tests available -->
+                <include>**/*Test.java</include>
+            </includes>
+            <excludes>
+                <!-- Exclude abstract tests -->
+                <exclude>**/LocalServerRpcTest.java</exclude>
+                <exclude>**/XmlRpcTransportTest.java</exclude>
+            </excludes>
+        </unitTest>
+        <!-- Integration unit test classes -->
+        <integrationUnitTest />
+        <!-- J A R  R E S O U R C E S -->
+        <!-- Resources that are packaged up inside the JAR file -->
+        <jars />
+    </build>
+    <reports>
+        <report>maven-jdepend-plugin</report>
+        <report>maven-changes-plugin</report>
+        <report>maven-changelog-plugin</report>
+        <report>maven-developer-activity-plugin</report>
+        <report>maven-file-activity-plugin</report>
+        <report>maven-javadoc-plugin</report>
+        <report>maven-jxr-plugin</report>
+        <report>maven-junit-report-plugin</report>
+        <report>maven-tasklist-plugin</report>
+        <report>maven-pmd-plugin</report>
+        <report>maven-faq-plugin</report>
+        <report>maven-junit-report-plugin</report>
+        <report>maven-clover-plugin</report>
+    </reports>
 </project>
+

Modified: webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/ByteArraySerializer.java
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/ByteArraySerializer.java?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/ByteArraySerializer.java (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/ByteArraySerializer.java Wed Oct 26 14:13:21 2005
@@ -35,7 +35,8 @@
 		pHandler.startElement("", VALUE_TAG, VALUE_TAG, ZERO_ATTRIBUTES);
 		pHandler.startElement("", BASE_64_TAG, BASE_64_TAG, ZERO_ATTRIBUTES);
 		byte[] buffer = (byte[]) pObject;
-		Encoder encoder = new Base64.SAXEncoder(buffer.length >= 1024 ? 1024 : ((buffer.length+3)/4)*4, pHandler);
+		char[] charBuffer = new char[buffer.length >= 1024 ? 1024 : ((buffer.length+3)/4)*4];
+		Encoder encoder = new Base64.SAXEncoder(charBuffer, 0, null, pHandler);
 		try {
 			encoder.write(buffer, 0, buffer.length);
 			encoder.flush();

Modified: webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/SerializableSerializer.java
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/SerializableSerializer.java?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/SerializableSerializer.java (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/serializer/SerializableSerializer.java Wed Oct 26 14:13:21 2005
@@ -38,7 +38,8 @@
 	public void write(final ContentHandler pHandler, Object pObject) throws SAXException {
 		pHandler.startElement("", VALUE_TAG, VALUE_TAG, ZERO_ATTRIBUTES);
 		pHandler.startElement("", SERIALIZABLE_TAG, EX_SERIALIZABLE_TAG, ZERO_ATTRIBUTES);
-		Encoder encoder = new Base64.SAXEncoder(4096, pHandler);
+		char[] buffer = new char[1024];
+		Encoder encoder = new Base64.SAXEncoder(buffer, 0, null, pHandler);
 		try {
 			OutputStream ostream = new EncoderOutputStream(encoder);
 			ObjectOutputStream oos = new ObjectOutputStream(ostream);

Modified: webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/util/HttpUtil.java
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/util/HttpUtil.java?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/util/HttpUtil.java (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/util/HttpUtil.java Wed Oct 26 14:13:21 2005
@@ -18,7 +18,9 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.StringTokenizer;
 
 import org.apache.ws.commons.util.Base64;

Modified: webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/Connection.java
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/Connection.java?rev=328736&r1=328735&r2=328736&view=diff
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/Connection.java (original)
+++ webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/Connection.java Wed Oct 26 14:13:21 2005
@@ -25,8 +25,6 @@
 import java.net.Socket;
 import java.util.StringTokenizer;
 
-import javax.servlet.http.HttpUtils;
-
 import org.apache.xmlrpc.common.XmlRpcHttpRequestConfig;
 import org.apache.xmlrpc.common.XmlRpcNotAuthorizedException;
 import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig;

Added: webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java
URL: http://svn.apache.org/viewcvs/webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java?rev=328736&view=auto
==============================================================================
--- webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java (added)
+++ webservices/xmlrpc/branches/b20050512_streaming/src/java/org/apache/xmlrpc/webserver/HttpServletRequestImpl.java Wed Oct 26 14:13:21 2005
@@ -0,0 +1,530 @@
+/*
+ * Copyright 1999,2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.xmlrpc.webserver;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.UndeclaredThrowableException;
+import java.net.Socket;
+import java.net.URLDecoder;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.xmlrpc.util.HttpUtil;
+
+
+/** Stub implementation of a {@link javax.servlet.http.HttpServletRequest}
+ * with lots of unimplemented methods. I implemented only those, which
+ * are required for testing the {@link org.apache.xmlrpc.webserver.XmlRpcServlet}.
+ * Perhaps someone else is adding more at a later time?
+ */
+public class HttpServletRequestImpl implements HttpServletRequest {
+	private final Socket socket;
+	private final ServletInputStream istream;
+	private ServletInputStream sistream;
+	private BufferedReader reader;
+	private boolean postParametersParsed;
+	private final String method;
+	private final String protocol;
+	private final String uri;
+	private final String queryString;
+	private final String httpVersion;
+	private final Map headers = new HashMap();
+	private final Map attributes = new HashMap();
+	private Map parameters;
+	private String characterEncoding;
+
+	/** Creates a new instance, which reads input from the given
+	 * socket.
+	 * @param pSocket The socket, to which the client is connected.
+	 * @throws IOException Accessing the sockets input stream failed.
+	 */
+	public HttpServletRequestImpl(Socket pSocket) throws IOException {
+		socket = pSocket;
+		final InputStream bis = new BufferedInputStream(socket.getInputStream()){
+    		/** It may happen, that the XML parser invokes close().
+    		 * Closing the input stream must not occur, because
+    		 * that would close the whole socket. So we suppress it.
+    		 */
+        	public void close() throws IOException {
+        	}
+        };
+		istream = new ServletInputStream(){
+			public int read() throws IOException {
+				return bis.read();
+			}
+		};
+
+        /** Read the header lines, one by one. Note, that the size of
+         * the buffer is a limitation of the maximum header length!
+         */
+        byte[] buffer = new byte[2048];
+        String line = readLine(buffer);
+        
+        StringTokenizer tokens = new StringTokenizer(line);
+        if (!tokens.hasMoreTokens()) {
+        	throw new ServletWebServer.Exception(400, "Bad Request",
+        										 "Unable to parse requests first line (should"
+        										  + " be 'METHOD uri HTTP/version', was empty.");
+        }
+        method = tokens.nextToken();
+		if (!"POST".equalsIgnoreCase(method)) {
+			throw new ServletWebServer.Exception(400, "Bad Request",
+												 "Expected 'POST' method, got " + method);
+		}
+		if (!tokens.hasMoreTokens()) {
+        	throw new ServletWebServer.Exception(400, "Bad Request",
+        										 "Unable to parse requests first line (should"
+					  							 + " be 'METHOD uri HTTP/version', was: " + line);
+		}
+		String u = tokens.nextToken();
+		int offset = u.indexOf('?');
+		if (offset >= 0) {
+			uri = u.substring(0, offset);
+			queryString = u.substring(offset+1);
+		} else {
+			uri = u;
+			queryString = null;
+		}
+		if (tokens.hasMoreTokens()) {
+			String v = tokens.nextToken().toUpperCase();
+			if (tokens.hasMoreTokens()) {
+	        	throw new ServletWebServer.Exception(400, "Bad Request",
+	        										 "Unable to parse requests first line (should"
+							 						  + " be 'METHOD uri HTTP/version', was: " + line);
+			} else {
+				int index = v.indexOf('/');
+				if (index == -1) {
+		        	throw new ServletWebServer.Exception(400, "Bad Request",
+		        										 "Unable to parse requests first line (should"
+	 						  							 + " be 'METHOD uri HTTP/version', was: " + line);
+				}
+				protocol = v.substring(0, index).toUpperCase();
+				httpVersion = v.substring(index+1);
+			}
+		} else {
+			httpVersion = "1.0";
+			protocol = "HTTP";
+		}
+
+		for (line = HttpUtil.readLine(istream, buffer);  line != null  &&  line.length() > 0;  ) {
+			int off = line.indexOf(':');
+			if (off > 0) {
+				addHeader(line.substring(0, off), line.substring(off+1).trim());
+			} else {
+				throw new ServletWebServer.Exception(400, "Bad Request", "Unable to parse header line: " + line);
+			}
+		}
+	}
+
+	protected String readLine(byte[] pBuffer) throws IOException {
+		int res = istream.readLine(pBuffer, 0, pBuffer.length);
+		if (res == -1) {
+			return null;
+		}
+		if (res == pBuffer.length  &&  pBuffer[pBuffer.length] != '\n') {
+			throw new ServletWebServer.Exception(400, "Bad Request",
+												 "Maximum header size of " + pBuffer.length +
+												 " characters exceeded.");
+		}
+		return new String(pBuffer, 0, res, "US-ASCII");
+	}
+
+	protected void addHeader(String pHeader, String pValue) {
+		String key = pHeader.toLowerCase();
+		addParameter(headers, key, pValue);
+	}
+
+	public String getAuthType() {
+		String s = getHeader("Authorization");
+		if (s == null) {
+			return null;
+		}
+		StringTokenizer st = new StringTokenizer(s);
+		if (st.hasMoreTokens()) {
+			return st.nextToken().toUpperCase();
+		} else {
+			return null;
+		}
+	}
+
+	public String getContextPath() { return ""; }
+
+	public Cookie[] getCookies() { throw new IllegalStateException("Not implemented"); }
+	public long getDateHeader(String arg0) { throw new IllegalStateException("Not implemented"); }
+
+	public String getHeader(String pHeader) {
+		String key = pHeader.toLowerCase();
+		Object o = headers.get(key);
+		if (o instanceof List) {
+			o = ((List) o).get(0);
+		}
+		return (String) o;
+	}
+
+	public Enumeration getHeaderNames() {
+		return Collections.enumeration(headers.keySet());
+	}
+
+	public Enumeration getHeaders(String pHeader) {
+		String key = pHeader.toLowerCase();
+		Object o = headers.get(key);
+		List list;
+		if (o instanceof List) {
+			list = (List) o;
+		} else {
+			list = Collections.singletonList(o);
+		}
+		return Collections.enumeration(list);
+	}
+
+	public int getIntHeader(String pHeader) {
+		String s = getHeader(pHeader);
+		return s == null ? -1 : Integer.parseInt(s);
+	}
+
+	public String getMethod() { return method; }
+
+	public String getPathInfo() { return null; }
+
+	public String getPathTranslated() { return null; }
+
+	public String getQueryString() { return queryString; }
+
+	public String getRemoteUser() { throw new IllegalStateException("Not implemented"); }
+
+	public String getRequestURI() { return uri; }
+
+	public StringBuffer getRequestURL() {
+		String scheme = getScheme().toLowerCase();
+		StringBuffer sb = new StringBuffer(scheme);
+		sb.append("://");
+		String host = getHeader("host");
+		if (host == null) {
+			host = getLocalName();
+			if (host == null) {
+				host = getLocalAddr();
+			}
+		}
+		int port = getLocalPort();
+		int offset = host.indexOf(':');
+		if (offset != -1) {
+			host = host.substring(0, offset);
+			try {
+				port = Integer.parseInt(host.substring(offset+1));
+			} catch (Exception e) {
+			}
+		}
+		boolean isDefaultPort;
+		if ("http".equalsIgnoreCase(scheme)) {
+			isDefaultPort = port == 80;
+		} else if ("https".equalsIgnoreCase(scheme)) {
+			isDefaultPort = port == 443;
+		} else {
+			isDefaultPort = false;
+		}
+		if (!isDefaultPort) {
+			sb.append(':');
+			sb.append(port);
+		}
+		sb.append(getRequestURI());
+		return sb;
+	}
+
+	public String getRequestedSessionId() { throw new IllegalStateException("Not implemented"); }
+
+	public String getServletPath() { return uri; }
+
+	public HttpSession getSession() { throw new IllegalStateException("Not implemented"); }
+
+	public HttpSession getSession(boolean pCreate) { throw new IllegalStateException("Not implemented"); }
+
+	public Principal getUserPrincipal() { throw new IllegalStateException("Not implemented"); }
+
+	public boolean isRequestedSessionIdFromCookie() { throw new IllegalStateException("Not implemented"); }
+
+	public boolean isRequestedSessionIdFromURL() { throw new IllegalStateException("Not implemented"); }
+
+	public boolean isRequestedSessionIdFromUrl() { throw new IllegalStateException("Not implemented"); }
+
+	public boolean isRequestedSessionIdValid() { throw new IllegalStateException("Not implemented"); }
+
+	public boolean isUserInRole(String pRole) { throw new IllegalStateException("Not implemented"); }
+
+	public Object getAttribute(String pKey) { return attributes.get(pKey); }
+
+	public Enumeration getAttributeNames() { return Collections.enumeration(attributes.keySet()); }
+
+	public String getCharacterEncoding() {
+		if (characterEncoding == null) {
+			String contentType = getHeader("content-type");
+			if (contentType != null) {
+				for (StringTokenizer st = new StringTokenizer(contentType, ";");  st.hasMoreTokens();  ) {
+					String s = st.nextToken().trim();
+					if (s.toLowerCase().startsWith("charset=")) {
+						return s.substring("charset=".length()).trim();
+					}
+				}
+			}
+			return null;
+		} else {
+			return characterEncoding;
+		}
+	}
+
+	public void setCharacterEncoding(String pEncoding) { characterEncoding = pEncoding; }
+
+	public int getContentLength() {
+		try {
+			return getIntHeader("content-length");
+		} catch (NumberFormatException e) {
+			return -1;
+		}
+	}
+
+	public String getContentType() { return getHeader("content-type"); }
+
+	public ServletInputStream getInputStream() throws IOException {
+		if (reader == null) {
+			if (sistream == null) {
+				if (postParametersParsed) {
+					throw new IllegalStateException("The method getInputStream() must not be called, after POST parameters have been parsed.");
+				}
+				sistream = istream;
+			}
+			return sistream;
+		} else {
+			throw new IllegalStateException("The method getReader() has already been invoked.");
+		}
+	}
+
+	public Locale getLocale() { throw new IllegalStateException("Not implemented"); }
+
+	public Enumeration getLocales() { throw new IllegalStateException("Not implemented"); }
+
+	private void addParameter(Map pParams, String pKey, String pValue) {
+		Object o = pParams.get(pKey);
+		if (o == null) {
+			pParams.put(pKey, pValue);
+		} else {
+			List list;
+			if (o instanceof String) {
+				list = new ArrayList();
+				list.add(o);
+				pParams.put(pKey, list);
+			} else {
+				list = (List) o;
+			}
+			list.add(pParams);
+		}
+	}
+
+	private void parseQueryString(Map pParams, String pQueryString, String pEncoding) throws UnsupportedEncodingException {
+		for (StringTokenizer st = new StringTokenizer(pQueryString, "&");  st.hasMoreTokens();  ) {
+			String s = st.nextToken();
+			parseParameter(pParams, s, pEncoding);
+		}
+	}
+
+	private void parseParameter(Map pParams, String pParam, String pEncoding) throws UnsupportedEncodingException {
+		if (pParam.length() == 0) {
+			return;
+		}
+		int offset = pParam.indexOf('=');
+		final String name, value;
+		if (offset == -1) {
+			name = pParam;
+			value = "";
+		} else {
+			name = pParam.substring(0, offset);
+			value = pParam.substring(offset+1);
+		}
+		addParameter(pParams, URLDecoder.decode(name, pEncoding), URLDecoder.decode(value, pEncoding));
+	}
+
+	private void parsePostData(Map pParams, InputStream pStream, String pEncoding) throws IOException {
+		Reader r = new InputStreamReader(pStream, "US-ASCII");
+		StringBuffer sb = new StringBuffer();
+		for (;;) {
+			int c = r.read();
+			if (c == -1  ||  c == '&') {
+				parseParameter(pParams, sb.toString(), pEncoding);
+				if (c == -1) {
+					break;
+				} else {
+					sb.setLength(0);
+				}
+			} else {
+				sb.append((char) c);
+			}
+		}
+	}
+
+	protected void parseParameters() {
+		if (parameters != null) {
+			return;
+		}
+		String encoding = getCharacterEncoding();
+		if (encoding == null) {
+			encoding = "UTF8";
+		}
+		Map params = new HashMap();
+		String s = getQueryString();
+		if (s != null) {
+			try {
+				parseQueryString(params, s, encoding);
+			} catch (IOException e) {
+				throw new UndeclaredThrowableException(e);
+			}
+		}
+		if ("POST".equals(getMethod())  &&
+			"application/x-www-form-urlencoded".equals(getContentType())) {
+			if (sistream != null  ||  reader != null) {
+				throw new IllegalStateException("POST parameters cannot be parsed, after"
+												+ " getInputStream(), or getReader(),"
+												+ " have been called.");
+			}
+			postParametersParsed = true;
+			try {
+				parsePostData(params, istream, encoding);
+			} catch (IOException e) {
+				throw new UndeclaredThrowableException(e);
+			}
+		}
+		parameters = params;
+	}
+
+	public String getParameter(String pName) {
+		parseParameters();
+		Object o = parameters.get(pName);
+		if (o instanceof List) {
+			o = ((List) o).get(0);
+		}
+		return (String) o;
+	}
+
+	public Map getParameterMap() {
+		parseParameters();
+		final Map result = new HashMap();
+		for (final Iterator iter = parameters.entrySet().iterator();  iter.hasNext();  ) {
+			final Map.Entry entry = (Map.Entry) iter.next();
+			final String name = (String) entry.getKey();
+			final Object o = entry.getValue();
+			final String[] array;
+			if (o instanceof String) {
+				array = new String[]{(String) o};
+			} else if (o instanceof List) {
+				final List list = (List) o;
+				array = (String[]) list.toArray(new String[list.size()]);
+			} else {
+				throw new IllegalStateException("Invalid object: " + o.getClass().getName());
+			}
+			result.put(name, array);
+		}
+		return Collections.unmodifiableMap(result);
+	}
+
+	public Enumeration getParameterNames() {
+		parseParameters();
+		return Collections.enumeration(parameters.keySet());
+	}
+
+	public String[] getParameterValues(String pName) {
+		parseParameters();
+		Object o = parameters.get(pName);
+		if (o instanceof String) {
+			return new String[]{(String) o};
+		} else {
+			List list = (List) o;
+			return (String[]) list.toArray(new String[list.size()]);
+		}
+	}
+
+	public String getProtocol() { return protocol; }
+
+	public BufferedReader getReader() throws IOException {
+		if (sistream == null) {
+			if (reader == null) {
+				if (postParametersParsed) {
+					throw new IllegalStateException("The method getReader() must not be called, after POST parameters have been parsed.");
+				}
+				String encoding = getCharacterEncoding();
+				if (encoding == null) {
+					encoding = "UTF8";
+				}
+				reader = new BufferedReader(new InputStreamReader(istream, encoding));
+			}
+			return reader;
+		} else {
+			throw new IllegalStateException("The methods getInputStream(), and getReader(), are mutually exclusive.");
+		}
+	}
+
+	public String getRealPath(String pPath) { throw new IllegalStateException("Not implemented."); }
+
+	public String getLocalAddr() { return socket.getLocalAddress().getHostAddress(); }
+
+	public String getLocalName() { return socket.getLocalAddress().getHostName(); }
+
+	public int getLocalPort() { return socket.getLocalPort(); }
+
+	public String getRemoteAddr() { return socket.getInetAddress().getHostAddress(); }
+
+	public String getRemoteHost() { return socket.getInetAddress().getHostName(); }
+
+	public int getRemotePort() { return socket.getPort(); }
+
+	public RequestDispatcher getRequestDispatcher(String pUri) {
+		throw new IllegalStateException("Not implemented");
+	}
+
+	public String getScheme() { return "http"; }
+
+	public String getServerName() { return socket.getLocalAddress().getHostName(); }
+
+	public int getServerPort() { return socket.getLocalPort(); }
+
+	public boolean isSecure() { return false; }
+
+	public void removeAttribute(String pKey) {
+		attributes.remove(pKey);
+	}
+
+	public void setAttribute(String pKey, Object pValue) {
+		attributes.put(pKey, pValue);
+	}
+
+	protected String getHttpVersion() { return httpVersion; }
+}