You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/07/03 22:19:55 UTC
svn commit: r552967 [1/2] - in /webservices/axis2/trunk/java: etc/
modules/codegen/ modules/fastinfoset/ modules/integration/ modules/jaxws/
modules/jibx/ modules/json/ modules/kernel/
modules/kernel/src/org/apache/axis2/transport/http/server/ modules/...
Author: dims
Date: Tue Jul 3 13:19:53 2007
New Revision: 552967
URL: http://svn.apache.org/viewvc?view=rev&rev=552967
Log:
Fix for AXIS2-2891 - [PATCH] Upgrades 'Simple' HTTP and NIO HTTP transports to HttpCore 4.0-alpha5; improves I/O session logging
Added:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientConnection.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServerConnection.java
Modified:
webservices/axis2/trunk/java/etc/project.properties
webservices/axis2/trunk/java/modules/codegen/project.xml
webservices/axis2/trunk/java/modules/fastinfoset/pom.xml
webservices/axis2/trunk/java/modules/fastinfoset/project.xml
webservices/axis2/trunk/java/modules/integration/project.xml
webservices/axis2/trunk/java/modules/jaxws/project.xml
webservices/axis2/trunk/java/modules/jibx/project.xml
webservices/axis2/trunk/java/modules/json/project.xml
webservices/axis2/trunk/java/modules/kernel/pom.xml
webservices/axis2/trunk/java/modules/kernel/project.xml
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnection.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/ClientHandler.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOListener.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingIOSession.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientHandler.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainClientIOEventDispatch.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainServerIOEventDispatch.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLClientIOEventDispatch.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLServerIOEventDispatch.java
webservices/axis2/trunk/java/modules/metadata/project.xml
webservices/axis2/trunk/java/modules/parent/pom.xml
webservices/axis2/trunk/java/modules/saaj/project.xml
Modified: webservices/axis2/trunk/java/etc/project.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/etc/project.properties?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/etc/project.properties (original)
+++ webservices/axis2/trunk/java/etc/project.properties Tue Jul 3 13:19:53 2007
@@ -116,8 +116,7 @@
geronimo.spec.jms.version=1.1-rc4
geronimo.spec.annotation.version=1.1
groovy.all.version=1.0-jsr-06
-jakarta.httpcore.version=4.0-alpha4
-jakarta.httpcore.nio.version=4.0-alpha4
+httpcore.version=4.0-alpha5
javamail.version=1.4
jaxbri.version=2.0.3
jaxbapi.version=2.0
@@ -178,7 +177,7 @@
maven.jar.geronimo-spec-javamail=${dependencies.dir}/geronimo-spec-javamail-${geronimo.spec.javamail.version}.jar
maven.jar.geronimo-spec-jms=${dependencies.dir}/geronimo-spec-jms-${geronimo.spec.jms.version}.jar
maven.jar.groovy-all=${dependencies.dir}/groovy-all-${groovy.all.version}.jar
-maven.jar.jakarta-httpcore=${dependencies.dir}/jakarta-httpcore-${jakarta.httpcore.version}.jar
+maven.jar.httpcore=${dependencies.dir}/httpcore-${httpcore.version}.jar
maven.jar.jaxen=${dependencies.dir}/jaxen-${jaxen.version}.jar
maven.jar.jaxme2=${dependencies.dir}/jaxme2-${jaxme.version}.jar
maven.jar.jaxmeapi=${dependencies.dir}/jaxmeapi-${jaxme.version}.jar
Modified: webservices/axis2/trunk/java/modules/codegen/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/project.xml (original)
+++ webservices/axis2/trunk/java/modules/codegen/project.xml Tue Jul 3 13:19:53 2007
@@ -92,8 +92,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/fastinfoset/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/fastinfoset/pom.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/fastinfoset/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/fastinfoset/pom.xml Tue Jul 3 13:19:53 2007
@@ -95,7 +95,7 @@
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore</artifactId>
+ <artifactId>httpcore</artifactId>
</dependency>
<dependency>
<groupId>backport-util-concurrent</groupId>
Modified: webservices/axis2/trunk/java/modules/fastinfoset/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/fastinfoset/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/fastinfoset/project.xml (original)
+++ webservices/axis2/trunk/java/modules/fastinfoset/project.xml Tue Jul 3 13:19:53 2007
@@ -154,8 +154,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/integration/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/project.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/project.xml Tue Jul 3 13:19:53 2007
@@ -141,8 +141,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/jaxws/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/project.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/project.xml Tue Jul 3 13:19:53 2007
@@ -349,8 +349,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/jibx/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/project.xml (original)
+++ webservices/axis2/trunk/java/modules/jibx/project.xml Tue Jul 3 13:19:53 2007
@@ -119,8 +119,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/json/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/json/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/json/project.xml (original)
+++ webservices/axis2/trunk/java/modules/json/project.xml Tue Jul 3 13:19:53 2007
@@ -86,8 +86,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
Modified: webservices/axis2/trunk/java/modules/kernel/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/pom.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/pom.xml Tue Jul 3 13:19:53 2007
@@ -1,255 +1,255 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one
- ~ or more contributor license agreements. See the NOTICE file
- ~ distributed with this work for additional information
- ~ regarding copyright ownership. The ASF licenses this file
- ~ to you 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-parent</artifactId>
- <version>SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
- <artifactId>axis2-kernel</artifactId>
- <name>Apache Axis 2.0 - Kernel</name>
- <description>Core Parts of Axis 2.0. This includes Axis 2.0 engine, Client API, Addressing support, etc.,</description>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore-nio</artifactId>
- </dependency>
- <dependency>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- </dependency>
- <dependency>
- <groupId>backport-util-concurrent</groupId>
- <artifactId>backport-util-concurrent</artifactId>
- </dependency>
- <dependency>
- <groupId>stax</groupId>
- <artifactId>stax-api</artifactId>
- <version>${stax.api.version}</version>
- </dependency>
- <dependency>
- <groupId>${stax.impl.groupid}</groupId>
- <artifactId>${stax.impl.artifactid}</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.schema</groupId>
- <artifactId>XmlSchema</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.woden</groupId>
- <artifactId>woden</artifactId>
- <exclusions>
- <exclusion>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>annogen</groupId>
- <artifactId>annogen</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.ws.commons.axiom</groupId>
- <artifactId>axiom-dom</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>xmlunit</groupId>
- <artifactId>xmlunit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>java14</id>
- <activation>
- <jdk>1.4</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <excludes>
- <exclude>**/*NIOSSL*.java</exclude>
- <exclude>**/SSLServerIOEventDispatch.java</exclude>
- <exclude>**/SSLClientIOEventDispatch.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>java15</id>
- <activation>
- <jdk>1.5</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore-niossl</artifactId>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>java16</id>
- <activation>
- <jdk>1.6</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore-niossl</artifactId>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
- <build>
- <sourceDirectory>src</sourceDirectory>
- <testSourceDirectory>test</testSourceDirectory>
- <resources>
- <resource>
- <directory>conf</directory>
- <excludes>
- <exclude>**/*.properties</exclude>
- </excludes>
- <filtering>false</filtering>
- </resource>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <testResources>
- <testResource>
- <targetPath>../test-resources</targetPath>
- <directory>test-resources</directory>
- <includes>
- <include>**/**</include>
- </includes>
- </testResource>
- <testResource>
- <directory>test-resources/deployment/ClasspathModule</directory>
- <includes>
- <include>**/**</include>
- </includes>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <skip>false</skip>
- <excludes>
- <exclude>**/*Abstract*.java</exclude>
- <exclude>**/*Util*.java</exclude>
- <exclude>**/*PhaseResolvingTest.java</exclude>
- </excludes>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>process-test-resources</id>
- <phase>process-test-resources</phase>
- <configuration>
- <tasks>
- <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/service2"/>
- <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/echo"/>
- <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/invalidservice"/>
- <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/module1"/>
- <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/serviceModule"/>
- <copy file="${basedir}/test-resources/deployment/axis2.xml" tofile="${basedir}/target/test-resources/deployment/axis2.xml"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>test-compile</id>
- <phase>test-compile</phase>
- <configuration>
- <tasks>
- <property name="maven.build.dir" location="${basedir}/target"/>
- <ant antfile="j2secbuild.xml" inheritall="true" inheritrefs="true" dir="test-resources/"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-parent</artifactId>
+ <version>SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <artifactId>axis2-kernel</artifactId>
+ <name>Apache Axis 2.0 - Kernel</name>
+ <description>Core Parts of Axis 2.0. This includes Axis 2.0 engine, Client API, Addressing support, etc.,</description>
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-nio</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>${stax.api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${stax.impl.groupid}</groupId>
+ <artifactId>${stax.impl.artifactid}</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.schema</groupId>
+ <artifactId>XmlSchema</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.neethi</groupId>
+ <artifactId>neethi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.woden</groupId>
+ <artifactId>woden</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>annogen</groupId>
+ <artifactId>annogen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-dom</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>java14</id>
+ <activation>
+ <jdk>1.4</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <excludes>
+ <exclude>**/*NIOSSL*.java</exclude>
+ <exclude>**/SSLServerIOEventDispatch.java</exclude>
+ <exclude>**/SSLClientIOEventDispatch.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>java15</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-niossl</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>java16</id>
+ <activation>
+ <jdk>1.6</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-niossl</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>conf</directory>
+ <excludes>
+ <exclude>**/*.properties</exclude>
+ </excludes>
+ <filtering>false</filtering>
+ </resource>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <targetPath>../test-resources</targetPath>
+ <directory>test-resources</directory>
+ <includes>
+ <include>**/**</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>test-resources/deployment/ClasspathModule</directory>
+ <includes>
+ <include>**/**</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>**/*Abstract*.java</exclude>
+ <exclude>**/*Util*.java</exclude>
+ <exclude>**/*PhaseResolvingTest.java</exclude>
+ </excludes>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>process-test-resources</id>
+ <phase>process-test-resources</phase>
+ <configuration>
+ <tasks>
+ <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/service2"/>
+ <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/echo"/>
+ <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/invalidservice"/>
+ <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/module1"/>
+ <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/serviceModule"/>
+ <copy file="${basedir}/test-resources/deployment/axis2.xml" tofile="${basedir}/target/test-resources/deployment/axis2.xml"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>test-compile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks>
+ <property name="maven.build.dir" location="${basedir}/target"/>
+ <ant antfile="j2secbuild.xml" inheritall="true" inheritrefs="true" dir="test-resources/"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: webservices/axis2/trunk/java/modules/kernel/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/project.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/project.xml Tue Jul 3 13:19:53 2007
@@ -99,16 +99,16 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore-nio</artifactId>
- <version>${jakarta.httpcore.nio.version}</version>
+ <artifactId>httpcore-nio</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
@@ -199,8 +199,8 @@
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
- <artifactId>jakarta-httpcore-niossl</artifactId>
- <version>4.0-alpha4</version>
+ <artifactId>httpcore-niossl</artifactId>
+ <version>${httpcore.version}</version>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnection.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnection.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnection.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnection.java Tue Jul 3 13:19:53 2007
@@ -28,11 +28,10 @@
import org.apache.http.HttpInetConnection;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
-import org.apache.http.params.HttpParams;
public interface AxisHttpConnection extends HttpConnection, HttpInetConnection {
- HttpRequest receiveRequest(HttpParams params)
+ HttpRequest receiveRequest()
throws HttpException, IOException;
InputStream getInputStream();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpConnectionImpl.java Tue Jul 3 13:19:53 2007
@@ -31,6 +31,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.http.ConnectionClosedException;
import org.apache.http.Header;
+import org.apache.http.HttpConnectionMetrics;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpException;
@@ -73,6 +74,7 @@
private final HttpRequestFactory requestfactory;
private final ContentLengthStrategy contentLenStrategy;
private final int maxHeaderCount;
+ private final int maxLineLen;
private OutputStream out = null;
private InputStream in = null;
@@ -96,12 +98,13 @@
int buffersize = HttpConnectionParams.getSocketBufferSize(params);
this.socket = socket;
- this.datatransmitter = new SocketHttpDataTransmitter(socket, buffersize);
- this.datareceiver = new SocketHttpDataReceiver(socket, buffersize);
+ this.datatransmitter = new SocketHttpDataTransmitter(socket, buffersize, params);
+ this.datareceiver = new SocketHttpDataReceiver(socket, buffersize, params);
this.charbuffer = new CharArrayBuffer(256);
this.requestfactory = new DefaultHttpRequestFactory();
this.contentLenStrategy = new StrictContentLengthStrategy();
this.maxHeaderCount = params.getIntParameter(HttpConnectionParams.MAX_HEADER_COUNT, -1);
+ this.maxLineLen = params.getIntParameter(HttpConnectionParams.MAX_LINE_LENGTH, -1);
}
public void close() throws IOException {
@@ -137,11 +140,7 @@
}
}
- public HttpRequest receiveRequest(final HttpParams params)
- throws HttpException, IOException {
- if (params == null) {
- throw new IllegalArgumentException("HTTP parameters may not be null");
- }
+ public HttpRequest receiveRequest() throws HttpException, IOException {
this.charbuffer.clear();
int i = this.datareceiver.readLine(this.charbuffer);
if (i == -1) {
@@ -149,8 +148,10 @@
}
RequestLine requestline = BasicRequestLine.parse(this.charbuffer, 0, this.charbuffer.length());
HttpRequest request = this.requestfactory.newHttpRequest(requestline);
- request.getParams().setDefaults(params);
- Header[] headers = HeaderUtils.parseHeaders(this.datareceiver, this.maxHeaderCount);
+ Header[] headers = HeaderUtils.parseHeaders(
+ this.datareceiver,
+ this.maxHeaderCount,
+ this.maxLineLen);
request.setHeaders(headers);
if (HEADERLOG.isDebugEnabled()) {
@@ -296,6 +297,10 @@
} else {
return -1;
}
+ }
+
+ public HttpConnectionMetrics getMetrics() {
+ return null;
}
public String toString() {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/AxisHttpService.java Tue Jul 3 13:19:53 2007
@@ -25,7 +25,6 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.engine.AxisEngine;
@@ -36,6 +35,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.http.*;
import org.apache.http.params.HttpParams;
+import org.apache.http.params.HttpParamsLinker;
import org.apache.http.protocol.HttpContext;
import org.apache.http.protocol.HttpProcessor;
@@ -122,7 +122,8 @@
HttpResponse response;
try {
- HttpRequest request = conn.receiveRequest(this.params);
+ HttpRequest request = conn.receiveRequest();
+ HttpParamsLinker.link(request, this.params);
HttpVersion ver = request.getRequestLine().getHttpVersion();
if (!ver.lessEquals(HttpVersion.HTTP_1_1)) {
// Downgrade protocol version if greater than HTTP/1.1
@@ -131,13 +132,13 @@
response = this.responseFactory.newHttpResponse
(ver, HttpStatus.SC_OK, context);
- response.getParams().setDefaults(this.params);
+ HttpParamsLinker.link(response, this.params);
if (request instanceof HttpEntityEnclosingRequest) {
if (((HttpEntityEnclosingRequest) request).expectContinue()) {
HttpResponse ack = this.responseFactory.newHttpResponse
(ver, HttpStatus.SC_CONTINUE, context);
- ack.getParams().setDefaults(this.params);
+ HttpParamsLinker.link(ack, this.params);
conn.sendResponse(ack);
conn.flush();
}
@@ -182,7 +183,7 @@
response = this.responseFactory.newHttpResponse
(HttpVersion.HTTP_1_0, HttpStatus.SC_INTERNAL_SERVER_ERROR,
context);
- response.getParams().setDefaults(this.params);
+ HttpParamsLinker.link(response, this.params);
handleException(ex, response);
this.httpProcessor.process(response, context);
conn.sendResponse(response);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/Axis2HttpRequest.java Tue Jul 3 13:19:53 2007
@@ -18,29 +18,30 @@
*/
package org.apache.axis2.transport.nhttp;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.transport.nhttp.util.PipeImpl;
-import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.MessageFormatter;
import org.apache.axis2.transport.TransportUtils;
-import org.apache.http.*;
-import org.apache.http.protocol.HTTP;
-import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.message.HttpPost;
-import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.transport.nhttp.util.PipeImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.xml.stream.XMLStreamException;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.channels.Pipe;
-import java.nio.channels.Channels;
-import java.nio.channels.ReadableByteChannel;
-import java.util.Map;
-import java.util.Iterator;
+import org.apache.http.Header;
+import org.apache.http.HttpEntityEnclosingRequest;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpRequest;
+import org.apache.http.entity.BasicHttpEntity;
+import org.apache.http.message.BasicHttpEntityEnclosingRequest;
+import org.apache.http.protocol.HTTP;
/**
* Represents an outgoing Axis2 HTTP/s request. It holds the EPR of the destination, the
@@ -98,7 +99,9 @@
* @return the HttpRequest to be sent out
*/
public HttpRequest getRequest() throws IOException {
- HttpPost httpRequest = new HttpPost(epr.getAddress());
+ HttpEntityEnclosingRequest httpRequest = new BasicHttpEntityEnclosingRequest(
+ "POST",
+ epr.getAddress());
httpRequest.setEntity(new BasicHttpEntity());
// set any transport headers
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/ClientHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/ClientHandler.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/ClientHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/ClientHandler.java Tue Jul 3 13:19:53 2007
@@ -18,35 +18,51 @@
*/
package org.apache.axis2.transport.nhttp;
-import org.apache.http.nio.NHttpClientHandler;
-import org.apache.http.nio.NHttpClientConnection;
-import org.apache.http.nio.ContentDecoder;
-import org.apache.http.nio.ContentEncoder;
-import org.apache.http.params.HttpParams;
-import org.apache.http.*;
-import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.protocol.*;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
+
+import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.transport.nhttp.util.PipeImpl;
import org.apache.axis2.transport.nhttp.util.WorkerPool;
import org.apache.axis2.transport.nhttp.util.WorkerPoolFactory;
-import org.apache.axis2.description.WSDL2Constants;
-import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.axis2.addressing.AddressingConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPFactory;
-
-import java.nio.ByteBuffer;
-import java.nio.channels.Channels;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.io.IOException;
+import org.apache.http.ConnectionReuseStrategy;
+import org.apache.http.Header;
+import org.apache.http.HttpConnection;
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpVersion;
+import org.apache.http.entity.BasicHttpEntity;
+import org.apache.http.impl.DefaultConnectionReuseStrategy;
+import org.apache.http.nio.ContentDecoder;
+import org.apache.http.nio.ContentEncoder;
+import org.apache.http.nio.NHttpClientConnection;
+import org.apache.http.nio.NHttpClientHandler;
+import org.apache.http.params.HttpParams;
+import org.apache.http.params.HttpParamsLinker;
+import org.apache.http.protocol.BasicHttpProcessor;
+import org.apache.http.protocol.HttpContext;
+import org.apache.http.protocol.HttpExecutionContext;
+import org.apache.http.protocol.HttpProcessor;
+import org.apache.http.protocol.RequestConnControl;
+import org.apache.http.protocol.RequestContent;
+import org.apache.http.protocol.RequestExpectContinue;
+import org.apache.http.protocol.RequestTargetHost;
+import org.apache.http.protocol.RequestUserAgent;
/**
* The client connection handler. An instance of this class is used by each IOReactor, to
@@ -123,7 +139,7 @@
context.setAttribute(REQUEST_SOURCE_CHANNEL, axis2Req.getSourceChannel());
HttpRequest request = axis2Req.getRequest();
- request.getParams().setDefaults(this.params);
+ HttpParamsLinker.link(request, this.params);
this.httpProcessor.process(request, context);
conn.submitRequest(request);
@@ -157,7 +173,7 @@
context.setAttribute(REQUEST_SOURCE_CHANNEL, axis2Req.getSourceChannel());
HttpRequest request = axis2Req.getRequest();
- request.getParams().setDefaults(this.params);
+ HttpParamsLinker.link(request, this.params);
this.httpProcessor.process(request, context);
conn.submitRequest(request);
@@ -242,7 +258,6 @@
*/
public void outputReady(final NHttpClientConnection conn, final ContentEncoder encoder) {
HttpContext context = conn.getContext();
- HttpResponse response = conn.getHttpResponse();
ReadableByteChannel source = (ReadableByteChannel) context.getAttribute(REQUEST_SOURCE_CHANNEL);
ByteBuffer outbuf = (ByteBuffer) context.getAttribute(RESPONSE_BUFFER);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOListener.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOListener.java Tue Jul 3 13:19:53 2007
@@ -258,9 +258,4 @@
throw new AxisFault(msg, e);
}
- private void handleException(String msg) throws AxisFault {
- log.error(msg);
- throw new AxisFault(msg);
- }
-
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/HttpCoreNIOSender.java Tue Jul 3 13:19:53 2007
@@ -28,32 +28,29 @@
import java.util.Map;
import javax.net.ssl.SSLContext;
-import javax.xml.stream.XMLStreamException;
import org.apache.axiom.om.OMOutputFormat;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.util.MessageContextBuilder;
-import org.apache.axis2.util.Utils;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.transport.MessageFormatter;
import org.apache.axis2.transport.OutTransportInfo;
import org.apache.axis2.transport.TransportSender;
import org.apache.axis2.transport.TransportUtils;
-import org.apache.axis2.transport.MessageFormatter;
+import org.apache.axis2.util.MessageContextBuilder;
+import org.apache.axis2.util.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor;
-//import org.apache.http.impl.nio.reactor.SSLIOSessionHandler;
import org.apache.http.nio.NHttpClientConnection;
import org.apache.http.nio.NHttpClientHandler;
import org.apache.http.nio.reactor.ConnectingIOReactor;
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingIOSession.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingIOSession.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingIOSession.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingIOSession.java Tue Jul 3 13:19:53 2007
@@ -22,6 +22,7 @@
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
+import java.nio.channels.SelectionKey;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -68,10 +69,29 @@
return this.session.getEventMask();
}
+ private static String formatOps(int ops) {
+ StringBuffer buffer = new StringBuffer(6);
+ buffer.append('[');
+ if ((ops & SelectionKey.OP_READ) > 0) {
+ buffer.append('r');
+ }
+ if ((ops & SelectionKey.OP_WRITE) > 0) {
+ buffer.append('w');
+ }
+ if ((ops & SelectionKey.OP_ACCEPT) > 0) {
+ buffer.append('a');
+ }
+ if ((ops & SelectionKey.OP_CONNECT) > 0) {
+ buffer.append('c');
+ }
+ buffer.append(']');
+ return buffer.toString();
+ }
+
public void setEventMask(int ops) {
if (this.log.isDebugEnabled()) {
this.log.debug("I/O session " + this.id + " " + this.session + ": Set event mask "
- + ops);
+ + formatOps(ops));
}
this.session.setEventMask(ops);
}
@@ -79,7 +99,7 @@
public void setEvent(int op) {
if (this.log.isDebugEnabled()) {
this.log.debug("I/O session " + this.id + " " + this.session + ": Set event "
- + op);
+ + formatOps(op));
}
this.session.setEvent(op);
}
@@ -87,7 +107,7 @@
public void clearEvent(int op) {
if (this.log.isDebugEnabled()) {
this.log.debug("I/O session " + this.id + " " + this.session + ": Clear event "
- + op);
+ + formatOps(op));
}
this.session.clearEvent(op);
}
@@ -101,6 +121,13 @@
public boolean isClosed() {
return this.session.isClosed();
+ }
+
+ public void shutdown() {
+ if (this.log.isDebugEnabled()) {
+ this.log.debug("I/O session " + this.id + " " + this.session + ": Shutdown");
+ }
+ this.session.shutdown();
}
public int getSocketTimeout() {
Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientConnection.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientConnection.java?view=auto&rev=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientConnection.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientConnection.java Tue Jul 3 13:19:53 2007
@@ -0,0 +1,76 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.axis2.transport.nhttp;
+
+import java.io.IOException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.Header;
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponseFactory;
+import org.apache.http.impl.nio.DefaultNHttpClientConnection;
+import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.ByteBufferAllocator;
+import org.apache.http.params.HttpParams;
+
+public class LoggingNHttpClientConnection extends DefaultNHttpClientConnection {
+
+ private final Log log;
+ private final Log headerlog;
+
+ public LoggingNHttpClientConnection(
+ final IOSession session,
+ final HttpResponseFactory responseFactory,
+ final ByteBufferAllocator allocator,
+ final HttpParams params) {
+ super(session, responseFactory, allocator, params);
+ this.log = LogFactory.getLog(DefaultNHttpClientConnection.class);
+ this.headerlog = LogFactory.getLog("org.apache.axis2.transport.nhttp.headers");
+ }
+
+ public void submitRequest(final HttpRequest request) throws IOException, HttpException {
+ if (this.log.isDebugEnabled()) {
+ this.log.debug("HTTP connection " + this + ": " + request.getRequestLine().toString());
+ }
+ super.submitRequest(request);
+ if (this.headerlog.isDebugEnabled()) {
+ this.headerlog.debug(">> " + request.getRequestLine().toString());
+ Header[] headers = request.getAllHeaders();
+ for (int i = 0; i < headers.length; i++) {
+ this.headerlog.debug(">> " + headers[i].toString());
+ }
+ }
+ }
+
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientHandler.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpClientHandler.java Tue Jul 3 13:19:53 2007
@@ -22,6 +22,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.http.Header;
import org.apache.http.HttpException;
import org.apache.http.HttpResponse;
import org.apache.http.nio.ContentDecoder;
@@ -36,6 +37,7 @@
public class LoggingNHttpClientHandler implements NHttpClientHandler {
private final Log log;
+ private final Log headerlog;
private final NHttpClientHandler handler;
public LoggingNHttpClientHandler(final NHttpClientHandler handler) {
@@ -45,6 +47,7 @@
}
this.handler = handler;
this.log = LogFactory.getLog(handler.getClass());
+ this.headerlog = LogFactory.getLog("org.apache.axis2.transport.nhttp.headers");
}
public void connected(final NHttpClientConnection conn, final Object attachment) {
@@ -89,11 +92,18 @@
}
public void responseReceived(final NHttpClientConnection conn) {
+ HttpResponse response = conn.getHttpResponse();
if (this.log.isDebugEnabled()) {
- HttpResponse response = conn.getHttpResponse();
this.log.debug("HTTP connection " + conn + ": " + response.getStatusLine());
}
this.handler.responseReceived(conn);
+ if (this.headerlog.isDebugEnabled()) {
+ this.headerlog.debug("<< " + response.getStatusLine().toString());
+ Header[] headers = response.getAllHeaders();
+ for (int i = 0; i < headers.length; i++) {
+ this.headerlog.debug("<< " + headers[i].toString());
+ }
+ }
}
public void inputReady(final NHttpClientConnection conn, final ContentDecoder decoder) {
Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServerConnection.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServerConnection.java?view=auto&rev=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServerConnection.java (added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServerConnection.java Tue Jul 3 13:19:53 2007
@@ -0,0 +1,76 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.axis2.transport.nhttp;
+
+import java.io.IOException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.Header;
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequestFactory;
+import org.apache.http.HttpResponse;
+import org.apache.http.impl.nio.DefaultNHttpServerConnection;
+import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.ByteBufferAllocator;
+import org.apache.http.params.HttpParams;
+
+public class LoggingNHttpServerConnection extends DefaultNHttpServerConnection {
+
+ private final Log log;
+ private final Log headerlog;
+
+ public LoggingNHttpServerConnection(
+ final IOSession session,
+ final HttpRequestFactory requestFactory,
+ final ByteBufferAllocator allocator,
+ final HttpParams params) {
+ super(session, requestFactory, allocator, params);
+ this.log = LogFactory.getLog(DefaultNHttpServerConnection.class);
+ this.headerlog = LogFactory.getLog("org.apache.axis2.transport.nhttp.headers");
+ }
+
+ public void submitResponse(final HttpResponse response) throws IOException, HttpException {
+ if (this.log.isDebugEnabled()) {
+ this.log.debug("HTTP connection " + this + ": " + response.getStatusLine().toString());
+ }
+ super.submitResponse(response);
+ if (this.headerlog.isDebugEnabled()) {
+ this.headerlog.debug("<< " + response.getStatusLine().toString());
+ Header[] headers = response.getAllHeaders();
+ for (int i = 0; i < headers.length; i++) {
+ this.headerlog.debug("<< " + headers[i].toString());
+ }
+ }
+ }
+
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/LoggingNHttpServiceHandler.java Tue Jul 3 13:19:53 2007
@@ -22,6 +22,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.http.Header;
import org.apache.http.HttpException;
import org.apache.http.HttpRequest;
import org.apache.http.nio.ContentDecoder;
@@ -36,6 +37,7 @@
public class LoggingNHttpServiceHandler implements NHttpServiceHandler {
private final Log log;
+ private final Log headerlog;
private final NHttpServiceHandler handler;
public LoggingNHttpServiceHandler(final NHttpServiceHandler handler) {
@@ -45,6 +47,7 @@
}
this.handler = handler;
this.log = LogFactory.getLog(handler.getClass());
+ this.headerlog = LogFactory.getLog("org.apache.axis2.transport.nhttp.headers");
}
public void connected(final NHttpServerConnection conn) {
@@ -82,11 +85,18 @@
}
public void requestReceived(final NHttpServerConnection conn) {
+ HttpRequest request = conn.getHttpRequest();
if (this.log.isDebugEnabled()) {
- HttpRequest request = conn.getHttpRequest();
this.log.debug("HTTP connection " + conn + ": " + request.getRequestLine());
}
this.handler.requestReceived(conn);
+ if (this.headerlog.isDebugEnabled()) {
+ this.headerlog.debug(">> " + request.getRequestLine().toString());
+ Header[] headers = request.getAllHeaders();
+ for (int i = 0; i < headers.length; i++) {
+ this.headerlog.debug(">> " + headers[i].toString());
+ }
+ }
}
public void outputReady(final NHttpServerConnection conn, final ContentEncoder encoder) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainClientIOEventDispatch.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainClientIOEventDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainClientIOEventDispatch.java Tue Jul 3 13:19:53 2007
@@ -23,6 +23,7 @@
import org.apache.http.nio.NHttpClientHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.HeapByteBufferAllocator;
import org.apache.http.params.HttpParams;
public class PlainClientIOEventDispatch implements IOEventDispatch {
@@ -47,9 +48,10 @@
public void connected(final IOSession session) {
// Decorate I/O session with logging capabilities
- DefaultNHttpClientConnection conn = new DefaultNHttpClientConnection(
+ LoggingNHttpClientConnection conn = new LoggingNHttpClientConnection(
new LoggingIOSession(session),
new DefaultHttpResponseFactory(),
+ new HeapByteBufferAllocator(),
this.params);
session.setAttribute(NHTTP_CONN, conn);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainServerIOEventDispatch.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainServerIOEventDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/PlainServerIOEventDispatch.java Tue Jul 3 13:19:53 2007
@@ -23,6 +23,7 @@
import org.apache.http.nio.NHttpServiceHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.HeapByteBufferAllocator;
import org.apache.http.params.HttpParams;
public class PlainServerIOEventDispatch implements IOEventDispatch {
@@ -47,9 +48,10 @@
public void connected(final IOSession session) {
// Decorate I/O session with logging capabilities
- DefaultNHttpServerConnection conn = new DefaultNHttpServerConnection(
+ LoggingNHttpServerConnection conn = new LoggingNHttpServerConnection(
new LoggingIOSession(session),
new DefaultHttpRequestFactory(),
+ new HeapByteBufferAllocator(),
this.params);
session.setAttribute(NHTTP_CONN, conn);
this.handler.connected(conn);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLClientIOEventDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLClientIOEventDispatch.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLClientIOEventDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLClientIOEventDispatch.java Tue Jul 3 13:19:53 2007
@@ -31,6 +31,7 @@
import org.apache.http.nio.NHttpClientHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.HeapByteBufferAllocator;
import org.apache.http.params.HttpParams;
public class SSLClientIOEventDispatch implements IOEventDispatch {
@@ -78,9 +79,10 @@
this.sslcontext,
this.sslHandler);
- DefaultNHttpClientConnection conn = new DefaultNHttpClientConnection(
+ LoggingNHttpClientConnection conn = new LoggingNHttpClientConnection(
new LoggingIOSession(sslSession),
new DefaultHttpResponseFactory(),
+ new HeapByteBufferAllocator(),
this.params);
session.setAttribute(NHTTP_CONN, conn);
@@ -90,7 +92,7 @@
this.handler.connected(conn, attachment);
try {
- sslSession.initialize(SSLMode.CLIENT, this.params);
+ sslSession.bind(SSLMode.CLIENT, this.params);
} catch (SSLException ex) {
this.handler.exception(conn, ex);
sslSession.shutdown();
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLServerIOEventDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLServerIOEventDispatch.java?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLServerIOEventDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/nhttp/SSLServerIOEventDispatch.java Tue Jul 3 13:19:53 2007
@@ -31,6 +31,7 @@
import org.apache.http.nio.NHttpServiceHandler;
import org.apache.http.nio.reactor.IOEventDispatch;
import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.util.HeapByteBufferAllocator;
import org.apache.http.params.HttpParams;
public class SSLServerIOEventDispatch implements IOEventDispatch {
@@ -78,9 +79,10 @@
this.sslcontext,
this.sslHandler);
- DefaultNHttpServerConnection conn = new DefaultNHttpServerConnection(
+ LoggingNHttpServerConnection conn = new LoggingNHttpServerConnection(
new LoggingIOSession(sslSession),
new DefaultHttpRequestFactory(),
+ new HeapByteBufferAllocator(),
this.params);
session.setAttribute(NHTTP_CONN, conn);
@@ -89,7 +91,7 @@
this.handler.connected(conn);
try {
- sslSession.initialize(SSLMode.SERVER, this.params);
+ sslSession.bind(SSLMode.SERVER, this.params);
} catch (SSLException ex) {
this.handler.exception(conn, ex);
sslSession.shutdown();
Modified: webservices/axis2/trunk/java/modules/metadata/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/project.xml?view=diff&rev=552967&r1=552966&r2=552967
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/project.xml (original)
+++ webservices/axis2/trunk/java/modules/metadata/project.xml Tue Jul 3 13:19:53 2007
@@ -344,8 +344,8 @@
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
- <artifactId>jakarta-httpcore</artifactId>
- <version>${jakarta.httpcore.version}</version>
+ <artifactId>httpcore</artifactId>
+ <version>${httpcore.version}</version>
<properties>
<module>true</module>
</properties>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org