JBossWS SVN: r5386 - in stack/metro/branches/hbraun: src/test/resources/wsit/rm/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-12-21 07:01:53 -0500 (Fri, 21 Dec 2007)
New Revision: 5386
Added:
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml
Removed:
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml
Modified:
stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
Log:
First working RM test case
Modified: stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 11:24:51 UTC (rev 5385)
+++ stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 12:01:53 UTC (rev 5386)
@@ -31,7 +31,7 @@
<webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
<include name="sun-web.xml"/>
<include name="web.xml"/>
- <include name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml"/>
+ <include name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml"/>
</webinf>
</war>
Deleted: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml 2007-12-21 11:24:51 UTC (rev 5385)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml 2007-12-21 12:01:53 UTC (rev 5386)
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="CalculatorWSService" targetNamespace="http://calculator.me.org/" xmlns:tns="http://calculator.me.org/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..." xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
->
- <message name="add"/>
- <message name="addResponse"/>
- <portType name="CalculatorWS">
- <operation name="add">
- <input message="tns:add"/>
- <output message="tns:addResponse"/>
- </operation>
- </portType>
- <binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
- <wsp:PolicyReference URI="#CalculatorWSPortBindingPolicy"/>
- <operation name="add">
- <input/>
- <output/>
- </operation>
- </binding>
- <service name="CalculatorWSService">
- <port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding"/>
- </service>
- <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
- <wsp:ExactlyOne>
- <wsp:All>
- <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
- <wsrm:RMAssertion/>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-</definitions>
Copied: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml (from rev 5385, stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml)
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml (rev 0)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml 2007-12-21 12:01:53 UTC (rev 5386)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="CalculatorWSService" targetNamespace="http://calculator.me.org/" xmlns:tns="http://calculator.me.org/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..." xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+>
+ <message name="add"/>
+ <message name="addResponse"/>
+ <portType name="CalculatorWS">
+ <operation name="add">
+ <input message="tns:add"/>
+ <output message="tns:addResponse"/>
+ </operation>
+ </portType>
+ <binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
+ <wsp:PolicyReference URI="#CalculatorWSPortBindingPolicy"/>
+ <operation name="add">
+ <input/>
+ <output/>
+ </operation>
+ </binding>
+ <service name="CalculatorWSService">
+ <port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsaws:UsingAddressing xmlns:wsaws="http://www.w3.org/2006/05/addressing/wsdl"/>
+ <wsrm:RMAssertion/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years
JBossWS SVN: r5385 - stack/metro/branches/hbraun/ant-import-tests.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-12-21 06:24:51 -0500 (Fri, 21 Dec 2007)
New Revision: 5385
Modified:
stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
Log:
Exclude wsdl artifacts, otherwise the policy config would not be read
Modified: stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 10:13:24 UTC (rev 5384)
+++ stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 11:24:51 UTC (rev 5385)
@@ -9,29 +9,32 @@
<!-- $Id$ -->
<project>
+
+ <description>JBossWS test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-jars-jaxws" description="Build the deployments.">
+
+ <mkdir dir="${tests.output.dir}/libs"/>
+
+ <!-- wsit-rm -->
+ <war warfile="${tests.output.dir}/libs/wsit-rm.war" webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/wsit/rm/CalculatorWSImpl.class"/>
+ <include name="org/jboss/test/ws/wsit/rm/CalculatorWS.class"/>
+ <include name="org/jboss/test/ws/wsit/rm/jaxws/Add.class"/>
+ <include name="org/jboss/test/ws/wsit/rm/jaxws/AddResponse.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
+ <include name="sun-web.xml"/>
+ <include name="web.xml"/>
+ <include name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml"/>
+ </webinf>
+ </war>
- <description>JBossWS test archive builder</description>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-jars-jaxws" description="Build the deployments.">
-
- <mkdir dir="${tests.output.dir}/libs"/>
-
- <!-- wsit-rm -->
- <war warfile="${tests.output.dir}/libs/wsit-rm.war" webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/wsit/rm/**/*.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
- <include name="sun-web.xml"/>
- <include name="web.xml"/>
- <include name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml"/>
- </webinf>
- </war>
-
-
- </target>
+ </target>
+
</project>
17 years
JBossWS SVN: r5384 - in stack/metro/branches/hbraun: ant-import and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-12-21 05:13:24 -0500 (Fri, 21 Dec 2007)
New Revision: 5384
Added:
stack/metro/branches/hbraun/src/test/etc/log4j.xml
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
Removed:
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
Modified:
stack/metro/branches/hbraun/Metro-Branch.ipr
stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml
stack/metro/branches/hbraun/ant-import/build-testsuite.xml
stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml
stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml
stack/metro/branches/hbraun/build.xml
stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml
Log:
Use wsimport generted stubs
Modified: stack/metro/branches/hbraun/Metro-Branch.ipr
===================================================================
--- stack/metro/branches/hbraun/Metro-Branch.ipr 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/Metro-Branch.ipr 2007-12-21 10:13:24 UTC (rev 5384)
@@ -254,6 +254,8 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/Metro-Branch.iml" filepath="$PROJECT_DIR$/Metro-Branch.iml" />
<module fileurl="file://$PROJECT_DIR$/cvs/cvs-metro.iml" filepath="$PROJECT_DIR$/cvs/cvs-metro.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jaxws-2.1.2/jaxws-2.1.2.iml" filepath="$PROJECT_DIR$/jaxws-2.1.2/jaxws-2.1.2.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jaxws-tools-2.1.2/jaxws-tools-2.1.2.iml" filepath="$PROJECT_DIR$/jaxws-tools-2.1.2/jaxws-tools-2.1.2.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
Modified: stack/metro/branches/hbraun/ant-import/build-testsuite.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/build-testsuite.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import/build-testsuite.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -47,8 +47,7 @@
<path id="tests.extra.classpath">
<pathelement location="${int.sunri.dir}/output/lib/jbossws-sunri-client.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
</path>
</target>
Modified: stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import/macros-deploy-sunri.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -102,7 +102,8 @@
<include name="jsr181-api.jar"/>
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
- </fileset>
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
</copy>
<copy todir="${jboss423.home}/lib" overwrite="true">
<fileset dir="@{thirdpartylibs}">
@@ -134,7 +135,8 @@
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
<include name="jbossws-sunri-client.jar"/>
- </fileset>
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
</delete>
<delete dir="${jboss423.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<delete dir="${jboss423.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
Modified: stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import/metro-build-adapter.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -5,8 +5,9 @@
<import file="properties.xml"/>
<import file="build.xml"/>
- <property name="thirdparty.gen" value="../../../../thirdparty-gen"/>
-
+ <property name="thirdparty.gen" value="../../../thirdparty-gen"/>
+ <property name="thirdparty" value="../../../thirdparty"/>
+
<target name="adapter.init">
<!-- Directory for metro generated jars that are not distributed through 'repository.jboss.com' -->
<mkdir dir="${thirdparty.gen}"/>
@@ -17,29 +18,53 @@
-->
<target name="-metro.runtime.jar" depends="WSIT.main">
<ant dir="." target="create-wsit-runtime-jar"/>
+ <mkdir dir="${rt.dir}/build/jboss-tmp"/>
+ <unzip src="${rt.dir}/build/wsit-rt.jar" dest="${rt.dir}/build/jboss-tmp/"/>
+ <rename src="${rt.dir}/build/jboss-tmp/WEB-INF" dest="${rt.dir}/build/jboss-tmp/wsdl"/>
+ <zip destfile="${rt.dir}/build/jboss-wsit-rt.jar" basedir="${rt.dir}/build/jboss-tmp/"/>
</target>
+ <!-- build the metro tools extension -->
+ <target name="-metro.tools.jar">
+ <ant dir="tools" target="wsit-jars-tools">
+ <property name="tools.dir" value="."/>
+ </ant>
+
+ <mkdir dir="${tools.dir}/build/jboss-tmp"/>
+
+ <copy todir="${tools.dir}/build/jboss-tmp/META-INF/services" overwrite="true" verbose="true">
+ <fileset dir="./etc/META-INF/services">
+ <include name="*.TWSDLExtensionHandler"/>
+ </fileset>
+ </copy>
+
+ <unzip src="${tools.dir}/build/wsit-tools.jar" dest="${tools.dir}/build/jboss-tmp/"/>
+
+ <zip destfile="${tools.dir}/build/jboss-wsit-tools.jar" basedir="${tools.dir}/build/jboss-tmp/"/>
+ </target>
+
+
<target name="metro.jars" description="Creates the metro standalone jars" depends="init">
<antcall target="-metro.runtime.jar"/>
+ <antcall target="-metro.tools.jar"/>
</target>
<target name="copy-binaries"
description="Builds the metro jars and copies them to thirdparty-gen"
depends="metro.jars">
-
- <mkdir dir="${rt.dir}/build/jboss-tmp"/>
- <unzip src="${rt.dir}/build/wsit-rt.jar" dest="${rt.dir}/build/jboss-tmp/"/>
- <rename src="${rt.dir}/build/jboss-tmp/WEB-INF" dest="${rt.dir}/build/jboss-tmp/wsdl"/>
- <zip destfile="${rt.dir}/build/jboss-wsit-rt.jar" basedir="${rt.dir}/build/jboss-tmp/"/>
-
<copy todir="${thirdparty.gen}" verbose="true">
- <!-- Generated jars -->
+ <!-- runtime jars -->
<fileset dir="${rt.dir}/build/">
<include name="jboss-wsit-rt.jar"/>
</fileset>
+ <!-- tools jars -->
+ <fileset dir="${tools.dir}/build/">
+ <include name="jboss-wsit-tools.jar"/>
+ </fileset>
+
<!-- Metro 3rd party thats not available through repo.jboss.com -->
<fileset dir="${lib.runtime.dir}">
Modified: stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import-tests/build-jars-jaxws.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -9,27 +9,29 @@
<!-- $Id$ -->
<project>
-
- <description>JBossWS test archive builder</description>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-jars-jaxws" description="Build the deployments.">
-
- <mkdir dir="${tests.output.dir}/libs"/>
-
- <!-- wsit-rm -->
- <war warfile="${tests.output.dir}/libs/wsit-rm.war" webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/wsit/rm/**/*.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
- <include name="*/**"/>
- </webinf>
- </war>
-
- </target>
+ <description>JBossWS test archive builder</description>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <target name="build-jars-jaxws" description="Build the deployments.">
+
+ <mkdir dir="${tests.output.dir}/libs"/>
+
+ <!-- wsit-rm -->
+ <war warfile="${tests.output.dir}/libs/wsit-rm.war" webxml="${tests.output.dir}/resources/wsit/rm/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/wsit/rm/**/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/wsit/rm/WEB-INF">
+ <include name="sun-web.xml"/>
+ <include name="web.xml"/>
+ <include name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWS.xml"/>
+ </webinf>
+ </war>
+
+
+ </target>
</project>
Modified: stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml
===================================================================
--- stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/ant-import-tests/build-testsuite.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -26,19 +26,22 @@
Init the various classpaths
-->
<target name="tests-init" depends="thirdparty-classpath,tests-classpath">
-
+
<path id="ws.stack.classpath">
<pathelement location="${int.sunri.dir}/thirdparty/jbossws-common.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/jbossws-spi.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/FastInfoset.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/http.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jaxrpc-api.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/jaxws-api.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/jaxws-rt.jar"/>
+
<pathelement location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jsr173_api.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty-gen/jboss-wsit-tools.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty-gen/jboss-wsit-rt.jar"/>
+
+ <!--pathelement location="${int.sunri.dir}/thirdparty/jsr173_api.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/jsr181-api.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jsr250-api.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty/jsr250-api.jar"/-->
<pathelement location="${int.sunri.dir}/thirdparty/resolver.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/saaj-api.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/saaj-impl.jar"/>
@@ -47,15 +50,19 @@
<pathelement location="${int.sunri.dir}/thirdparty/streambuffer.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/wstx.jar"/>
<pathelement location="${int.sunri.dir}/thirdparty/wsdl4j.jar"/>
+
+ <pathelement location="${int.sunri.dir}/thirdparty-gen/xws-security.jar"/>
</path>
<path id="tests.extra.classpath">
<pathelement location="${int.sunri.dir}/output/lib/jbossws-sunri-client.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
- <pathelement location="${int.sunri.dir}/thirdparty/jaxws-tools.jar"/>
+ <pathelement location="${int.sunri.dir}/thirdparty/jbossws-framework.jar"/>
</path>
-
+ <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
+ <classpath refid="ws.stack.classpath"/>
+ </taskdef>
+
</target>
<!-- ================================================================== -->
@@ -64,7 +71,16 @@
<target name="wsimport" depends="tests-init" description="Consume JAX-WS contracts">
- <!-- placeholder for jaxws tools extensions -->
+ <mkdir dir="${tests.output.dir}/wsimport"/>
+
+ <wsimport
+ wsdl="${tests.resources.dir}/wsit/rm/WEB-INF/wsdl/Calc.wsdl"
+ destdir="${tests.output.dir}/wsimport"
+ sourcedestdir="${tests.output.dir}/wsimport"
+ keep="true"
+ verbose="false"
+ package="org.jboss.test.ws.wsit.rm"/>
+
</target>
<!--
@@ -85,6 +101,7 @@
<!-- ================================================================== -->
<target name="tests-compile" depends="wsimport,tests-classpath" description="Compile sources">
+ <macro-compile-classes srcdir="${tests.output.dir}/wsimport" excludesfile="${excludesfile}"/>
<macro-compile-classes srcdir="${sunri.dir}/src/test-framework/java" excludesfile="${excludesfile}"/>
<macro-compile-classes srcdir="${sunri.dir}/src/test/java" excludesfile="${excludesfile}"/>
</target>
Modified: stack/metro/branches/hbraun/build.xml
===================================================================
--- stack/metro/branches/hbraun/build.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/build.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -223,16 +223,16 @@
<fileset dir="${thirdparty.dir}">
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
+ <include name="jboss-wsit-tools.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxrpc-api.jar"/>
<include name="jaxws-api.jar"/>
<include name="jaxws-rt.jar"/>
<include name="jaxws-tools.jar"/>
+ <include name="jsr181-api.jar"/>
<include name="jsr173_api.jar"/>
- <include name="jsr181-api.jar"/>
<include name="jsr250-api.jar"/>
-
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
<include name="sjsxp.jar"/>
Added: stack/metro/branches/hbraun/src/test/etc/log4j.xml
===================================================================
--- stack/metro/branches/hbraun/src/test/etc/log4j.xml (rev 0)
+++ stack/metro/branches/hbraun/src/test/etc/log4j.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite: http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="${build.testlog}/test.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ws">
+ <priority value="DEBUG"/>
+ </category>
+
+ <category name="org.jboss.ws.core.MessageTrace">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+
+ <category name="org.jboss.remoting">
+ <priority value="INFO"/>
+ </category>
+
+ <!-- Apache security is verbose -->
+ <category name="org.apache.xml.security">
+ <priority value="INFO"/>
+ </category>
+
+ <!--
+ <category name="org.jboss.xb">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+<!--
+ <appender-ref ref="CONSOLE"/>
+-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: stack/metro/branches/hbraun/src/test/etc/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalcIF.java 2007-12-21 10:13:24 UTC (rev 5384)
@@ -1,12 +0,0 @@
-package org.jboss.test.ws.wsit.rm;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-
-@WebService(targetNamespace = "http://calculator.me.org/", portName = "CalculatorWS")
-public interface CalcIF
-{
- @WebMethod(operationName = "add")
- public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j);
-}
Deleted: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java 2007-12-21 10:13:24 UTC (rev 5384)
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of Sun Microsystems, Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.jboss.test.ws.wsit.rm;
-
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-
-/**
- *
- * @author User
- */
-@WebService(targetNamespace = "http://calculator.me.org/")
-public class CalculatorWS implements CalcIF
-{
-
- /**
- * Web service operation
- */
- @WebMethod(operationName = "add")
- public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j) {
- return i + j;
- }
-
-}
Copied: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java (from rev 5371, stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWS.java)
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java (rev 0)
+++ stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java 2007-12-21 10:13:24 UTC (rev 5384)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Sun Microsystems, Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.jboss.test.ws.wsit.rm;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+
+/**
+ *
+ * @author User
+ */
+@WebService(
+ targetNamespace = "http://calculator.me.org/",
+ portName = "CalculatorWSPort",
+ serviceName = "CalculatorWSService"
+)
+public class CalculatorWSImpl implements CalculatorWS
+{
+
+ /**
+ * Web service operation
+ */
+ @WebMethod(operationName = "add")
+ public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j)
+ {
+
+ int result = i + j;
+ System.out.println("*** WSIT-RM ***");
+ System.out.println("Result is: " + result);
+ return result;
+ }
+
+}
Property changes on: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/CalculatorWSImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java
===================================================================
--- stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/src/test/java/org/jboss/test/ws/wsit/rm/RMTestCase.java 2007-12-21 10:13:24 UTC (rev 5384)
@@ -4,11 +4,12 @@
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import javax.xml.ws.Service;
import javax.xml.namespace.QName;
import java.net.URL;
+import com.sun.xml.ws.Closeable;
+
public class RMTestCase extends JBossWSTest
{
public static Test suite()
@@ -17,19 +18,20 @@
}
public void testRMExchange() throws Exception
- {
- Service service = Service.create(
- new URL("http://"+getServerHost()+":8080/wsit-rm?wsdl"),
- new QName("http://calculator.me.org/","CalculatorWSService")
- );
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/wsit-rm?wsdl");
+ QName qName = new QName("http://calculator.me.org/", "CalculatorWSService");
+
+ CalculatorWSService service = new CalculatorWSService(url,qName);
+ CalculatorWS port = service.getCalculatorWSPort();
- CalcIF port = service.getPort(new QName("http://calculator.me.org/","CalculatorWSPort"), CalcIF.class);
-
int i = 10;
int j = 20;
int result = port.add(i, j);
assertTrue(result == 30);
+
+ ((Closeable)port).close();
}
}
Modified: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml 2007-12-20 20:13:24 UTC (rev 5383)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/web.xml 2007-12-21 10:13:24 UTC (rev 5384)
@@ -5,7 +5,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>Calculator</servlet-name>
- <servlet-class>org.jboss.test.ws.wsit.rm.CalculatorWS</servlet-class>
+ <servlet-class>org.jboss.test.ws.wsit.rm.CalculatorWSImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Calculator</servlet-name>
Added: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl (rev 0)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl 2007-12-21 10:13:24 UTC (rev 5384)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2_01-hudson-189-. -->
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2_01-hudson-189-. -->
+<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://calculator.me.org/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://calculator.me.org/"
+ name="CalculatorWSService">
+
+ <wsp:UsingPolicy></wsp:UsingPolicy>
+ <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <ns1:RMAssertion xmlns:ns1="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"></ns1:RMAssertion>
+ <ns2:UsingAddressing xmlns:ns2="http://www.w3.org/2006/05/addressing/wsdl"></ns2:UsingAddressing>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <types>
+ <xsd:schema>
+ <!-- http://calculator.me.org/ -->
+ <xsd:import namespace="http://calculator.me.org/" schemaLocation="xsd1.xsd"></xsd:import>
+ </xsd:schema>
+
+ </types>
+ <message name="add">
+ <part name="parameters" element="tns:add"></part>
+ </message>
+ <message name="addResponse">
+ <part name="parameters" element="tns:addResponse"></part>
+ </message>
+ <portType name="CalculatorWS">
+ <operation name="add">
+ <input message="tns:add"></input>
+ <output message="tns:addResponse"></output>
+ </operation>
+ </portType>
+ <binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
+ <wsp:PolicyReference URI="#CalculatorWSPortBindingPolicy"></wsp:PolicyReference>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
+ <operation name="add">
+
+ <soap:operation soapAction=""></soap:operation>
+ <input>
+ <soap:body use="literal"></soap:body>
+ </input>
+ <output>
+ <soap:body use="literal"></soap:body>
+ </output>
+ </operation>
+ </binding>
+ <service name="CalculatorWSService">
+ <port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding">
+ <soap:address location="http://127.0.0.1:8080/wsit-rm"></soap:address>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/Calc.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
===================================================================
--- stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd (rev 0)
+++ stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd 2007-12-21 10:13:24 UTC (rev 5384)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.2_01-hudson-189-. -->
+<xs:schema xmlns:tns="http://calculator.me.org/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ version="1.0"
+ targetNamespace="http://calculator.me.org/">
+
+ <xs:element name="add" type="tns:add"></xs:element>
+
+ <xs:element name="addResponse" type="tns:addResponse"></xs:element>
+
+ <xs:complexType name="add">
+ <xs:sequence>
+ <xs:element name="i" type="xs:int"></xs:element>
+ <xs:element name="j" type="xs:int"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="addResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:int"></xs:element>
+ </xs:sequence>
+
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Property changes on: stack/metro/branches/hbraun/src/test/resources/wsit/rm/WEB-INF/wsdl/xsd1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years
JBossWS SVN: r5383 - in stack/cxf/trunk: src/test/java/org/jboss/test/ws/jaxws/cxf and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-12-20 15:13:24 -0500 (Thu, 20 Dec 2007)
New Revision: 5383
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/WEB-INF/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl
Removed:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/reliable/
stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl
Modified:
stack/cxf/trunk/ant-import/build-testsuite-jars.xml
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml
Log:
Use BasicRPC & BasicDoc testcase
Modified: stack/cxf/trunk/ant-import/build-testsuite-jars.xml
===================================================================
--- stack/cxf/trunk/ant-import/build-testsuite-jars.xml 2007-12-20 19:54:45 UTC (rev 5382)
+++ stack/cxf/trunk/ant-import/build-testsuite-jars.xml 2007-12-20 20:13:24 UTC (rev 5383)
@@ -30,23 +30,24 @@
</webinf>
</war>
- <!-- jaxws-cxf-reliable -->
- <war warfile="${tests.output.dir}/libs/jaxws-cxf-reliable.war" webxml="${tests.output.dir}/resources/jaxws/cxf/reliable/WEB-INF/web.xml">
+ <!-- jaxws-cxf-wsrm-basic-doc -->
+ <war warfile="${tests.output.dir}/libs/jaxws-cxf-wsrm-basic-doc.war" webxml="${tests.output.dir}/resources/jaxws/cxf/wsrm/basic-doc/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/cxf/reliable/RMEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.class"/>
</classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/cxf/reliable/WEB-INF">
+ <webinf dir="${tests.output.dir}/resources/jaxws/cxf/wsrm/basic-doc/WEB-INF">
<include name="jbossws-cxf.xml"/>
</webinf>
</war>
- <!-- jaxws-cxf-wsrm-basic-doc -->
- <war warfile="${tests.output.dir}/libs/jaxws-cxf-wsrm-basic-doc.war" webxml="${tests.output.dir}/resources/jaxws/cxf/wsrm/WEB-INF/web.xml">
+ <!-- jaxws-cxf-wsrm-basic-rpc -->
+ <war warfile="${tests.output.dir}/libs/jaxws-cxf-wsrm-basic-rpc.war" webxml="${tests.output.dir}/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.class"/>
- <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.class"/>
</classes>
- <webinf dir="${tests.output.dir}/resources/jaxws/cxf/wsrm/WEB-INF">
+ <webinf dir="${tests.output.dir}/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF">
<include name="jbossws-cxf.xml"/>
</webinf>
</war>
Modified: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2007-12-20 19:54:45 UTC (rev 5382)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2007-12-20 20:13:24 UTC (rev 5383)
@@ -54,7 +54,7 @@
return new JBossWSTestSetup(BasicDocTestCase.class, "jaxws-cxf-wsrm-basic-doc.war");
}
- public void _testWSDLAccess() throws Exception
+ public void testWSDLAccess() throws Exception
{
URL wsdlURL = new URL(endpointURL + "?wsdl");
Element wsdl = DOMUtils.parse(wsdlURL.openStream());
@@ -65,7 +65,7 @@
public void _testStandardClient() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl").toURL();
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl").toURL();
QName serviceName = new QName(targetNS, "RMService");
Service service = Service.create(wsdlURL, serviceName);
@@ -84,7 +84,7 @@
Bus bus = bf.createBus(cxfConfig);
BusFactory.setDefaultBus(bus);
- URL wsdlURL = new File("resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl").toURL();
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl").toURL();
QName serviceName = new QName(targetNS, "RMService");
Service service = Service.create(wsdlURL, serviceName);
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.java 2007-12-20 20:13:24 UTC (rev 5383)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "RMEndpoint", targetNamespace = "http://org.jboss.ws.jaxws.cxf/wsrm")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface BasicRPCEndpoint
+{
+ @WebMethod
+ @WebResult(partName = "return")
+ public String echo(@WebParam(name = "arg0", partName = "arg0") String arg0);
+
+}
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.java 2007-12-20 20:13:24 UTC (rev 5383)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+// $Id$
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "RMEndpoint", targetNamespace = "http://org.jboss.ws.jaxws.cxf/wsrm", serviceName = "RMService")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class BasicRPCEndpointImpl implements BasicRPCEndpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java 2007-12-20 20:13:24 UTC (rev 5383)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+/**
+ * Test the CXF WS-ReliableMessaging
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-Dec-2007
+ */
+public class BasicRPCTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-rpc";
+ private String targetNS = "http://org.jboss.ws.jaxws.cxf/wsrm";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(BasicRPCTestCase.class, "jaxws-cxf-wsrm-basic-rpc.war");
+ }
+
+ public void testWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ Element wsdl = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(wsdl);
+
+ System.out.println("FIXME: [CXF-1310] Generated WSDL for an WS-RM endpoint does not contain RM policies");
+ }
+
+ public void _testStandardClient() throws Exception
+ {
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl").toURL();
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicRPCEndpoint port = (BasicRPCEndpoint)service.getPort(BasicRPCEndpoint.class);
+
+ System.out.println("FIXME: [CXF-1320] Configure WS-RM client from WSDL only");
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+
+ public void testSpringClient() throws Exception
+ {
+ SpringBusFactory bf = new SpringBusFactory();
+ URL cxfConfig = new File("resources/jaxws/cxf/wsrm/wsrm-client-config.xml").toURL();
+ Bus bus = bf.createBus(cxfConfig);
+ BusFactory.setDefaultBus(bus);
+
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl").toURL();
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicRPCEndpoint port = (BasicRPCEndpoint)service.getPort(BasicRPCEndpoint.class);
+
+ // Enable addressing
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put("org.apache.cxf.ws.addressing.using", Boolean.TRUE);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+}
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicRPCTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/WEB-INF (from rev 5382, stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF)
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-doc/wsrm-basic-doc.wsdl 2007-12-20 20:13:24 UTC (rev 5383)
@@ -0,0 +1,68 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm">
+
+ <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
+ <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
+ </wsrmp:RMAssertion>
+ </wsp:Policy>
+
+ <wsdl:types>
+ <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm"
+ xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="echo" type="tns:echo"/>
+ <xsd:complexType name="echo">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="echoResponse" type="tns:echoResponse"/>
+ <xsd:complexType name="echoResponse">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="return" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:portType name="RMEndpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="RMServiceSoapBinding" type="tns:RMEndpoint">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="RMService">
+ <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-doc"/>
+ <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Copied: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF (from rev 5381, stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF)
Modified: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/jbossws-cxf.xml 2007-12-20 18:45:28 UTC (rev 5381)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/jbossws-cxf.xml 2007-12-20 20:13:24 UTC (rev 5383)
@@ -14,7 +14,7 @@
</wsrmp:RMAssertion>
</wsp:Policy>
- <jaxws:endpoint id='TestService' address='http://@jboss.bind.address@:8080/jaxws-cxf-reliable' implementor='org.jboss.test.ws.jaxws.cxf.reliable.RMEndpointImpl'>
+ <jaxws:endpoint id='TestService' address='http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-rpc' implementor='org.jboss.test.ws.jaxws.cxf.wsrm.BasicRPCEndpointImpl'>
<jaxws:invoker>
<bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
</jaxws:invoker>
Modified: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/reliable/WEB-INF/web.xml 2007-12-20 18:45:28 UTC (rev 5381)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/WEB-INF/web.xml 2007-12-20 20:13:24 UTC (rev 5383)
@@ -6,12 +6,12 @@
version="2.4">
<servlet>
- <servlet-name>TestService</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.cxf.reliable.RMEndpointImpl</servlet-class>
+ <servlet-name>RMService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.wsrm.BasicRPCEndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
- <servlet-name>TestService</servlet-name>
+ <servlet-name>RMService</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl 2007-12-20 20:13:24 UTC (rev 5383)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService"
+ targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm">
+
+ <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
+ <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
+ </wsrmp:RMAssertion>
+ </wsp:Policy>
+
+ <wsdl:message name="echoResponse">
+ <wsdl:part name="return" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part name="arg0" type="xsd:string">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="RMEndpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="RMServiceSoapBinding" type="tns:RMEndpoint">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input name="echo">
+ <soap:body namespace="http://org.jboss.ws.jaxws.cxf/wsrm" use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body namespace="http://org.jboss.ws.jaxws.cxf/wsrm" use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="RMService">
+ <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-rpc"/>
+ <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/basic-rpc/wsrm-basic-rpc.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl 2007-12-20 19:54:45 UTC (rev 5382)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl 2007-12-20 20:13:24 UTC (rev 5383)
@@ -1,68 +0,0 @@
-<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm">
-
- <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
- <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
- <wsp:Policy/>
- </wsam:Addressing>
- <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
- <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
- </wsrmp:RMAssertion>
- </wsp:Policy>
-
- <wsdl:types>
- <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm"
- xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:element name="echo" type="tns:echo"/>
- <xsd:complexType name="echo">
- <xsd:sequence>
- <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="echoResponse" type="tns:echoResponse"/>
- <xsd:complexType name="echoResponse">
- <xsd:sequence>
- <xsd:element minOccurs="0" name="return" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:schema>
- </wsdl:types>
-
- <wsdl:message name="echo">
- <wsdl:part element="tns:echo" name="parameters">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="echoResponse">
- <wsdl:part element="tns:echoResponse" name="parameters">
- </wsdl:part>
- </wsdl:message>
-
- <wsdl:portType name="RMEndpoint">
- <wsdl:operation name="echo">
- <wsdl:input message="tns:echo" name="echo">
- </wsdl:input>
- <wsdl:output message="tns:echoResponse" name="echoResponse">
- </wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
-
- <wsdl:binding name="RMServiceSoapBinding" type="tns:RMEndpoint">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="echo">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="echo">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="echoResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="RMService">
- <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
- <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-doc"/>
- <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
17 years
JBossWS SVN: r5382 - in stack/cxf/trunk: src/test/java/org/jboss/test/ws/jaxws/cxf and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-12-20 14:54:45 -0500 (Thu, 20 Dec 2007)
New Revision: 5382
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/web.xml
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl
stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-client-config.xml
Modified:
stack/cxf/trunk/ant-import/build-testsuite-jars.xml
Log:
Add WS-RM basic doc test case
Modified: stack/cxf/trunk/ant-import/build-testsuite-jars.xml
===================================================================
--- stack/cxf/trunk/ant-import/build-testsuite-jars.xml 2007-12-20 18:45:28 UTC (rev 5381)
+++ stack/cxf/trunk/ant-import/build-testsuite-jars.xml 2007-12-20 19:54:45 UTC (rev 5382)
@@ -40,6 +40,17 @@
</webinf>
</war>
+ <!-- jaxws-cxf-wsrm-basic-doc -->
+ <war warfile="${tests.output.dir}/libs/jaxws-cxf-wsrm-basic-doc.war" webxml="${tests.output.dir}/resources/jaxws/cxf/wsrm/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/cxf/wsrm/WEB-INF">
+ <include name="jbossws-cxf.xml"/>
+ </webinf>
+ </war>
+
<!-- Please add alphabetically -->
</target>
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.java 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name = "RMEndpoint", targetNamespace = "http://org.jboss.ws.jaxws.cxf/wsrm")
+public interface BasicDocEndpoint
+{
+ @WebMethod
+ public String echo(String arg0);
+
+}
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.java 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+// $Id$
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name = "RMEndpoint", targetNamespace = "http://org.jboss.ws.jaxws.cxf/wsrm", serviceName = "RMService")
+public class BasicDocEndpointImpl implements BasicDocEndpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java (rev 0)
+++ stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.wsrm;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+/**
+ * Test the CXF WS-ReliableMessaging
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-Dec-2007
+ */
+public class BasicDocTestCase extends JBossWSTest
+{
+ private String endpointURL = "http://" + getServerHost() + ":8080/jaxws-cxf-wsrm-basic-doc";
+ private String targetNS = "http://org.jboss.ws.jaxws.cxf/wsrm";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(BasicDocTestCase.class, "jaxws-cxf-wsrm-basic-doc.war");
+ }
+
+ public void _testWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ Element wsdl = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(wsdl);
+
+ System.out.println("FIXME: [CXF-1310] Generated WSDL for an WS-RM endpoint does not contain RM policies");
+ }
+
+ public void _testStandardClient() throws Exception
+ {
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl").toURL();
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicDocEndpoint port = (BasicDocEndpoint)service.getPort(BasicDocEndpoint.class);
+
+ System.out.println("FIXME: [CXF-1320] Configure WS-RM client from WSDL only");
+
+ //Object retObj = port.echo("Hello");
+ //assertEquals("Hello", retObj);
+ }
+
+ public void testSpringClient() throws Exception
+ {
+ SpringBusFactory bf = new SpringBusFactory();
+ URL cxfConfig = new File("resources/jaxws/cxf/wsrm/wsrm-client-config.xml").toURL();
+ Bus bus = bf.createBus(cxfConfig);
+ BusFactory.setDefaultBus(bus);
+
+ URL wsdlURL = new File("resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl").toURL();
+ QName serviceName = new QName(targetNS, "RMService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ BasicDocEndpoint port = (BasicDocEndpoint)service.getPort(BasicDocEndpoint.class);
+
+ // Enable addressing
+ BindingProvider bp = (BindingProvider)port;
+ bp.getRequestContext().put("org.apache.cxf.ws.addressing.using", Boolean.TRUE);
+
+ Object retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+}
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/cxf/wsrm/BasicDocTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/jbossws-cxf.xml (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/jbossws-cxf.xml 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,28 @@
+<beans xmlns='http://www.springframework.org/schema/beans' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jaxws='http://cxf.apache.org/jaxws' xmlns:p="http://cxf.apache.org/policy"
+ xsi:schemaLocation='http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+ http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/11/ws-policy.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
+ <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
+ </wsrmp:RMAssertion>
+ </wsp:Policy>
+
+ <jaxws:endpoint id='RMService' address='http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-doc' implementor='org.jboss.test.ws.jaxws.cxf.wsrm.BasicDocEndpointImpl'>
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+ </jaxws:invoker>
+ <jaxws:features>
+ <p:policies namespace="http://www.w3.org/2006/07/ws-policy">
+ <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
+ </p:policies>
+ </jaxws:features>
+ </jaxws:endpoint>
+
+</beans>
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/jbossws-cxf.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/web.xml 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>RMService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.wsrm.BasicDocEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>RMService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,68 @@
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm">
+
+ <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
+ <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
+ </wsrmp:RMAssertion>
+ </wsp:Policy>
+
+ <wsdl:types>
+ <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws.jaxws.cxf/wsrm"
+ xmlns:tns="http://org.jboss.ws.jaxws.cxf/wsrm" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="echo" type="tns:echo"/>
+ <xsd:complexType name="echo">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="arg0" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="echoResponse" type="tns:echoResponse"/>
+ <xsd:complexType name="echoResponse">
+ <xsd:sequence>
+ <xsd:element minOccurs="0" name="return" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:portType name="RMEndpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="RMServiceSoapBinding" type="tns:RMEndpoint">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="RMService">
+ <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-wsrm-basic-doc"/>
+ <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-basic-doc.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-client-config.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-client-config.xml (rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-client-config.xml 2007-12-20 19:54:45 UTC (rev 5382)
@@ -0,0 +1,51 @@
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:p="http://cxf.apache.org/policy" xmlns:cxf="http://cxf.apache.org/core"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <bean id="mapAggregator" class="org.apache.cxf.ws.addressing.MAPAggregator"/>
+ <bean id="mapCodec" class="org.apache.cxf.ws.addressing.soap.MAPCodec"/>
+ <bean id="rmLogicalOut" class="org.apache.cxf.ws.rm.RMOutInterceptor">
+ <property name="bus" ref="cxf"/>
+ </bean>
+ <bean id="rmLogicalIn" class="org.apache.cxf.ws.rm.RMInInterceptor">
+ <property name="bus" ref="cxf"/>
+ </bean>
+ <bean id="rmCodec" class="org.apache.cxf.ws.rm.soap.RMSoapInterceptor"/>
+
+ <!--p:engine enabled="true" ignoreUnknownAssertions="true"/-->
+
+ <cxf:bus name="cxf">
+ <!--cxf:features>
+ <p:policies ignoreUnknownAssertions="true"/>
+ </cxf:features-->
+ <cxf:inInterceptors>
+ <ref bean="mapAggregator"/>
+ <ref bean="mapCodec"/>
+ <ref bean="rmLogicalIn"/>
+ <ref bean="rmCodec"/>
+ </cxf:inInterceptors>
+ <cxf:inFaultInterceptors>
+ <ref bean="mapAggregator"/>
+ <ref bean="mapCodec"/>
+ <ref bean="rmLogicalIn"/>
+ <ref bean="rmCodec"/>
+ </cxf:inFaultInterceptors>
+ <cxf:outInterceptors>
+ <ref bean="mapAggregator"/>
+ <ref bean="mapCodec"/>
+ <ref bean="rmLogicalOut"/>
+ <ref bean="rmCodec"/>
+ </cxf:outInterceptors>
+ <cxf:outFaultInterceptors>
+ <ref bean="mapAggregator"/>
+ <ref bean="mapCodec"/>
+ <ref bean="rmLogicalOut"/>
+ <ref bean="rmCodec"/>
+ </cxf:outFaultInterceptors>
+ </cxf:bus>
+
+</beans>
\ No newline at end of file
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/cxf/wsrm/wsrm-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years
JBossWS SVN: r5381 - in stack/native/trunk/src/main: resources and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2007-12-20 13:45:28 -0500 (Thu, 20 Dec 2007)
New Revision: 5381
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
stack/native/trunk/src/main/resources/jbossws-native-config.xml
stack/native/trunk/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
Log:
Merging asoldano branch to trunk, svn merge -r 5187:HEAD
Records management:
- [JBWS-1897]
- [JBWS-1898]
- [JBWS-1899]
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-12-20 18:38:09 UTC (rev 5380)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-12-20 18:45:28 UTC (rev 5381)
@@ -34,6 +34,7 @@
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
@@ -120,4 +121,11 @@
return resContext;
}
+ @Override
+ public void setOperationMetaData(OperationMetaData opMetaData)
+ {
+ super.setOperationMetaData(opMetaData);
+ if (opMetaData != null)
+ this.put(MessageContext.WSDL_OPERATION, opMetaData.getQName());
+ }
}
Modified: stack/native/trunk/src/main/resources/jbossws-native-config.xml
===================================================================
--- stack/native/trunk/src/main/resources/jbossws-native-config.xml 2007-12-20 18:38:09 UTC (rev 5380)
+++ stack/native/trunk/src/main/resources/jbossws-native-config.xml 2007-12-20 18:45:28 UTC (rev 5381)
@@ -56,6 +56,12 @@
<property name="provides">StackEndpointHandler</property>
</bean>
+ <bean name="WSNativeEndpointRecordProcessorDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect">
+ <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
+ <property name="requires">RegisteredEndpoint</property>
+ <property name="provides">EndpointRecordProcessors</property>
+ </bean>
+
<bean name="WSNativeEventingDeploymentAspect" class="org.jboss.wsf.stack.jbws.EventingDeploymentAspect">
<property name="requires">UnifiedMetaDataModel</property>
</bean>
@@ -101,6 +107,7 @@
<property name="aspects">
<set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
<inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEndpointRecordProcessorDeploymentAspect"/>
<inject bean="WSNativeEventingDeploymentAspect"/>
<inject bean="WSNativePublishContractDeploymentAspect"/>
<inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
@@ -121,6 +128,7 @@
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
<inject bean="WSNativeEagerInitializeDeploymentAspect"/>
<inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEndpointRecordProcessorDeploymentAspect"/>
<inject bean="WSNativeEventingDeploymentAspect"/>
<inject bean="WSNativePublishContractDeploymentAspect"/>
<inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
@@ -140,6 +148,7 @@
<inject bean="WSNativeContextPropertiesDeploymentAspect"/>
<inject bean="WSNativeEagerInitializeDeploymentAspect"/>
<inject bean="WSNativeEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSNativeEndpointRecordProcessorDeploymentAspect"/>
<inject bean="WSNativeEventingDeploymentAspect"/>
<inject bean="WSNativePublishContractDeploymentAspect"/>
<inject bean="WSNativeServiceEndpointInvokerDeploymentAspect"/>
@@ -150,4 +159,4 @@
</property>
<depends>WSDeploymentAspectInstallerEndpointAPI</depends>
</bean>
-
+
Modified: stack/native/trunk/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
===================================================================
--- stack/native/trunk/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml 2007-12-20 18:38:09 UTC (rev 5380)
+++ stack/native/trunk/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml 2007-12-20 18:45:28 UTC (rev 5381)
@@ -7,6 +7,15 @@
<endpoint-config>
<config-name>Standard Endpoint</config-name>
+ <pre-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>Recording Handler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.wsf.framework.invocation.RecordingServerHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </pre-handler-chains>
</endpoint-config>
<!--
17 years
JBossWS SVN: r5380 - in framework/trunk/src/main/java/org/jboss/wsf/framework: invocation and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2007-12-20 13:38:09 -0500 (Thu, 20 Dec 2007)
New Revision: 5380
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/invocation/RecordingServerHandler.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpoint.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointMBean.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java
Log:
Merging asoldano branch to trunk, svn merge -r 5187:HEAD
Records management:
- [JBWS-1897]
- [JBWS-1898]
- [JBWS-1899]
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2007-12-20 18:37:26 UTC (rev 5379)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -22,7 +22,9 @@
package org.jboss.wsf.framework.deployment;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
+import java.util.Vector;
import javax.management.ObjectName;
@@ -35,6 +37,9 @@
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
/**
* A general JAXWS endpoint.
@@ -56,7 +61,8 @@
private EndpointMetrics metrics;
private List<BindingCustomization> bindingCustomizsations = new ArrayList<BindingCustomization>();
private String address;
-
+ private List<RecordProcessor> recordProcessors = new Vector<RecordProcessor>();
+
DefaultEndpoint(String targetBean)
{
this.targetBean = targetBean;
@@ -244,4 +250,36 @@
if (state == EndpointState.STARTED)
throw new IllegalStateException("Cannot modify endpoint properties in state: " + state);
}
+
+ public List<RecordProcessor> getRecordProcessors()
+ {
+ return recordProcessors;
+ }
+
+ public void setRecordProcessors(List<RecordProcessor> recordProcessors)
+ {
+ this.recordProcessors = new Vector<RecordProcessor>(recordProcessors);
+ }
+
+ public void processRecord(Record record)
+ {
+ for (RecordProcessor processor : recordProcessors)
+ {
+ if (processor.isRecording())
+ {
+ boolean match = true;
+ if (processor.getFilters() != null)
+ {
+ for (Iterator<RecordFilter> it = processor.getFilters().iterator(); it.hasNext() && match;)
+ {
+ match = it.next().match(record);
+ }
+ }
+ if (match)
+ {
+ processor.processRecord(record);
+ }
+ }
+ }
+ }
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-12-20 18:37:26 UTC (rev 5379)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -70,6 +70,7 @@
InvocationHandler invocationHandler = getInvocationHandler(ep);
if (invocationHandler != null)
ep.setInvocationHandler(invocationHandler);
+
}
}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.deployment;
+
+//$Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.management.JMException;
+import javax.management.MBeanServer;
+
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.framework.management.recording.LogRecorder;
+import org.jboss.wsf.framework.management.recording.ManagedRecordProcessor;
+import org.jboss.wsf.framework.management.recording.MemoryBufferRecorder;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
+
+/**
+ * A deployer that sets the record processors for each endpoint
+ *
+ * @author alessio.soldano(a)jboss.org
+ * @since 12-Dec-2007
+ */
+public class EndpointRecordProcessorDeploymentAspect extends DeploymentAspect
+{
+ private MBeanServer mbeanServer;
+
+ @Override
+ public void create(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ /** Memory buffer recorder **/
+ MemoryBufferRecorder memoryRecorder = new MemoryBufferRecorder();
+ memoryRecorder.setName("MemoryBufferRecorder");
+ this.registerRecordProcessor(memoryRecorder, ep);
+ /** Log recorder **/
+ LogRecorder logRecorder = new LogRecorder();
+ logRecorder.setName("LogRecorder");
+ this.registerRecordProcessor(logRecorder, ep);
+
+ List<RecordProcessor> recordProcessorList = new LinkedList<RecordProcessor>();
+ recordProcessorList.add(memoryRecorder);
+ recordProcessorList.add(logRecorder);
+ ep.setRecordProcessors(recordProcessorList);
+ }
+ }
+
+ @Override
+ public void destroy(Deployment dep)
+ {
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ List<RecordProcessor> processors = ep.getRecordProcessors();
+ for (RecordProcessor processor : processors)
+ {
+ this.unregisterRecordProcessor(processor, ep);
+ }
+ }
+ }
+
+ private void registerRecordProcessor(RecordProcessor processor, Endpoint ep)
+ {
+ try
+ {
+ mbeanServer.registerMBean(processor, ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException ex)
+ {
+ log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ try
+ {
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException innerEx)
+ {
+ log.error("Cannot register endpoint with JMX server", innerEx);
+ }
+ }
+ }
+
+ private void unregisterRecordProcessor(RecordProcessor processor, Endpoint ep)
+ {
+ try
+ {
+ mbeanServer.unregisterMBean(ObjectNameFactory.create(ep.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException ex)
+ {
+ log.error("Cannot unregister record processor with JMX server", ex);
+ }
+ }
+
+ public MBeanServer getMbeanServer()
+ {
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+}
\ No newline at end of file
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/invocation/RecordingServerHandler.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/invocation/RecordingServerHandler.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/invocation/RecordingServerHandler.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/invocation/RecordingServerHandler.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,181 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.wsf.framework.invocation;
+
+
+import java.net.URL;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.framework.management.recording.RecordFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordGroupAssociation;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
+import org.jboss.wsf.spi.management.recording.Record.MessageType;
+import org.jboss.wsf.test.GenericSOAPHandler;
+
+/**
+ * This handler is responsible for collecting the information about the
+ * messages being exchanged and recording them on the server side. This
+ * is performed delegating to the RecordProcessors installed into the
+ * current endpoint.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public class RecordingServerHandler extends GenericSOAPHandler
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(RecordingServerHandler.class);
+
+ @SuppressWarnings("unchecked")
+ protected boolean handleInbound(MessageContext ctx)
+ {
+ Endpoint endpoint = EndpointAssociation.getEndpoint();
+ if (this.isRecording(endpoint))
+ {
+ Record record = RecordFactory.newRecord();
+ RecordGroupAssociation.pushGroupID(record.getGroupID());
+ record.setDate(new Date());
+ HttpServletRequest httpServletRequest = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
+ if (httpServletRequest != null)
+ {
+ try
+ {
+ record.setDestinationHost(new URL(httpServletRequest.getRequestURL().toString()).getHost());
+ record.setSourceHost(httpServletRequest.getRemoteHost());
+ }
+ catch (Exception e)
+ {
+ log.warn("Unable to read from the http servlet request! " + e.getMessage());
+ }
+ }
+ record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_REQUEST_HEADERS)));
+ record.setMessageType(MessageType.INBOUND);
+ record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
+ boolean processEnvelope = false;
+ for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
+ {
+ processEnvelope = it.next().isProcessEnvelope();
+ }
+ if (processEnvelope) //skip message processing if not required since it's very time-consuming
+ {
+ SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
+ try
+ {
+ SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
+ if (soapEnv != null)
+ {
+ record.setEnvelope(DOMWriter.printNode(soapEnv, true));
+ }
+ }
+ catch (SOAPException ex)
+ {
+ log.error("Cannot trace SOAPMessage", ex);
+ }
+ }
+ endpoint.processRecord(record);
+ }
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected boolean handleOutbound(MessageContext ctx)
+ {
+ Endpoint endpoint = EndpointAssociation.getEndpoint();
+ if (this.isRecording(endpoint))
+ {
+ String groupID = RecordGroupAssociation.popGroupID();
+ Record record = RecordFactory.newRecord(groupID);
+ record.setDate(new Date());
+ record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_RESPONSE_HEADERS)));
+ record.setMessageType(MessageType.OUTBOUND);
+ record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
+ boolean processEnvelope = false;
+ for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
+ {
+ processEnvelope = it.next().isProcessEnvelope();
+ }
+ if (processEnvelope) //skip message processing if not required since it's very time-consuming
+ {
+ SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
+ try
+ {
+ SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
+ if (soapEnv != null)
+ {
+ record.setEnvelope(DOMWriter.printNode(soapEnv, true));
+ }
+ }
+ catch (SOAPException ex)
+ {
+ log.error("Cannot trace SOAPMessage", ex);
+ }
+ }
+ endpoint.processRecord(record);
+ }
+ return true;
+ }
+
+ public boolean handleFault(MessageContext ctx)
+ {
+ return handleOutbound(ctx);
+ }
+
+ /**
+ * Returns true if there's at least a record processor in recording mode
+ *
+ * @param endpoint
+ * @return
+ */
+ private boolean isRecording(Endpoint endpoint)
+ {
+ List<RecordProcessor> processors = endpoint.getRecordProcessors();
+ if (processors == null || processors.isEmpty())
+ {
+ return false;
+ }
+ for (RecordProcessor processor : processors)
+ {
+ if (processor.isRecording())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpoint.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpoint.java 2007-12-20 18:37:26 UTC (rev 5379)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpoint.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -24,9 +24,18 @@
// $Id: ManagedEndpointRegistry.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
import java.util.Date;
+import java.util.List;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.framework.management.recording.ManagedRecordProcessor;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
/**
* The endpoint MBean representation
@@ -37,10 +46,13 @@
public class ManagedEndpoint implements ManagedEndpointMBean
{
private Endpoint endpoint;
+ private MBeanServer mbeanServer;
+ private Logger log = Logger.getLogger(this.getClass());
- public ManagedEndpoint(Endpoint endpoint)
+ public ManagedEndpoint(Endpoint endpoint, MBeanServer mbeanServer)
{
this.endpoint = endpoint;
+ this.mbeanServer = mbeanServer;
}
public long getAverageProcessingTime()
@@ -106,4 +118,72 @@
{
endpoint.getLifecycleHandler().stop(endpoint);
}
+
+ public void processRecord(Record record)
+ {
+ endpoint.processRecord(record);
+ }
+
+ public void addRecordProcessor(RecordProcessor processor)
+ {
+ this.getRecordProcessors().add(processor);
+ try
+ {
+ mbeanServer.registerMBean(processor, ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException ex)
+ {
+ log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ try
+ {
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException innerEx)
+ {
+ log.error("Cannot register endpoint with JMX server", innerEx);
+ }
+ }
+ }
+
+ public List<RecordProcessor> getRecordProcessors()
+ {
+ return endpoint.getRecordProcessors();
+ }
+
+ public void setRecordProcessors(List<RecordProcessor> processors)
+ {
+ //unregister current processors
+ for (RecordProcessor processor : processors)
+ {
+ try
+ {
+ mbeanServer.unregisterMBean(ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException ex)
+ {
+ log.error("Cannot unregister record processor with JMX server", ex);
+ }
+ }
+ //set and register the new processors
+ endpoint.setRecordProcessors(processors);
+ for (RecordProcessor processor : processors)
+ {
+ try
+ {
+ mbeanServer.registerMBean(processor, ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException ex)
+ {
+ log.debug("Cannot register endpoint with JMX server, trying with the default ManagedRecordProcessor: " + ex.getMessage());
+ try
+ {
+ mbeanServer.registerMBean(new ManagedRecordProcessor(processor), ObjectNameFactory.create(endpoint.getName() + ",recordProcessor=" + processor.getName()));
+ }
+ catch (JMException innerEx)
+ {
+ log.error("Cannot register endpoint with JMX server", innerEx);
+ }
+ }
+ }
+ }
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointMBean.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointMBean.java 2007-12-20 18:37:26 UTC (rev 5379)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointMBean.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -22,7 +22,11 @@
package org.jboss.wsf.framework.management;
import java.util.Date;
+import java.util.List;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
+
/**
* MBean interface.
* @since 15-April-2004
@@ -50,4 +54,13 @@
long getFaultCount();
long getResponseCount();
+
+ void processRecord(Record record);
+
+ void addRecordProcessor(RecordProcessor processor);
+
+ List<RecordProcessor> getRecordProcessors();
+
+ void setRecordProcessors(List<RecordProcessor> processors);
+
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java 2007-12-20 18:37:26 UTC (rev 5379)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -60,7 +60,7 @@
try
{
- ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint);
+ ManagedEndpoint jmxEndpoint = new ManagedEndpoint(endpoint, mbeanServer);
getMbeanServer().registerMBean(jmxEndpoint, endpoint.getName());
}
catch (JMException ex)
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording)
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,184 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.List;
-import java.util.Vector;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-import org.jboss.wsf.spi.management.recording.RecordProcessor;
-
-/**
- * An abstract record processor providing basic implementation
- * of the processor configuration and filter's management
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public abstract class AbstractRecordProcessor implements RecordProcessor
-{
-
- protected List<RecordFilter> filters = new Vector<RecordFilter>();
- protected boolean processDestinationHost = true;
- protected boolean processSourceHost = true;
- protected boolean processHeaders = true;
- protected boolean processEnvelope = true;
- protected boolean processMessageType = true;
- protected boolean processOperation = true;
- protected boolean processDate = true;
- protected String name;
- protected boolean recording = false;
-
- public abstract void processRecord(Record record);
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void addFilter(RecordFilter filter)
- {
- filters.add(filter);
- }
-
- public List<RecordFilter> getFilters()
- {
- return filters;
- }
-
- public void setFilters(List<RecordFilter> filters)
- {
- this.filters = new Vector<RecordFilter>(filters);
- }
-
- public boolean isProcessDestinationHost()
- {
- return processDestinationHost;
- }
-
- public void setProcessDestinationHost(boolean processDestinationHost)
- {
- this.processDestinationHost = processDestinationHost;
- }
-
- public boolean isProcessSourceHost()
- {
- return processSourceHost;
- }
-
- public void setProcessSourceHost(boolean processSourceHost)
- {
- this.processSourceHost = processSourceHost;
- }
-
- public boolean isProcessHeaders()
- {
- return processHeaders;
- }
-
- public void setProcessHeaders(boolean processHeaders)
- {
- this.processHeaders = processHeaders;
- }
-
- public boolean isProcessEnvelope()
- {
- return processEnvelope;
- }
-
- public void setProcessEnvelope(boolean processEnvelope)
- {
- this.processEnvelope = processEnvelope;
- }
-
- public boolean isProcessMessageType()
- {
- return processMessageType;
- }
-
- public void setProcessMessageType(boolean processMessageType)
- {
- this.processMessageType = processMessageType;
- }
-
- public boolean isProcessOperation()
- {
- return processOperation;
- }
-
- public void setProcessOperation(boolean processOperation)
- {
- this.processOperation = processOperation;
- }
-
- public boolean isProcessDate()
- {
- return processDate;
- }
-
- public void setProcessDate(boolean processDate)
- {
- this.processDate = processDate;
- }
-
- public boolean isRecording()
- {
- return recording;
- }
-
- public void setRecording(boolean recording)
- {
- this.recording = recording;
- }
-
- public String toString()
- {
- StringBuffer sb = new StringBuffer();
- sb.append(super.toString());
- sb.append(" (recording = ");
- sb.append(recording);
- sb.append(", processDestinationHost = ");
- sb.append(processDestinationHost);
- sb.append(", processSourceHost = ");
- sb.append(processSourceHost);
- sb.append(", processHeaders = ");
- sb.append(processHeaders);
- sb.append(", processEnvelope = ");
- sb.append(processEnvelope);
- sb.append(", processMessageType = ");
- sb.append(processMessageType);
- sb.append(", processOperation = ");
- sb.append(processOperation);
- sb.append(", processDate = ");
- sb.append(processDate);
- sb.append(")");
- return sb.toString();
- }
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AbstractRecordProcessor.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,184 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.List;
+import java.util.Vector;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
+
+/**
+ * An abstract record processor providing basic implementation
+ * of the processor configuration and filter's management
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public abstract class AbstractRecordProcessor implements RecordProcessor
+{
+
+ protected List<RecordFilter> filters = new Vector<RecordFilter>();
+ protected boolean processDestinationHost = true;
+ protected boolean processSourceHost = true;
+ protected boolean processHeaders = true;
+ protected boolean processEnvelope = true;
+ protected boolean processMessageType = true;
+ protected boolean processOperation = true;
+ protected boolean processDate = true;
+ protected String name;
+ protected boolean recording = false;
+
+ public abstract void processRecord(Record record);
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addFilter(RecordFilter filter)
+ {
+ filters.add(filter);
+ }
+
+ public List<RecordFilter> getFilters()
+ {
+ return filters;
+ }
+
+ public void setFilters(List<RecordFilter> filters)
+ {
+ this.filters = new Vector<RecordFilter>(filters);
+ }
+
+ public boolean isProcessDestinationHost()
+ {
+ return processDestinationHost;
+ }
+
+ public void setProcessDestinationHost(boolean processDestinationHost)
+ {
+ this.processDestinationHost = processDestinationHost;
+ }
+
+ public boolean isProcessSourceHost()
+ {
+ return processSourceHost;
+ }
+
+ public void setProcessSourceHost(boolean processSourceHost)
+ {
+ this.processSourceHost = processSourceHost;
+ }
+
+ public boolean isProcessHeaders()
+ {
+ return processHeaders;
+ }
+
+ public void setProcessHeaders(boolean processHeaders)
+ {
+ this.processHeaders = processHeaders;
+ }
+
+ public boolean isProcessEnvelope()
+ {
+ return processEnvelope;
+ }
+
+ public void setProcessEnvelope(boolean processEnvelope)
+ {
+ this.processEnvelope = processEnvelope;
+ }
+
+ public boolean isProcessMessageType()
+ {
+ return processMessageType;
+ }
+
+ public void setProcessMessageType(boolean processMessageType)
+ {
+ this.processMessageType = processMessageType;
+ }
+
+ public boolean isProcessOperation()
+ {
+ return processOperation;
+ }
+
+ public void setProcessOperation(boolean processOperation)
+ {
+ this.processOperation = processOperation;
+ }
+
+ public boolean isProcessDate()
+ {
+ return processDate;
+ }
+
+ public void setProcessDate(boolean processDate)
+ {
+ this.processDate = processDate;
+ }
+
+ public boolean isRecording()
+ {
+ return recording;
+ }
+
+ public void setRecording(boolean recording)
+ {
+ this.recording = recording;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(super.toString());
+ sb.append(" (recording = ");
+ sb.append(recording);
+ sb.append(", processDestinationHost = ");
+ sb.append(processDestinationHost);
+ sb.append(", processSourceHost = ");
+ sb.append(processSourceHost);
+ sb.append(", processHeaders = ");
+ sb.append(processHeaders);
+ sb.append(", processEnvelope = ");
+ sb.append(processEnvelope);
+ sb.append(", processMessageType = ");
+ sb.append(processMessageType);
+ sb.append(", processOperation = ");
+ sb.append(processOperation);
+ sb.append(", processDate = ");
+ sb.append(processDate);
+ sb.append(")");
+ return sb.toString();
+ }
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * A simple record filter acting like the AND operator
- *
- * @author alessio.soldano(a)jboss.com
- * @since 18-Dec-2007
- *
- */
-public class AndFilter implements RecordFilter
-{
-
- private RecordFilter filter1;
- private RecordFilter filter2;
-
- public AndFilter(RecordFilter filter1, RecordFilter filter2)
- {
- this.filter1 = filter1;
- this.filter2 = filter2;
- }
-
- public boolean match(Record record)
- {
- return filter1.match(record) && filter2.match(record);
- }
-
- public RecordFilter getFilter1()
- {
- return filter1;
- }
-
- public RecordFilter getFilter2()
- {
- return filter2;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/AndFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * A simple record filter acting like the AND operator
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-Dec-2007
+ *
+ */
+public class AndFilter implements RecordFilter
+{
+
+ private RecordFilter filter1;
+ private RecordFilter filter2;
+
+ public AndFilter(RecordFilter filter1, RecordFilter filter2)
+ {
+ this.filter1 = filter1;
+ this.filter2 = filter2;
+ }
+
+ public boolean match(Record record)
+ {
+ return filter1.match(record) && filter2.match(record);
+ }
+
+ public RecordFilter getFilter1()
+ {
+ return filter1;
+ }
+
+ public RecordFilter getFilter2()
+ {
+ return filter2;
+ }
+
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * This filter matches records having the source/destination host equal to
- * any of the provided hosts.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 11-Dec-2007
- */
-public class HostFilter implements RecordFilter
-{
- private List<String> hosts = new LinkedList<String>();
- private boolean source;
-
- public HostFilter(String host, boolean source)
- {
- this.hosts.add(host);
- this.source = source;
- }
-
- public HostFilter(Collection<String> hosts, boolean source)
- {
- this.hosts.addAll(hosts);
- this.source = source;
- }
-
- public boolean match(Record record)
- {
- for (String host : hosts)
- {
- if ((source && host.equalsIgnoreCase(record.getSourceHost())) || (!source && host.equalsIgnoreCase(record.getDestinationHost())))
- {
- return true;
- }
- }
- return false;
- }
-
- public List<String> getHosts()
- {
- return hosts;
- }
-
- public boolean isSource()
- {
- return source;
- }
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/HostFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * This filter matches records having the source/destination host equal to
+ * any of the provided hosts.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Dec-2007
+ */
+public class HostFilter implements RecordFilter
+{
+ private List<String> hosts = new LinkedList<String>();
+ private boolean source;
+
+ public HostFilter(String host, boolean source)
+ {
+ this.hosts.add(host);
+ this.source = source;
+ }
+
+ public HostFilter(Collection<String> hosts, boolean source)
+ {
+ this.hosts.addAll(hosts);
+ this.source = source;
+ }
+
+ public boolean match(Record record)
+ {
+ for (String host : hosts)
+ {
+ if ((source && host.equalsIgnoreCase(record.getSourceHost())) || (!source && host.equalsIgnoreCase(record.getDestinationHost())))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public List<String> getHosts()
+ {
+ return hosts;
+ }
+
+ public boolean isSource()
+ {
+ return source;
+ }
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.Record.MessageType;
-
-/**
- * A simple record processor that writes records to the configured log.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public class LogRecorder extends AbstractRecordProcessor
-{
- private Logger log = Logger.getLogger(this.getClass());
-
- @Override
- public void processRecord(Record record)
- {
- StringBuffer sb = new StringBuffer();
- if (this.isProcessMessageType())
- {
- if (record.getMessageType() == MessageType.INBOUND)
- {
- sb.append("INBOUND MESSAGE ");
- if (this.isProcessSourceHost() && record.getSourceHost() != null)
- {
- sb.append("from ");
- sb.append(record.getSourceHost());
- }
- }
- else if (record.getMessageType() == MessageType.OUTBOUND)
- {
- sb.append("OUTBOUND MESSAGE ");
- if (this.isProcessDestinationHost() && record.getDestinationHost() != null)
- {
- sb.append("to ");
- sb.append(record.getDestinationHost());
- }
- }
- else
- {
- log.warn("Unknown message type: " + record.getMessageType());
- if (this.isProcessSourceHost() && record.getSourceHost() != null)
- {
- sb.append("from ");
- sb.append(record.getSourceHost());
- }
- if (this.isProcessDestinationHost() && record.getDestinationHost() != null)
- {
- sb.append("to ");
- sb.append(record.getDestinationHost());
- }
- }
- }
- else
- {
- sb.append("MESSAGE");
- }
- sb.append(":");
- if (this.isProcessDate())
- {
- sb.append("\nDate: ");
- sb.append(record.getDate());
- }
- sb.append("\nGroupID: ");
- sb.append(record.getGroupID());
- if (this.isProcessOperation())
- {
- sb.append("\nOperation: ");
- sb.append(record.getOperation());
- }
- sb.append("\n");
- Map<String, List<String>> headers = record.getHeaders();
- if (this.isProcessHeaders() && headers != null)
- {
- for (String key : headers.keySet())
- {
- sb.append(key);
- sb.append(": ");
- for (String h : headers.get(key))
- {
- sb.append(h);
- sb.append("; ");
- }
- sb.append("\n");
- }
- sb.append("\n");
- }
- sb.append("\n");
- if (this.isProcessEnvelope())
- {
- sb.append(record.getEnvelope());
- }
- log.debug(sb.toString());
- }
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/LogRecorder.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.Record.MessageType;
+
+/**
+ * A simple record processor that writes records to the configured log.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public class LogRecorder extends AbstractRecordProcessor
+{
+ private Logger log = Logger.getLogger(this.getClass());
+
+ @Override
+ public void processRecord(Record record)
+ {
+ StringBuffer sb = new StringBuffer();
+ if (this.isProcessMessageType())
+ {
+ if (record.getMessageType() == MessageType.INBOUND)
+ {
+ sb.append("INBOUND MESSAGE ");
+ if (this.isProcessSourceHost() && record.getSourceHost() != null)
+ {
+ sb.append("from ");
+ sb.append(record.getSourceHost());
+ }
+ }
+ else if (record.getMessageType() == MessageType.OUTBOUND)
+ {
+ sb.append("OUTBOUND MESSAGE ");
+ if (this.isProcessDestinationHost() && record.getDestinationHost() != null)
+ {
+ sb.append("to ");
+ sb.append(record.getDestinationHost());
+ }
+ }
+ else
+ {
+ log.warn("Unknown message type: " + record.getMessageType());
+ if (this.isProcessSourceHost() && record.getSourceHost() != null)
+ {
+ sb.append("from ");
+ sb.append(record.getSourceHost());
+ }
+ if (this.isProcessDestinationHost() && record.getDestinationHost() != null)
+ {
+ sb.append("to ");
+ sb.append(record.getDestinationHost());
+ }
+ }
+ }
+ else
+ {
+ sb.append("MESSAGE");
+ }
+ sb.append(":");
+ if (this.isProcessDate())
+ {
+ sb.append("\nDate: ");
+ sb.append(record.getDate());
+ }
+ sb.append("\nGroupID: ");
+ sb.append(record.getGroupID());
+ if (this.isProcessOperation())
+ {
+ sb.append("\nOperation: ");
+ sb.append(record.getOperation());
+ }
+ sb.append("\n");
+ Map<String, List<String>> headers = record.getHeaders();
+ if (this.isProcessHeaders() && headers != null)
+ {
+ for (String key : headers.keySet())
+ {
+ sb.append(key);
+ sb.append(": ");
+ for (String h : headers.get(key))
+ {
+ sb.append(h);
+ sb.append("; ");
+ }
+ sb.append("\n");
+ }
+ sb.append("\n");
+ }
+ sb.append("\n");
+ if (this.isProcessEnvelope())
+ {
+ sb.append(record.getEnvelope());
+ }
+ log.debug(sb.toString());
+ }
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,146 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.List;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-import org.jboss.wsf.spi.management.recording.RecordProcessor;
-
-/**
- * The record processor MBean representation
- *
- * @author alessio.soldano(a)jboss.org
- * @since 12-Dec-2007
- */
-public class ManagedRecordProcessor implements ManagedRecordProcessorMBean
-{
- private RecordProcessor processor;
-
- public ManagedRecordProcessor(RecordProcessor processor)
- {
- this.processor = processor;
- }
-
- public void addFilter(RecordFilter filter)
- {
- processor.addFilter(filter);
- }
-
- public List<RecordFilter> getFilters()
- {
- return processor.getFilters();
- }
-
- public boolean isProcessDate()
- {
- return processor.isProcessDate();
- }
-
- public boolean isProcessDestinationHost()
- {
- return processor.isProcessDestinationHost();
- }
-
- public boolean isProcessHeaders()
- {
- return processor.isProcessHeaders();
- }
-
- public boolean isProcessEnvelope()
- {
- return processor.isProcessEnvelope();
- }
-
- public boolean isProcessMessageType()
- {
- return processor.isProcessMessageType();
- }
-
- public boolean isProcessOperation()
- {
- return processor.isProcessOperation();
- }
-
- public boolean isProcessSourceHost()
- {
- return processor.isProcessSourceHost();
- }
-
- public void processRecord(Record record)
- {
- processor.processRecord(record);
- }
-
- public void setFilters(List<RecordFilter> filters)
- {
- processor.setFilters(filters);
- }
-
- public void setProcessDate(boolean value)
- {
- processor.setProcessDate(value);
- }
-
- public void setProcessDestinationHost(boolean value)
- {
- processor.setProcessDestinationHost(value);
- }
-
- public void setProcessHeaders(boolean value)
- {
- processor.setProcessHeaders(value);
- }
-
- public void setProcessEnvelope(boolean value)
- {
- processor.setProcessEnvelope(value);
- }
-
- public void setProcessMessageType(boolean value)
- {
- processor.setProcessMessageType(value);
- }
-
- public void setProcessOperation(boolean value)
- {
- processor.setProcessOperation(value);
- }
-
- public void setProcessSourceHost(boolean value)
- {
- processor.setProcessSourceHost(value);
- }
-
- public boolean isRecording()
- {
- return processor.isRecording();
- }
-
- public void setRecording(boolean value)
- {
- processor.setRecording(value);
- }
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessor.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
+
+/**
+ * The record processor MBean representation
+ *
+ * @author alessio.soldano(a)jboss.org
+ * @since 12-Dec-2007
+ */
+public class ManagedRecordProcessor implements ManagedRecordProcessorMBean
+{
+ private RecordProcessor processor;
+
+ public ManagedRecordProcessor(RecordProcessor processor)
+ {
+ this.processor = processor;
+ }
+
+ public void addFilter(RecordFilter filter)
+ {
+ processor.addFilter(filter);
+ }
+
+ public List<RecordFilter> getFilters()
+ {
+ return processor.getFilters();
+ }
+
+ public boolean isProcessDate()
+ {
+ return processor.isProcessDate();
+ }
+
+ public boolean isProcessDestinationHost()
+ {
+ return processor.isProcessDestinationHost();
+ }
+
+ public boolean isProcessHeaders()
+ {
+ return processor.isProcessHeaders();
+ }
+
+ public boolean isProcessEnvelope()
+ {
+ return processor.isProcessEnvelope();
+ }
+
+ public boolean isProcessMessageType()
+ {
+ return processor.isProcessMessageType();
+ }
+
+ public boolean isProcessOperation()
+ {
+ return processor.isProcessOperation();
+ }
+
+ public boolean isProcessSourceHost()
+ {
+ return processor.isProcessSourceHost();
+ }
+
+ public void processRecord(Record record)
+ {
+ processor.processRecord(record);
+ }
+
+ public void setFilters(List<RecordFilter> filters)
+ {
+ processor.setFilters(filters);
+ }
+
+ public void setProcessDate(boolean value)
+ {
+ processor.setProcessDate(value);
+ }
+
+ public void setProcessDestinationHost(boolean value)
+ {
+ processor.setProcessDestinationHost(value);
+ }
+
+ public void setProcessHeaders(boolean value)
+ {
+ processor.setProcessHeaders(value);
+ }
+
+ public void setProcessEnvelope(boolean value)
+ {
+ processor.setProcessEnvelope(value);
+ }
+
+ public void setProcessMessageType(boolean value)
+ {
+ processor.setProcessMessageType(value);
+ }
+
+ public void setProcessOperation(boolean value)
+ {
+ processor.setProcessOperation(value);
+ }
+
+ public void setProcessSourceHost(boolean value)
+ {
+ processor.setProcessSourceHost(value);
+ }
+
+ public boolean isRecording()
+ {
+ return processor.isRecording();
+ }
+
+ public void setRecording(boolean value)
+ {
+ processor.setRecording(value);
+ }
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.List;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * The record processor MBean interface
- *
- * @author alessio.soldano(a)jboss.com
- * @since 12-Dec-2007
- */
-public interface ManagedRecordProcessorMBean
-{
- public void processRecord(Record record);
-
- public void setRecording(boolean value);
-
- public boolean isRecording();
-
- public List<RecordFilter> getFilters();
-
- public void addFilter(RecordFilter filter);
-
- public void setFilters(List<RecordFilter> filters);
-
- public boolean isProcessSourceHost();
-
- public void setProcessSourceHost(boolean value);
-
- public boolean isProcessDestinationHost();
-
- public void setProcessDestinationHost(boolean value);
-
- public boolean isProcessMessageType();
-
- public void setProcessMessageType(boolean value);
-
- public boolean isProcessEnvelope();
-
- public void setProcessEnvelope(boolean value);
-
- public boolean isProcessHeaders();
-
- public void setProcessHeaders(boolean value);
-
- public boolean isProcessOperation();
-
- public void setProcessOperation(boolean value);
-
- public boolean isProcessDate();
-
- public void setProcessDate(boolean value);
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/ManagedRecordProcessorMBean.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * The record processor MBean interface
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 12-Dec-2007
+ */
+public interface ManagedRecordProcessorMBean
+{
+ public void processRecord(Record record);
+
+ public void setRecording(boolean value);
+
+ public boolean isRecording();
+
+ public List<RecordFilter> getFilters();
+
+ public void addFilter(RecordFilter filter);
+
+ public void setFilters(List<RecordFilter> filters);
+
+ public boolean isProcessSourceHost();
+
+ public void setProcessSourceHost(boolean value);
+
+ public boolean isProcessDestinationHost();
+
+ public void setProcessDestinationHost(boolean value);
+
+ public boolean isProcessMessageType();
+
+ public void setProcessMessageType(boolean value);
+
+ public boolean isProcessEnvelope();
+
+ public void setProcessEnvelope(boolean value);
+
+ public boolean isProcessHeaders();
+
+ public void setProcessHeaders(boolean value);
+
+ public boolean isProcessOperation();
+
+ public void setProcessOperation(boolean value);
+
+ public boolean isProcessDate();
+
+ public void setProcessDate(boolean value);
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,173 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-import org.jboss.wsf.spi.management.recording.Record.MessageType;
-
-/**
- * Keeps the last received records in memory and allows user to
- * search / get statistics on them.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 12-Dec-2007
- */
-public class MemoryBufferRecorder extends AbstractRecordProcessor implements MemoryBufferRecorderMBean
-{
-
- private Map<String, List<Record>> recentRecords = Collections.synchronizedMap(new HashMap<String, List<Record>>());
- private ConcurrentLinkedQueue<String> recentRecordGroups = new ConcurrentLinkedQueue<String>();
- private int size = 0;
-
- private int maxSize = 50;
-
- @Override
- public void processRecord(Record record)
- {
- synchronized (recentRecords)
- {
- List<Record> list = recentRecords.get(record.getGroupID());
- if (list == null)
- {
- list = new LinkedList<Record>();
- recentRecords.put(record.getGroupID(), list);
- while (size > maxSize)
- {
- this.deleteOldestRecord();
- }
- recentRecordGroups.offer(record.getGroupID());
- size++;
- }
- list.add(record);
- }
- }
-
-
- private void deleteOldestRecord()
- {
- String id = recentRecordGroups.poll();
- if (id != null)
- {
- recentRecords.remove(id);
- size--;
- }
- }
-
- private Map<String, List<Record>> getRecentRecords()
- {
- synchronized (recentRecords)
- {
- return new HashMap<String, List<Record>>(recentRecords);
- }
- }
-
- public Set<String> getClientHosts()
- {
- Map<String, List<Record>> map = this.getRecentRecords();
- Set<String> hosts = new HashSet<String>();
- for (List<Record> list : map.values())
- {
- for (Record record : list)
- {
- if (MessageType.INBOUND.equals(record.getMessageType()) && record.getSourceHost() != null)
- {
- hosts.add(record.getSourceHost());
- }
- }
- }
- return hosts;
- }
-
- public Map<String, List<Record>> getMatchingRecords(RecordFilter[] filters)
- {
- Map<String, List<Record>> map = this.getRecentRecords();
- Map<String, List<Record>> result = new HashMap<String, List<Record>>();
- for (List<Record> list : map.values())
- {
- for (Record record : list)
- {
- boolean match = true;
- for (int i = 0; i < filters.length && match; i++)
- {
- match = match && filters[i].match(record);
- }
- if (match)
- {
- result.put(record.getGroupID(), list);
- break;
- }
- }
- }
- return result;
- }
-
- public Map<String, List<Record>> getRecordsByClientHost(String clientHost)
- {
- RecordFilter[] filters = new RecordFilter[1];
- filters[0] = new HostFilter(clientHost, true);
- return this.getMatchingRecords(filters);
- }
-
- public Map<String, List<Record>> getRecordsByOperation(String namespace, String localPart)
- {
- RecordFilter[] filters = new RecordFilter[1];
- filters[0] = new OperationFilter(new QName(namespace, localPart));
- return this.getMatchingRecords(filters);
- }
-
- public int getMaxSize()
- {
- return maxSize;
- }
-
- public void setMaxSize(int maxSize)
- {
- synchronized (recentRecords)
- {
- while (maxSize < size)
- {
- this.deleteOldestRecord();
- }
- this.maxSize = maxSize;
- }
- }
-
- public int getSize()
- {
- return size;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorder.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+import org.jboss.wsf.spi.management.recording.Record.MessageType;
+
+/**
+ * Keeps the last received records in memory and allows user to
+ * search / get statistics on them.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 12-Dec-2007
+ */
+public class MemoryBufferRecorder extends AbstractRecordProcessor implements MemoryBufferRecorderMBean
+{
+
+ private Map<String, List<Record>> recentRecords = Collections.synchronizedMap(new HashMap<String, List<Record>>());
+ private ConcurrentLinkedQueue<String> recentRecordGroups = new ConcurrentLinkedQueue<String>();
+ private int size = 0;
+
+ private int maxSize = 50;
+
+ @Override
+ public void processRecord(Record record)
+ {
+ synchronized (recentRecords)
+ {
+ List<Record> list = recentRecords.get(record.getGroupID());
+ if (list == null)
+ {
+ list = new LinkedList<Record>();
+ recentRecords.put(record.getGroupID(), list);
+ while (size > maxSize)
+ {
+ this.deleteOldestRecord();
+ }
+ recentRecordGroups.offer(record.getGroupID());
+ size++;
+ }
+ list.add(record);
+ }
+ }
+
+
+ private void deleteOldestRecord()
+ {
+ String id = recentRecordGroups.poll();
+ if (id != null)
+ {
+ recentRecords.remove(id);
+ size--;
+ }
+ }
+
+ private Map<String, List<Record>> getRecentRecords()
+ {
+ synchronized (recentRecords)
+ {
+ return new HashMap<String, List<Record>>(recentRecords);
+ }
+ }
+
+ public Set<String> getClientHosts()
+ {
+ Map<String, List<Record>> map = this.getRecentRecords();
+ Set<String> hosts = new HashSet<String>();
+ for (List<Record> list : map.values())
+ {
+ for (Record record : list)
+ {
+ if (MessageType.INBOUND.equals(record.getMessageType()) && record.getSourceHost() != null)
+ {
+ hosts.add(record.getSourceHost());
+ }
+ }
+ }
+ return hosts;
+ }
+
+ public Map<String, List<Record>> getMatchingRecords(RecordFilter[] filters)
+ {
+ Map<String, List<Record>> map = this.getRecentRecords();
+ Map<String, List<Record>> result = new HashMap<String, List<Record>>();
+ for (List<Record> list : map.values())
+ {
+ for (Record record : list)
+ {
+ boolean match = true;
+ for (int i = 0; i < filters.length && match; i++)
+ {
+ match = match && filters[i].match(record);
+ }
+ if (match)
+ {
+ result.put(record.getGroupID(), list);
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+ public Map<String, List<Record>> getRecordsByClientHost(String clientHost)
+ {
+ RecordFilter[] filters = new RecordFilter[1];
+ filters[0] = new HostFilter(clientHost, true);
+ return this.getMatchingRecords(filters);
+ }
+
+ public Map<String, List<Record>> getRecordsByOperation(String namespace, String localPart)
+ {
+ RecordFilter[] filters = new RecordFilter[1];
+ filters[0] = new OperationFilter(new QName(namespace, localPart));
+ return this.getMatchingRecords(filters);
+ }
+
+ public int getMaxSize()
+ {
+ return maxSize;
+ }
+
+ public void setMaxSize(int maxSize)
+ {
+ synchronized (recentRecords)
+ {
+ while (maxSize < size)
+ {
+ this.deleteOldestRecord();
+ }
+ this.maxSize = maxSize;
+ }
+ }
+
+ public int getSize()
+ {
+ return size;
+ }
+
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * The MemoryBufferRecorder's MBean view
- *
- * @author alessio.soldano(a)jboss.com
- * @since 18-Dec-2007
- */
-public interface MemoryBufferRecorderMBean extends ManagedRecordProcessorMBean
-{
- /**
- * Gets the records matching the provided filters. Records having the
- * same group ID are returned together.
- *
- * @param filters
- * @return The matching records as a map GroupID->List<Record>
- */
- public Map<String, List<Record>> getMatchingRecords(RecordFilter[] filters);
-
- /**
- * Gets the records with the given operation. Records having the
- * same group ID are returned together.
- *
- * @param namespace
- * @param localPart
- * @return The matching records as a map GroupID->List<Record>
- */
- public Map<String, List<Record>> getRecordsByOperation(String namespace, String localPart);
-
- /**
- * Gets the records with the given client host. Records having the
- * same group ID are returned together.
- *
- * @param clientHost
- * @return The matching records as a map GroupID->List<Record>
- */
- public Map<String, List<Record>> getRecordsByClientHost(String clientHost);
-
- /**
- * Gets a set containing the client hosts of the last saved records.
- *
- * @return
- */
- public Set<String> getClientHosts();
-
- /**
- * Gets the current buffer max size (i.e. the number of record groups stored at the same time)
- *
- * @return
- */
- public int getMaxSize();
-
- public void setMaxSize(int maxSize);
-
- /**
- * Gets the buffer's current size
- * @return
- */
- public int getSize();
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/MemoryBufferRecorderMBean.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * The MemoryBufferRecorder's MBean view
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-Dec-2007
+ */
+public interface MemoryBufferRecorderMBean extends ManagedRecordProcessorMBean
+{
+ /**
+ * Gets the records matching the provided filters. Records having the
+ * same group ID are returned together.
+ *
+ * @param filters
+ * @return The matching records as a map GroupID->List<Record>
+ */
+ public Map<String, List<Record>> getMatchingRecords(RecordFilter[] filters);
+
+ /**
+ * Gets the records with the given operation. Records having the
+ * same group ID are returned together.
+ *
+ * @param namespace
+ * @param localPart
+ * @return The matching records as a map GroupID->List<Record>
+ */
+ public Map<String, List<Record>> getRecordsByOperation(String namespace, String localPart);
+
+ /**
+ * Gets the records with the given client host. Records having the
+ * same group ID are returned together.
+ *
+ * @param clientHost
+ * @return The matching records as a map GroupID->List<Record>
+ */
+ public Map<String, List<Record>> getRecordsByClientHost(String clientHost);
+
+ /**
+ * Gets a set containing the client hosts of the last saved records.
+ *
+ * @return
+ */
+ public Set<String> getClientHosts();
+
+ /**
+ * Gets the current buffer max size (i.e. the number of record groups stored at the same time)
+ *
+ * @return
+ */
+ public int getMaxSize();
+
+ public void setMaxSize(int maxSize);
+
+ /**
+ * Gets the buffer's current size
+ * @return
+ */
+ public int getSize();
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * A simple record filter acting like the negation operator
- *
- * @author alessio.soldano(a)jboss.com
- * @since 18-Dec-2007
- *
- */
-public class NotFilter implements RecordFilter
-{
-
- private RecordFilter filter;
-
- public NotFilter(RecordFilter filter)
- {
- this.filter = filter;
- }
-
- public boolean match(Record record)
- {
- return !filter.match(record);
- }
-
- public RecordFilter getFilter()
- {
- return filter;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/NotFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * A simple record filter acting like the negation operator
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-Dec-2007
+ *
+ */
+public class NotFilter implements RecordFilter
+{
+
+ private RecordFilter filter;
+
+ public NotFilter(RecordFilter filter)
+ {
+ this.filter = filter;
+ }
+
+ public boolean match(Record record)
+ {
+ return !filter.match(record);
+ }
+
+ public RecordFilter getFilter()
+ {
+ return filter;
+ }
+
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * This filter matches records having a given operation QName value.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 11-Dec-2007
- */
-public class OperationFilter implements RecordFilter
-{
-
- private QName operation;
-
- public OperationFilter(QName operation)
- {
- this.operation = operation;
- }
-
- public boolean match(Record record)
- {
- if (record != null)
- {
- if (record.getOperation() == null && operation == null)
- {
- return true;
- }
- else if (operation != null && operation.equals(record.getOperation()))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- else
- {
- return true;
- }
- }
-
- public QName getOperation()
- {
- return operation;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OperationFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * This filter matches records having a given operation QName value.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Dec-2007
+ */
+public class OperationFilter implements RecordFilter
+{
+
+ private QName operation;
+
+ public OperationFilter(QName operation)
+ {
+ this.operation = operation;
+ }
+
+ public boolean match(Record record)
+ {
+ if (record != null)
+ {
+ if (record.getOperation() == null && operation == null)
+ {
+ return true;
+ }
+ else if (operation != null && operation.equals(record.getOperation()))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ public QName getOperation()
+ {
+ return operation;
+ }
+
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import org.jboss.wsf.spi.management.recording.Record;
-import org.jboss.wsf.spi.management.recording.RecordFilter;
-
-/**
- * A simple record filter acting like the OR operator
- *
- * @author alessio.soldano(a)jboss.com
- * @since 18-Dec-2007
- *
- */
-public class OrFilter implements RecordFilter
-{
-
- private RecordFilter filter1;
- private RecordFilter filter2;
-
- public OrFilter(RecordFilter filter1, RecordFilter filter2)
- {
- this.filter1 = filter1;
- this.filter2 = filter2;
- }
-
- public boolean match(Record record)
- {
- return filter1.match(record) || filter2.match(record);
- }
-
- public RecordFilter getFilter1()
- {
- return filter1;
- }
-
- public RecordFilter getFilter2()
- {
- return filter2;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/OrFilter.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordFilter;
+
+/**
+ * A simple record filter acting like the OR operator
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-Dec-2007
+ *
+ */
+public class OrFilter implements RecordFilter
+{
+
+ private RecordFilter filter1;
+ private RecordFilter filter2;
+
+ public OrFilter(RecordFilter filter1, RecordFilter filter2)
+ {
+ this.filter1 = filter1;
+ this.filter2 = filter2;
+ }
+
+ public boolean match(Record record)
+ {
+ return filter1.match(record) || filter2.match(record);
+ }
+
+ public RecordFilter getFilter1()
+ {
+ return filter1;
+ }
+
+ public RecordFilter getFilter2()
+ {
+ return filter2;
+ }
+
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import org.jboss.wsf.spi.management.recording.Record;
-
-/**
- * Simple record factory
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public class RecordFactory
-{
- private static long count = 0;
-
- public static String newGroupID()
- {
- long time = System.currentTimeMillis();
- StringBuilder sb = new StringBuilder();
- synchronized (RecordFactory.class)
- {
- count++;
- }
- sb.append(count);
- sb.append("-");
- sb.append(time);
- return sb.toString();
- }
-
- public static Record newRecord(String groupID)
- {
- Record record = new RecordImpl();
- record.setGroupID(groupID);
- return record;
- }
-
- public static Record newRecord()
- {
- return newRecord(newGroupID());
- }
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordFactory.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import org.jboss.wsf.spi.management.recording.Record;
+
+/**
+ * Simple record factory
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public class RecordFactory
+{
+ private static long count = 0;
+
+ public static String newGroupID()
+ {
+ long time = System.currentTimeMillis();
+ StringBuilder sb = new StringBuilder();
+ synchronized (RecordFactory.class)
+ {
+ count++;
+ }
+ sb.append(count);
+ sb.append("-");
+ sb.append(time);
+ return sb.toString();
+ }
+
+ public static Record newRecord(String groupID)
+ {
+ Record record = new RecordImpl();
+ record.setGroupID(groupID);
+ return record;
+ }
+
+ public static Record newRecord()
+ {
+ return newRecord(newGroupID());
+ }
+}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java
===================================================================
--- framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -1,142 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.framework.management.recording;
-
-//$Id$
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.wsf.spi.management.recording.Record;
-
-/**
- * Default Record implementation
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public class RecordImpl implements Record
-{
- private String sourceHost;
- private String destinationHost;
- private Map<String, List<String>> headers = new HashMap<String, List<String>>();
- private MessageType messageType;
- private QName operation;
- private String groupID;
- private Date date;
- private String envelope;
-
- RecordImpl()
- {
-
- }
-
- public void addHeaders(String key, List<String> value)
- {
- headers.put(key, value);
- }
-
- public Map<String, List<String>> getHeaders()
- {
- return headers;
- }
-
- public MessageType getMessageType()
- {
- return messageType;
- }
-
- public void setMessageType(MessageType messageType)
- {
- this.messageType = messageType;
- }
-
- public String getSourceHost()
- {
- return sourceHost;
- }
-
- public void setSourceHost(String sourceHost)
- {
- this.sourceHost = sourceHost;
- }
-
- public String getDestinationHost()
- {
- return destinationHost;
- }
-
- public void setDestinationHost(String destinationHost)
- {
- this.destinationHost = destinationHost;
- }
-
- public void setHeaders(Map<String, List<String>> headers)
- {
- this.headers = headers;
- }
-
- public String getGroupID()
- {
- return groupID;
- }
-
- public QName getOperation()
- {
- return operation;
- }
-
- public void setGroupID(String groupID)
- {
- this.groupID = groupID;
- }
-
- public void setOperation(QName operation)
- {
- this.operation = operation;
- }
-
- public Date getDate()
- {
- return date;
- }
-
- public void setDate(Date date)
- {
- this.date = date;
- }
-
- public void setEnvelope(String envelope)
- {
- this.envelope = envelope;
- }
-
- public String getEnvelope()
- {
- return envelope;
- }
-
-}
Copied: framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java (from rev 5376, framework/branches/asoldano/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java)
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java (rev 0)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/management/recording/RecordImpl.java 2007-12-20 18:38:09 UTC (rev 5380)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.framework.management.recording;
+
+//$Id$
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.wsf.spi.management.recording.Record;
+
+/**
+ * Default Record implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public class RecordImpl implements Record
+{
+ private String sourceHost;
+ private String destinationHost;
+ private Map<String, List<String>> headers = new HashMap<String, List<String>>();
+ private MessageType messageType;
+ private QName operation;
+ private String groupID;
+ private Date date;
+ private String envelope;
+
+ RecordImpl()
+ {
+
+ }
+
+ public void addHeaders(String key, List<String> value)
+ {
+ headers.put(key, value);
+ }
+
+ public Map<String, List<String>> getHeaders()
+ {
+ return headers;
+ }
+
+ public MessageType getMessageType()
+ {
+ return messageType;
+ }
+
+ public void setMessageType(MessageType messageType)
+ {
+ this.messageType = messageType;
+ }
+
+ public String getSourceHost()
+ {
+ return sourceHost;
+ }
+
+ public void setSourceHost(String sourceHost)
+ {
+ this.sourceHost = sourceHost;
+ }
+
+ public String getDestinationHost()
+ {
+ return destinationHost;
+ }
+
+ public void setDestinationHost(String destinationHost)
+ {
+ this.destinationHost = destinationHost;
+ }
+
+ public void setHeaders(Map<String, List<String>> headers)
+ {
+ this.headers = headers;
+ }
+
+ public String getGroupID()
+ {
+ return groupID;
+ }
+
+ public QName getOperation()
+ {
+ return operation;
+ }
+
+ public void setGroupID(String groupID)
+ {
+ this.groupID = groupID;
+ }
+
+ public void setOperation(QName operation)
+ {
+ this.operation = operation;
+ }
+
+ public Date getDate()
+ {
+ return date;
+ }
+
+ public void setDate(Date date)
+ {
+ this.date = date;
+ }
+
+ public void setEnvelope(String envelope)
+ {
+ this.envelope = envelope;
+ }
+
+ public String getEnvelope()
+ {
+ return envelope;
+ }
+
+}
17 years
JBossWS SVN: r5379 - in spi/trunk/src/main/java/org/jboss/wsf/spi: management and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2007-12-20 13:37:26 -0500 (Thu, 20 Dec 2007)
New Revision: 5379
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java
spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
Log:
Merging asoldano branch to trunk, svn merge -r 5187:HEAD
Records management:
- [JBWS-1897]
- [JBWS-1898]
- [JBWS-1899]
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-12-20 16:35:45 UTC (rev 5378)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -23,11 +23,15 @@
// $Id$
+import java.util.List;
+
import javax.management.ObjectName;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointMetrics;
+import org.jboss.wsf.spi.management.recording.Record;
+import org.jboss.wsf.spi.management.recording.RecordProcessor;
/**
* A general JAXWS endpoint.
@@ -116,4 +120,13 @@
/** Set the endpoint metrics for this endpoint */
void setEndpointMetrics(EndpointMetrics metrics);
+
+ /** Get the record processors configured for this endpoint **/
+ List<RecordProcessor> getRecordProcessors();
+
+ /** Set the record processors for this endpoint **/
+ void setRecordProcessors(List<RecordProcessor> recordProcessors);
+
+ /** Ask configured processors for processing of the given record **/
+ void processRecord(Record record);
}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording (from rev 5374, spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording)
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java
===================================================================
--- spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java 2007-12-20 14:48:10 UTC (rev 5374)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management.recording;
-
-//$Id$
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-/**
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public interface Record
-{
- public enum MessageType {INBOUND, OUTBOUND};
-
- /**
- * Gets the group ID corresponding to the current message exchange flow
- *
- * @return
- */
- public String getGroupID();
-
- public void setGroupID(String groupID);
-
- /**
- * Gets the date of this record
- *
- * @return
- */
- public Date getDate();
-
- public void setDate(Date date);
-
- /**
- * Gets the source (message sender) host. The result format conforms to RFC2732
- *
- * @return source host
- */
- public String getSourceHost();
-
- public void setSourceHost(String host);
-
- /**
- * Gets the source (message sender) host. The result format conforms to RFC2732
- *
- * @return the source host
- */
- public String getDestinationHost();
-
- public void setDestinationHost(String host);
-
- /**
- * Gets the message type, i.e. MessageType.INBOUND or MessageType.OUTBOUND
- *
- * @return the message type
- */
- public MessageType getMessageType();
-
- public void setMessageType(MessageType type);
-
-
- /**
- * Gets the SOAP message envelope
- *
- * @return
- */
- public String getEnvelope();
-
- public void setEnvelope(String envelope);
-
- /**
- * Gets the HTTP headers
- *
- * @return the headers
- */
- public Map<String, List<String>> getHeaders();
-
- public void addHeaders(String key, List<String> value);
-
- public void setHeaders(Map<String, List<String>> headers);
-
- /**
- * Gets the invoked operation
- *
- * @return the operation
- */
- public QName getOperation();
-
- public void setOperation(QName operation);
-}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java (from rev 5374, spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/Record.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.management.recording;
+
+//$Id$
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public interface Record
+{
+ public enum MessageType {INBOUND, OUTBOUND};
+
+ /**
+ * Gets the group ID corresponding to the current message exchange flow
+ *
+ * @return
+ */
+ public String getGroupID();
+
+ public void setGroupID(String groupID);
+
+ /**
+ * Gets the date of this record
+ *
+ * @return
+ */
+ public Date getDate();
+
+ public void setDate(Date date);
+
+ /**
+ * Gets the source (message sender) host. The result format conforms to RFC2732
+ *
+ * @return source host
+ */
+ public String getSourceHost();
+
+ public void setSourceHost(String host);
+
+ /**
+ * Gets the source (message sender) host. The result format conforms to RFC2732
+ *
+ * @return the source host
+ */
+ public String getDestinationHost();
+
+ public void setDestinationHost(String host);
+
+ /**
+ * Gets the message type, i.e. MessageType.INBOUND or MessageType.OUTBOUND
+ *
+ * @return the message type
+ */
+ public MessageType getMessageType();
+
+ public void setMessageType(MessageType type);
+
+
+ /**
+ * Gets the SOAP message envelope
+ *
+ * @return
+ */
+ public String getEnvelope();
+
+ public void setEnvelope(String envelope);
+
+ /**
+ * Gets the HTTP headers
+ *
+ * @return the headers
+ */
+ public Map<String, List<String>> getHeaders();
+
+ public void addHeaders(String key, List<String> value);
+
+ public void setHeaders(Map<String, List<String>> headers);
+
+ /**
+ * Gets the invoked operation
+ *
+ * @return the operation
+ */
+ public QName getOperation();
+
+ public void setOperation(QName operation);
+}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java
===================================================================
--- spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java 2007-12-20 14:48:10 UTC (rev 5374)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management.recording;
-
-//$Id$
-
-/**
- * A record filter
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public interface RecordFilter
-{
- /**
- * Returns true if the filter matches the given record.
- *
- * @param record
- * @return
- */
- public boolean match(Record record);
-}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java (from rev 5374, spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordFilter.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.management.recording;
+
+//$Id$
+
+/**
+ * A record filter
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public interface RecordFilter
+{
+ /**
+ * Returns true if the filter matches the given record.
+ *
+ * @param record
+ * @return
+ */
+ public boolean match(Record record);
+}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java
===================================================================
--- spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java 2007-12-20 14:48:10 UTC (rev 5374)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management.recording;
-
-import java.util.Stack;
-
-import org.jboss.logging.Logger;
-
-//$Id$
-
-/**
- * Associates the record group ID with the current thread.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public class RecordGroupAssociation
-{
- private static ThreadLocal<Stack<String>> groupIDAssoc = new ThreadLocal<Stack<String>>();
-
- // provide logging
- private static Logger log = Logger.getLogger(RecordGroupAssociation.class);
-
-
- public static void pushGroupID(String groupID)
- {
- if(log.isDebugEnabled()) log.debug("pushGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
- Stack<String> stack = groupIDAssoc.get();
- if (stack == null)
- {
- stack = new Stack<String>();
- groupIDAssoc.set(stack);
- }
- stack.push(groupID);
- }
-
- public static String peekGroupID()
- {
- String groupID = null;
- Stack<String> stack = groupIDAssoc.get();
- if (stack != null && stack.isEmpty() == false)
- {
- groupID = stack.peek();
- }
- if(log.isDebugEnabled()) log.debug("peekGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
- return groupID;
- }
-
- public static String popGroupID()
- {
- String groupID = null;
- Stack<String> stack = groupIDAssoc.get();
- if (stack != null && stack.isEmpty() == false)
- {
- groupID = stack.pop();
- }
- if(log.isDebugEnabled()) log.debug("popGroupID: " + groupID +" (Thread " +Thread.currentThread().getName()+ ")");
- return groupID;
- }
-
-}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java (from rev 5374, spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordGroupAssociation.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.management.recording;
+
+import java.util.Stack;
+
+import org.jboss.logging.Logger;
+
+//$Id$
+
+/**
+ * Associates the record group ID with the current thread.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public class RecordGroupAssociation
+{
+ private static ThreadLocal<Stack<String>> groupIDAssoc = new ThreadLocal<Stack<String>>();
+
+ // provide logging
+ private static Logger log = Logger.getLogger(RecordGroupAssociation.class);
+
+
+ public static void pushGroupID(String groupID)
+ {
+ if(log.isDebugEnabled()) log.debug("pushGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
+ Stack<String> stack = groupIDAssoc.get();
+ if (stack == null)
+ {
+ stack = new Stack<String>();
+ groupIDAssoc.set(stack);
+ }
+ stack.push(groupID);
+ }
+
+ public static String peekGroupID()
+ {
+ String groupID = null;
+ Stack<String> stack = groupIDAssoc.get();
+ if (stack != null && stack.isEmpty() == false)
+ {
+ groupID = stack.peek();
+ }
+ if(log.isDebugEnabled()) log.debug("peekGroupID: " + groupID + " (Thread " +Thread.currentThread().getName()+ ")");
+ return groupID;
+ }
+
+ public static String popGroupID()
+ {
+ String groupID = null;
+ Stack<String> stack = groupIDAssoc.get();
+ if (stack != null && stack.isEmpty() == false)
+ {
+ groupID = stack.pop();
+ }
+ if(log.isDebugEnabled()) log.debug("popGroupID: " + groupID +" (Thread " +Thread.currentThread().getName()+ ")");
+ return groupID;
+ }
+
+}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java
===================================================================
--- spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java 2007-12-20 14:48:10 UTC (rev 5374)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.wsf.spi.management.recording;
-
-//$Id$
-
-import java.util.List;
-
-/**
- * Processes a record. A RecordProcessor may have filters to allow processing
- * of records matching given criteria. It also gives users fine management of
- * record's attributes to processed.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 8-Dec-2007
- */
-public interface RecordProcessor
-{
- public String getName();
-
- public void setName(String name);
-
- public boolean isRecording();
-
- public void setRecording(boolean value);
-
- public void processRecord(Record record);
-
- public List<RecordFilter> getFilters();
-
- public void addFilter(RecordFilter filter);
-
- public void setFilters(List<RecordFilter> filters);
-
- public boolean isProcessSourceHost();
-
- public void setProcessSourceHost(boolean value);
-
- public boolean isProcessDestinationHost();
-
- public void setProcessDestinationHost(boolean value);
-
- public boolean isProcessMessageType();
-
- public void setProcessMessageType(boolean value);
-
- public boolean isProcessEnvelope();
-
- public void setProcessEnvelope(boolean value);
-
- public boolean isProcessHeaders();
-
- public void setProcessHeaders(boolean value);
-
- public boolean isProcessOperation();
-
- public void setProcessOperation(boolean value);
-
- public boolean isProcessDate();
-
- public void setProcessDate(boolean value);
-}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java (from rev 5374, spi/branches/asoldano/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/recording/RecordProcessor.java 2007-12-20 18:37:26 UTC (rev 5379)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.management.recording;
+
+//$Id$
+
+import java.util.List;
+
+/**
+ * Processes a record. A RecordProcessor may have filters to allow processing
+ * of records matching given criteria. It also gives users fine management of
+ * record's attributes to processed.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 8-Dec-2007
+ */
+public interface RecordProcessor
+{
+ public String getName();
+
+ public void setName(String name);
+
+ public boolean isRecording();
+
+ public void setRecording(boolean value);
+
+ public void processRecord(Record record);
+
+ public List<RecordFilter> getFilters();
+
+ public void addFilter(RecordFilter filter);
+
+ public void setFilters(List<RecordFilter> filters);
+
+ public boolean isProcessSourceHost();
+
+ public void setProcessSourceHost(boolean value);
+
+ public boolean isProcessDestinationHost();
+
+ public void setProcessDestinationHost(boolean value);
+
+ public boolean isProcessMessageType();
+
+ public void setProcessMessageType(boolean value);
+
+ public boolean isProcessEnvelope();
+
+ public void setProcessEnvelope(boolean value);
+
+ public boolean isProcessHeaders();
+
+ public void setProcessHeaders(boolean value);
+
+ public boolean isProcessOperation();
+
+ public void setProcessOperation(boolean value);
+
+ public boolean isProcessDate();
+
+ public void setProcessDate(boolean value);
+}
17 years
JBossWS SVN: r5378 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-12-20 11:35:45 -0500 (Thu, 20 Dec 2007)
New Revision: 5378
Modified:
stack/cxf/trunk/.classpath
Log:
update eclipse classpath
Modified: stack/cxf/trunk/.classpath
===================================================================
--- stack/cxf/trunk/.classpath 2007-12-20 15:50:05 UTC (rev 5377)
+++ stack/cxf/trunk/.classpath 2007-12-20 16:35:45 UTC (rev 5378)
@@ -14,8 +14,8 @@
<classpathentry kind="lib" path="thirdparty/jboss-common-core-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-javaee.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossws-framework.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossws-spi.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossws-framework.jar" sourcepath="thirdparty/jbossws-framework-src.zip"/>
+ <classpathentry kind="lib" path="thirdparty/jbossws-spi.jar" sourcepath="thirdparty/jbossws-spi-src.zip"/>
<classpathentry kind="lib" path="thirdparty/jdom-1.0.jar"/>
<classpathentry kind="lib" path="thirdparty/neethi-2.0.2.jar"/>
<classpathentry kind="lib" path="thirdparty/resolver.jar"/>
@@ -35,6 +35,6 @@
<classpathentry kind="lib" path="thirdparty/jaxws-api-2.0.jar"/>
<classpathentry kind="lib" path="tools/ant/lib/junit.jar"/>
<classpathentry kind="lib" path="thirdparty/activation.jar"/>
- <classpathentry kind="lib" path="thirdparty/jbossws-common.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jbossws-common.jar" sourcepath="thirdparty/jbossws-common-src.zip"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
17 years
JBossWS SVN: r5377 - common/trunk/src/main/java/org/jboss/wsf/common/logging.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-12-20 10:50:05 -0500 (Thu, 20 Dec 2007)
New Revision: 5377
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogHandler.java
common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogRedirector.java
Log:
Fix exception logging
Modified: common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogHandler.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogHandler.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogHandler.java 2007-12-20 15:50:05 UTC (rev 5377)
@@ -54,30 +54,32 @@
{
Logger logger = getJBossLogger(record);
Level level = record.getLevel();
+ Throwable th = record.getThrown();
+
if (level == Level.FINER || level == Level.FINEST)
{
String msg = getMessage(record);
- logger.trace(msg);
+ logger.trace(msg, th);
}
else if (level == Level.FINE)
{
String msg = getMessage(record);
- logger.debug(msg);
+ logger.debug(msg, th);
}
- else if (level == Level.INFO || level == Level.CONFIG)
+ else if (level == Level.INFO || level == Level.CONFIG || level == Level.ALL)
{
String msg = getMessage(record);
- logger.info(msg);
+ logger.info(msg, th);
}
else if (level == Level.WARNING)
{
String msg = getMessage(record);
- logger.warn(msg);
+ logger.warn(msg, th);
}
else if (level == Level.SEVERE)
{
String msg = getMessage(record);
- logger.error(msg);
+ logger.error(msg, th);
}
else if (level == Level.OFF)
{
@@ -126,7 +128,7 @@
{
isLoggable = logger.isInfoEnabled();
}
- else if (level == Level.SEVERE || level == Level.WARNING)
+ else if (level == Level.SEVERE || level == Level.WARNING || level == Level.ALL)
{
isLoggable = true;
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogRedirector.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogRedirector.java 2007-12-20 14:55:37 UTC (rev 5376)
+++ common/trunk/src/main/java/org/jboss/wsf/common/logging/JDKLogRedirector.java 2007-12-20 15:50:05 UTC (rev 5377)
@@ -24,8 +24,10 @@
import java.util.LinkedList;
import java.util.List;
import java.util.logging.ConsoleHandler;
+import java.util.logging.Filter;
import java.util.logging.Handler;
import java.util.logging.LogManager;
+import java.util.logging.LogRecord;
import java.util.logging.Logger;
/**
@@ -57,11 +59,11 @@
public void start()
{
- removeRootConsoleHandler();
+ modifyRootLogger();
addNamespaceHandlers();
}
- private void removeRootConsoleHandler()
+ private void modifyRootLogger()
{
LogManager logManager = LogManager.getLogManager();
Logger root = logManager.getLogger("");
@@ -73,7 +75,22 @@
{
Handler handler = handlers[i];
if (handler instanceof ConsoleHandler)
- root.removeHandler(handler);
+ {
+ Filter filter = new Filter()
+ {
+ public boolean isLoggable(LogRecord record)
+ {
+ String name = record.getLoggerName();
+ for (String ns : namespaces)
+ {
+ if (name.startsWith(ns))
+ return false;
+ }
+ return true;
+ }
+ };
+ handler.setFilter(filter);
+ }
}
}
17 years