JBossWS SVN: r12462 - in stack/metro/trunk/modules/testsuite: metro-tests/src/test/etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:43:58 -0400 (Thu, 10 Jun 2010)
New Revision: 12462
Modified:
stack/metro/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
stack/metro/trunk/modules/testsuite/metro-tests/src/test/etc/log4j.xml
Log:
Adding org.jboss.wsf category to log4j conf
Modified: stack/metro/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
===================================================================
--- stack/metro/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 16:27:46 UTC (rev 12461)
+++ stack/metro/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 16:43:58 UTC (rev 12462)
@@ -20,7 +20,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${log4j.output.dir}/test.log"/>
- <param name="Append" value="false"/>
+ <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -49,6 +49,9 @@
<category name="org.jboss.ws">
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.wsf">
+ <priority value="DEBUG"/>
+ </category>
<category name="com.sun">
<priority value="DEBUG"/>
</category>
Modified: stack/metro/trunk/modules/testsuite/metro-tests/src/test/etc/log4j.xml
===================================================================
--- stack/metro/trunk/modules/testsuite/metro-tests/src/test/etc/log4j.xml 2010-06-10 16:27:46 UTC (rev 12461)
+++ stack/metro/trunk/modules/testsuite/metro-tests/src/test/etc/log4j.xml 2010-06-10 16:43:58 UTC (rev 12462)
@@ -20,7 +20,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${log4j.output.dir}/test.log"/>
- <param name="Append" value="false"/>
+ <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -49,6 +49,9 @@
<category name="org.jboss.ws">
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.wsf">
+ <priority value="DEBUG"/>
+ </category>
<category name="com.sun">
<priority value="DEBUG"/>
</category>
13 years, 11 months
JBossWS SVN: r12461 - in stack/native/trunk/modules: testsuite/framework-tests and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:27:46 -0400 (Thu, 10 Jun 2010)
New Revision: 12461
Modified:
stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
stack/native/trunk/modules/testsuite/framework-tests/pom.xml
stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml
stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsprovide.xml
stack/native/trunk/modules/testsuite/native-tests/pom.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml
stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml
Log:
[JBWS-3063] Provide log4j conf to the system env before invoking wsconsume/wsprovide during the build; fix bat/sh scripts
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2010-06-10 16:27:46 UTC (rev 12461)
@@ -63,4 +63,4 @@
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/saaj-api.jar
rem Execute the command
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSCONSUME_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSConsume %*
+"%JAVA%" %JAVA_OPTS% -Dlog4j.configuration=log4j.xml -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSCONSUME_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSConsume %*
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2010-06-10 16:27:46 UTC (rev 12461)
@@ -100,6 +100,7 @@
# Execute the command
"$JAVA" $JAVA_OPTS \
+ -Dlog4j.configuration=log4j.xml \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$WSCONSUME_CLASSPATH" \
org.jboss.wsf.spi.tools.cmd.WSConsume "$@"
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2010-06-10 16:27:46 UTC (rev 12461)
@@ -63,4 +63,4 @@
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
rem Execute the command
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSProvide %*
+"%JAVA%" %JAVA_OPTS% -Dlog4j.configuration=log4j.xml -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSProvide %*
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2010-06-10 16:27:46 UTC (rev 12461)
@@ -100,6 +100,7 @@
# Execute the command
"$JAVA" $JAVA_OPTS \
+ -Dlog4j.configuration=log4j.xml \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$WSPROVIDE_CLASSPATH" \
org.jboss.wsf.spi.tools.cmd.WSProvide "$@"
Modified: stack/native/trunk/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/framework-tests/pom.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/framework-tests/pom.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -97,7 +97,8 @@
<property name="tests.resources.dir" value="${basedir}/src/test/resources" />
<property name="tests.output.dir" value="${project.build.directory}" />
<property name="project.version" value="${project.version}" />
- <property name="log4j.output.dir" value="{log4j.output.dir}"/>
+ <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
+ <property name="log4j.output.dir" value="${log4j.output.dir}"/>
<property name="jboss.home" value="${jboss.home}"/>
<ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume" />
</tasks>
@@ -114,7 +115,8 @@
<property name="tests.resources.dir" value="${basedir}/src/test/resources" />
<property name="tests.output.dir" value="${project.build.directory}" />
<property name="project.version" value="${project.version}" />
- <property name="log4j.output.dir" value="{log4j.output.dir}"/>
+ <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
+ <property name="log4j.output.dir" value="${log4j.output.dir}"/>
<property name="jboss.home" value="${jboss.home}"/>
<ant antfile="scripts/antrun-wsprovide.xml" target="wsprovide"/>
<ant antfile="src/test/ant-import/build-jars-jaxws.xml" target="build-jars-jaxws" />
Modified: stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml
===================================================================
--- stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -21,6 +21,7 @@
package="org.jboss.test.ws.jaxws.complex"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -29,6 +30,7 @@
package="org.jboss.test.ws.jaxws.holder"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -40,6 +42,7 @@
<attribute name="package"/>
<attribute name="outputDir"/>
<attribute name="jbossHome"/>
+ <attribute name="log4jConf"/>
<attribute name="loggingDir"/>
<sequential>
@@ -55,6 +58,7 @@
fork="true"
>
<jvmarg line="-Djava.endorsed.dirs=@{jbossHome}/lib/endorsed"/>
+ <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
<jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
</wsconsume>
</sequential>
Modified: stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsprovide.xml
===================================================================
--- stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsprovide.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/framework-tests/scripts/antrun-wsprovide.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -21,6 +21,7 @@
destdir="jaxws/jbws2960"
jbossHome="${jboss.home}"
outputDir="${tests.output.dir}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
resourcesDir="jaxws/jbws2960"
/>
@@ -33,6 +34,7 @@
<attribute name="destDir"/>
<attribute name="jbossHome"/>
<attribute name="outputDir"/>
+ <attribute name="log4jConf"/>
<attribute name="loggingDir"/>
<attribute name="resourcesDir"/>
@@ -47,6 +49,7 @@
resourcedestdir="@{outputDir}/test-resources/@{resourcesDir}"
>
<jvmarg line="-Djava.endorsed.dirs=@{jbossHome}/lib/endorsed"/>
+ <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
<jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
</wsprovide>
</sequential>
Modified: stack/native/trunk/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/pom.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/native-tests/pom.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -54,6 +54,7 @@
<property name="tests.resources.dir" value="${basedir}/src/test/resources" />
<property name="tests.output.dir" value="${project.build.directory}" />
<property name="project.version" value="${project.version}" />
+ <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
<property name="log4j.output.dir" value="${log4j.output.dir}"/>
<property name="jboss.home" value="${jboss.home}"/>
<ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume" />
@@ -89,6 +90,7 @@
<property name="maven.test.classpath" refid="maven.test.classpath" />
<property name="tests.resources.dir" value="${basedir}/src/test/resources" />
<property name="tests.output.dir" value="${project.build.directory}" />
+ <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
<property name="log4j.output.dir" value="${log4j.output.dir}"/>
<property name="jboss.home" value="${jboss.home}"/>
<ant antfile="scripts/antrun-wsprovide.xml" target="wsprovide" />
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -21,6 +21,7 @@
package="org.jboss.test.ws.benchmark.jaxws.doclit"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -29,6 +30,7 @@
package="org.jboss.test.ws.interop.soapwsdl.basedoclitb"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -37,6 +39,7 @@
package="org.jboss.test.ws.interop.soapwsdl.basedoclitw"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -45,6 +48,7 @@
package="org.jboss.test.ws.interop.soapwsdl.baserpclit"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -53,6 +57,7 @@
package="org.jboss.test.ws.jaxws.samples.wssecuritypolicy"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -61,6 +66,7 @@
package="org.jboss.test.ws.jaxws.samples.wssecurityAnnotatedpolicy"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -69,6 +75,7 @@
package="org.jboss.test.ws.jaxws.samples.wssecurity"
outputDir="${tests.output.dir}"
jbossHome="${jboss.home}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
/>
@@ -80,6 +87,7 @@
<attribute name="package"/>
<attribute name="outputDir"/>
<attribute name="jbossHome"/>
+ <attribute name="log4jConf"/>
<attribute name="loggingDir"/>
<sequential>
@@ -95,6 +103,7 @@
fork="true"
>
<jvmarg line="-Djava.endorsed.dirs=@{jbossHome}/lib/endorsed"/>
+ <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
<jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
</wsconsume>
</sequential>
Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml 2010-06-10 16:23:18 UTC (rev 12460)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml 2010-06-10 16:27:46 UTC (rev 12461)
@@ -22,6 +22,7 @@
destDir=""
jbossHome="${jboss.home}"
outputDir="${tests.output.dir}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
resourcesDir="wsprovide/jaxws/samples/wssecurity"
/>
@@ -31,6 +32,7 @@
destDir=""
jbossHome="${jboss.home}"
outputDir="${tests.output.dir}"
+ log4jConf="${log4j.conf}"
loggingDir="${log4j.output.dir}"
resourcesDir="wsprovide/jaxws/samples/wssecurityAnnotatedpolicy"
/>
@@ -43,6 +45,7 @@
<attribute name="destDir"/>
<attribute name="jbossHome"/>
<attribute name="outputDir"/>
+ <attribute name="log4jConf"/>
<attribute name="loggingDir"/>
<attribute name="resourcesDir"/>
@@ -57,6 +60,7 @@
resourcedestdir="@{outputDir}/test-resources/@{resourcesDir}"
>
<jvmarg line="-Djava.endorsed.dirs=@{jbossHome}/lib/endorsed"/>
+ <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
<jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
</wsprovide>
</sequential>
13 years, 11 months
JBossWS SVN: r12460 - in stack/cxf/trunk/modules: testsuite and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:23:18 -0400 (Thu, 10 Jun 2010)
New Revision: 12460
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
stack/cxf/trunk/modules/testsuite/framework-tests/pom.xml
stack/cxf/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3063] Use wsconsume/wsprovide in forked mode to add log4j conf to the system env before invocation; fix bat/sh scripts
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2010-06-10 16:23:18 UTC (rev 12460)
@@ -81,4 +81,4 @@
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wsdl4j.jar
rem Execute the command
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSCONSUME_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSConsume %*
+"%JAVA%" %JAVA_OPTS% -Dlog4j.configuration=log4j.xml -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSCONSUME_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSConsume %*
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2010-06-10 16:23:18 UTC (rev 12460)
@@ -129,6 +129,7 @@
# Execute the command
"$JAVA" $JAVA_OPTS \
+ -Dlog4j.configuration=log4j.xml \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$WSCONSUME_CLASSPATH" \
org.jboss.wsf.spi.tools.cmd.WSConsume "$@"
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2010-06-10 16:23:18 UTC (rev 12460)
@@ -88,4 +88,4 @@
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
rem Execute the command
-"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSProvide %*
+"%JAVA%" %JAVA_OPTS% -Dlog4j.configuration=log4j.xml -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.wsf.spi.tools.cmd.WSProvide %*
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2010-06-10 16:23:18 UTC (rev 12460)
@@ -139,6 +139,7 @@
# Execute the command
"$JAVA" $JAVA_OPTS \
+ -Dlog4j.configuration=log4j.xml \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$WSPROVIDE_CLASSPATH" \
org.jboss.wsf.spi.tools.cmd.WSProvide "$@"
Modified: stack/cxf/trunk/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/framework-tests/pom.xml 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/testsuite/framework-tests/pom.xml 2010-06-10 16:23:18 UTC (rev 12460)
@@ -98,6 +98,8 @@
<property name="tests.resources.dir" value="${basedir}/src/test/resources"/>
<property name="tests.output.dir" value="${project.build.directory}"/>
<property name="project.version" value="${project.version}"/>
+ <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
+ <property name="log4j.output.dir" value="${log4j.output.dir}"/>
<ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume"/>
</tasks>
</configuration>
Modified: stack/cxf/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/testsuite/framework-tests/scripts/antrun-wsconsume.xml 2010-06-10 16:23:18 UTC (rev 12460)
@@ -21,8 +21,14 @@
</classpath>
</taskdef>
- <wsconsume wsdl="${tests.resources.dir}/jaxws/complex/META-INF/wsdl/RegistrationService.wsdl" package="org.jboss.test.ws.jaxws.complex" sourcedestdir="${tests.output.dir}/wsconsume/java" destdir="${tests.output.dir}/test-classes" keep="true" verbose="false"/>
- <wsconsume wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl" package="org.jboss.test.ws.jaxws.holder" sourcedestdir="${tests.output.dir}/wsconsume/java" destdir="${tests.output.dir}/test-classes" keep="true" verbose="false"/>
+ <wsconsume wsdl="${tests.resources.dir}/jaxws/complex/META-INF/wsdl/RegistrationService.wsdl" package="org.jboss.test.ws.jaxws.complex" sourcedestdir="${tests.output.dir}/wsconsume/java" destdir="${tests.output.dir}/test-classes" keep="true" verbose="false" fork="true">
+ <jvmarg line="-Dlog4j.configuration=file://${log4j.conf}"/>
+ <jvmarg line="-Dlog4j.output.dir=${log4j.output.dir}"/>
+ </wsconsume>
+ <wsconsume wsdl="${tests.resources.dir}/jaxws/holder/META-INF/wsdl/HolderService.wsdl" package="org.jboss.test.ws.jaxws.holder" sourcedestdir="${tests.output.dir}/wsconsume/java" destdir="${tests.output.dir}/test-classes" keep="true" verbose="false" fork="true">
+ <jvmarg line="-Dlog4j.configuration=file://${log4j.conf}"/>
+ <jvmarg line="-Dlog4j.output.dir=${log4j.output.dir}"/>
+ </wsconsume>
</target>
-</project>
\ No newline at end of file
+</project>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2010-06-10 16:20:53 UTC (rev 12459)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2010-06-10 16:23:18 UTC (rev 12460)
@@ -26,6 +26,7 @@
<wsdl.publish.location>${project.build.directory}/wsdl-publish</wsdl.publish.location>
<hibernate.version>3.2.4.sp1</hibernate.version>
<jboss.javaee.version>5.0.0.GA</jboss.javaee.version>
+ <log4j.output.dir>${project.build.directory}</log4j.output.dir>
</properties>
<!-- Modules -->
13 years, 11 months
JBossWS SVN: r12459 - in spi/trunk: src/main/java/org/jboss/wsf/spi/tools/cmd and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:20:53 -0400 (Thu, 10 Jun 2010)
New Revision: 12459
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4JUtil.java
spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4jOutputStream.java
Modified:
spi/trunk/pom.xml
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
Log:
[JBWS-3063] Make wsconsume/wsprovide command line tools use log4j when configured
Modified: spi/trunk/pom.xml
===================================================================
--- spi/trunk/pom.xml 2010-06-10 16:14:13 UTC (rev 12458)
+++ spi/trunk/pom.xml 2010-06-10 16:20:53 UTC (rev 12459)
@@ -34,6 +34,7 @@
<jboss.microcontainer.version>2.0.8.GA</jboss.microcontainer.version>
<jboss.web.version>2.1.3.GA</jboss.web.version>
<junit.version>3.8.2</junit.version>
+ <log4j.version>1.2.14</log4j.version>
</properties>
<!-- Dependencies -->
@@ -70,6 +71,11 @@
<version>${jboss.microcontainer.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
<!-- transitive dependencies -->
<dependency>
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-06-10 16:14:13 UTC (rev 12458)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-06-10 16:20:53 UTC (rev 12459)
@@ -23,7 +23,13 @@
import gnu.getopt.Getopt;
import gnu.getopt.LongOpt;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+
import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.spi.util.Log4JUtil;
+import org.jboss.wsf.spi.util.Log4jOutputStream;
import java.io.File;
import java.io.PrintStream;
@@ -215,7 +221,19 @@
consumer.setSourceDirectory(sourceDir);
if (! quiet)
- consumer.setMessageStream(System.out);
+ {
+ PrintStream ps;
+ if (Log4JUtil.isLog4jConfigurationAvailable())
+ {
+ ps = new PrintStream(new Log4jOutputStream(Logger.getLogger("WSConsume"), Level.INFO));
+ }
+ else
+ {
+ ps = System.out;
+ ps.println("Could not find log4j.xml configuration, logging to console.\n");
+ }
+ consumer.setMessageStream(ps);
+ }
if (catalog != null)
consumer.setCatalog(catalog);
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-06-10 16:14:13 UTC (rev 12458)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-06-10 16:20:53 UTC (rev 12459)
@@ -32,7 +32,12 @@
import java.util.ArrayList;
import java.util.List;
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+
import org.jboss.wsf.spi.tools.WSContractProvider;
+import org.jboss.wsf.spi.util.Log4JUtil;
+import org.jboss.wsf.spi.util.Log4jOutputStream;
/**
* WSProvideTask is a cmd line tool that generates portable JAX-WS artifacts
@@ -184,7 +189,19 @@
gen.setSourceDirectory(sourceDir);
if (! quiet)
- gen.setMessageStream(System.out);
+ {
+ PrintStream ps;
+ if (Log4JUtil.isLog4jConfigurationAvailable())
+ {
+ ps = new PrintStream(new Log4jOutputStream(Logger.getLogger("WSProvide"), Level.INFO));
+ }
+ else
+ {
+ ps = System.out;
+ ps.println("Could not find log4j.xml configuration, logging to console.\n");
+ }
+ gen.setMessageStream(ps);
+ }
try
{
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4JUtil.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4JUtil.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4JUtil.java 2010-06-10 16:20:53 UTC (rev 12459)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.util;
+
+import java.net.URL;
+
+import org.apache.log4j.helpers.Loader;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Jun-2010
+ *
+ */
+public class Log4JUtil
+{
+ public static final String LOG4J_CONFIGURATION = "log4j.configuration";
+ public static final String LOG4J_PROPERTIES = "log4j.properties";
+
+ /**
+ * Returns true if a log4j configuration can be found given the current environment.
+ * See http://logging.apache.org/log4j/1.2/manual.html (Default Initialization Procedure)
+ * @return
+ */
+ public static boolean isLog4jConfigurationAvailable()
+ {
+ String log4jConfiguration = System.getProperty(LOG4J_CONFIGURATION);
+ String resource = log4jConfiguration != null ? log4jConfiguration : LOG4J_PROPERTIES;
+ URL url = null;
+ try
+ {
+ url = new URL(resource);
+ }
+ catch (Exception e1)
+ {
+ try
+ {
+ url = Loader.getResource(resource);
+ }
+ catch (Exception e2)
+ {
+ //ignore
+ }
+ }
+ return url != null;
+ }
+}
Property changes on: spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4JUtil.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4jOutputStream.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4jOutputStream.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4jOutputStream.java 2010-06-10 16:20:53 UTC (rev 12459)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.util;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import org.apache.log4j.Category;
+import org.apache.log4j.Priority;
+
+/**
+ * An OutputStream that flushes out to a Category.<p>
+ * A simple port of <a href="mailto://Jim.Moore@rocketmail.com">Jim Moore</a>'s
+ * LoggingOutputStream contribution to log4j.
+ *
+ * Note that no data is written out to the Category until the stream is
+ * flushed or closed.<p>
+ *
+ * Example:<pre>
+ * // make sure everything sent to System.err is logged
+ * System.setErr(new PrintStream(new LoggingOutputStream(Category.getRoot(), Priority.WARN), true));
+ *
+ * // make sure everything sent to System.out is also logged
+ * System.setOut(new PrintStream(new LoggingOutputStream(Category.getRoot(), Priority.INFO), true));
+ * </pre>
+ *
+ */
+public class Log4jOutputStream extends OutputStream
+{
+ protected static final String LINE_SEPERATOR = System.getProperty("line.separator");
+
+ /**
+ * Used to maintain the contract of {@link #close()}.
+ */
+ protected boolean hasBeenClosed = false;
+
+ /**
+ * The internal buffer where data is stored.
+ */
+ protected byte[] buf;
+
+ /**
+ * The number of valid bytes in the buffer. This value is always
+ * in the range <tt>0</tt> through <tt>buf.length</tt>; elements
+ * <tt>buf[0]</tt> through <tt>buf[count-1]</tt> contain valid
+ * byte data.
+ */
+ protected int count;
+
+ /**
+ * Remembers the size of the buffer for speed.
+ */
+ private int bufLength;
+
+ /**
+ * The default number of bytes in the buffer. =2048
+ */
+ public static final int DEFAULT_BUFFER_LENGTH = 2048;
+
+ /**
+ * The category to write to.
+ */
+ protected Category category;
+
+ /**
+ * The priority to use when writing to the Category.
+ */
+ protected Priority priority;
+
+ @SuppressWarnings("unused")
+ private Log4jOutputStream()
+ {
+ // illegal
+ }
+
+ /**
+ * Creates the LoggingOutputStream to flush to the given Category.
+ *
+ * @param cat the Category to write to
+ *
+ * @param priority the Priority to use when writing to the Category
+ *
+ * @exception IllegalArgumentException
+ * if cat == null or priority == null
+ */
+ public Log4jOutputStream(Category cat, Priority priority) throws IllegalArgumentException
+ {
+ if (cat == null)
+ {
+ throw new IllegalArgumentException("cat == null");
+ }
+ if (priority == null)
+ {
+ throw new IllegalArgumentException("priority == null");
+ }
+
+ this.priority = priority;
+ category = cat;
+ bufLength = DEFAULT_BUFFER_LENGTH;
+ buf = new byte[DEFAULT_BUFFER_LENGTH];
+ count = 0;
+ }
+
+ /**
+ * Closes this output stream and releases any system resources
+ * associated with this stream. The general contract of <code>close</code>
+ * is that it closes the output stream. A closed stream cannot perform
+ * output operations and cannot be reopened.
+ */
+ public void close()
+ {
+ flush();
+ hasBeenClosed = true;
+ }
+
+ /**
+ * Writes the specified byte to this output stream. The general
+ * contract for <code>write</code> is that one byte is written
+ * to the output stream. The byte to be written is the eight
+ * low-order bits of the argument <code>b</code>. The 24
+ * high-order bits of <code>b</code> are ignored.
+ *
+ * @param b the <code>byte</code> to write
+ *
+ * @exception IOException
+ * if an I/O error occurs. In particular,
+ * an <code>IOException</code> may be thrown if the
+ * output stream has been closed.
+ */
+ public void write(final int b) throws IOException
+ {
+ if (hasBeenClosed)
+ {
+ throw new IOException("The stream has been closed.");
+ }
+
+ // don't log nulls
+ if (b == 0)
+ {
+ return;
+ }
+
+ // would this be writing past the buffer?
+ if (count == bufLength)
+ {
+ // grow the buffer
+ final int newBufLength = bufLength + DEFAULT_BUFFER_LENGTH;
+ final byte[] newBuf = new byte[newBufLength];
+
+ System.arraycopy(buf, 0, newBuf, 0, bufLength);
+
+ buf = newBuf;
+ bufLength = newBufLength;
+ }
+
+ buf[count] = (byte)b;
+ count++;
+ }
+
+ /**
+ * Flushes this output stream and forces any buffered output bytes
+ * to be written out. The general contract of <code>flush</code> is
+ * that calling it is an indication that, if any bytes previously
+ * written have been buffered by the implementation of the output
+ * stream, such bytes should immediately be written to their
+ * intended destination.
+ */
+ public void flush()
+ {
+ if (count == 0)
+ {
+ return;
+ }
+
+ // don't print out blank lines; flushing from PrintStream puts out these
+ if (count == LINE_SEPERATOR.length())
+ {
+ if (((char)buf[0]) == LINE_SEPERATOR.charAt(0) && ((count == 1) || // <- Unix & Mac, -> Windows
+ ((count == 2) && ((char)buf[1]) == LINE_SEPERATOR.charAt(1))))
+ {
+ reset();
+ return;
+ }
+ }
+
+ final byte[] theBytes = new byte[count];
+
+ System.arraycopy(buf, 0, theBytes, 0, count);
+
+ category.log(priority, new String(theBytes));
+
+ reset();
+ }
+
+ private void reset()
+ {
+ // not resetting the buffer -- assuming that if it grew that it
+ // will likely grow similarly again
+ count = 0;
+ }
+
+}
Property changes on: spi/trunk/src/main/java/org/jboss/wsf/spi/util/Log4jOutputStream.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
13 years, 11 months
JBossWS SVN: r12458 - in stack/native/trunk/modules/testsuite: native-tests/src/test/etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:14:13 -0400 (Thu, 10 Jun 2010)
New Revision: 12458
Modified:
stack/native/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
stack/native/trunk/modules/testsuite/native-tests/src/test/etc/log4j.xml
Log:
Adding org.jboss.wsf category to log4j conf
Modified: stack/native/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
===================================================================
--- stack/native/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 16:12:51 UTC (rev 12457)
+++ stack/native/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 16:14:13 UTC (rev 12458)
@@ -21,7 +21,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${log4j.output.dir}/test.log"/>
- <param name="Append" value="false"/>
+ <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -51,6 +51,10 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.wsf">
+ <priority value="DEBUG"/>
+ </category>
+
<category name="org.jboss.ws.core.MessageTrace">
<priority value="TRACE"/>
</category>
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/etc/log4j.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/etc/log4j.xml 2010-06-10 16:12:51 UTC (rev 12457)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/etc/log4j.xml 2010-06-10 16:14:13 UTC (rev 12458)
@@ -21,7 +21,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${log4j.output.dir}/test.log"/>
- <param name="Append" value="false"/>
+ <param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -51,6 +51,10 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.wsf">
+ <priority value="DEBUG"/>
+ </category>
+
<category name="org.jboss.ws.core.MessageTrace">
<priority value="TRACE"/>
</category>
13 years, 11 months
JBossWS SVN: r12457 - in stack/cxf/trunk/modules/testsuite: cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10 and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 12:12:51 -0400 (Thu, 10 Jun 2010)
New Revision: 12457
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/log4j.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/AsymmetricBindingClientTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/SymmetricBindingClientTestCase.java
stack/cxf/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
Log:
Fixing a couple of logs and adding org.jboss.wsf category to log4j conf
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/log4j.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/log4j.xml 2010-06-10 11:35:48 UTC (rev 12456)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/log4j.xml 2010-06-10 16:12:51 UTC (rev 12457)
@@ -51,6 +51,10 @@
<priority value="DEBUG"/>
</category>
+ <category name="org.jboss.wsf">
+ <priority value="DEBUG"/>
+ </category>
+
<category name="org.jboss.test.ws">
<priority value="TRACE"/>
</category>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/AsymmetricBindingClientTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/AsymmetricBindingClientTestCase.java 2010-06-10 11:35:48 UTC (rev 12456)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/AsymmetricBindingClientTestCase.java 2010-06-10 16:12:51 UTC (rev 12457)
@@ -32,6 +32,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.jboss.logging.Logger;
import org.jboss.test.ws.jaxws.cxf.interop.wstrust10.interopbaseaddress.interop.IPingService;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -47,6 +48,8 @@
*/
public class AsymmetricBindingClientTestCase extends JBossWSTest
{
+ private static final Logger log = Logger.getLogger(AsymmetricBindingClientTestCase.class);
+
private Bus bus;
public static Test suite()
@@ -90,7 +93,7 @@
private void loadBus(String scenario) throws Exception
{
- System.out.println("Loading bus for " + scenario + "...");
+ log.info("Loading bus for " + scenario + "...");
SpringBusFactory busFactory = new SpringBusFactory();
URL cxfConfig = getResourceURL("jaxws/cxf/interop/wstrust10/META-INF/" + scenario + "-client-config.xml");
bus = busFactory.createBus(cxfConfig);
@@ -100,7 +103,7 @@
@Override
protected void tearDown() throws Exception
{
- System.out.println("... bus teardown");
+ log.info("... bus teardown");
if (bus != null)
bus.shutdown(true);
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/SymmetricBindingClientTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/SymmetricBindingClientTestCase.java 2010-06-10 11:35:48 UTC (rev 12456)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/wstrust10/SymmetricBindingClientTestCase.java 2010-06-10 16:12:51 UTC (rev 12457)
@@ -32,6 +32,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.jboss.logging.Logger;
import org.jboss.test.ws.jaxws.cxf.interop.wstrust10.interopbaseaddress.interop.IPingService;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -46,6 +47,8 @@
*/
public class SymmetricBindingClientTestCase extends JBossWSTest
{
+ private static final Logger log = Logger.getLogger(SymmetricBindingClientTestCase.class);
+
private Bus bus;
public static Test suite()
@@ -106,7 +109,7 @@
private void loadBus(String scenario) throws Exception
{
- System.out.println("Loading bus for " + scenario + "...");
+ log.info("Loading bus for " + scenario + "...");
SpringBusFactory busFactory = new SpringBusFactory();
URL cxfConfig = getResourceURL("jaxws/cxf/interop/wstrust10/META-INF/" + scenario + "-client-config.xml");
bus = busFactory.createBus(cxfConfig);
@@ -116,7 +119,7 @@
@Override
protected void tearDown() throws Exception
{
- System.out.println("... bus teardown");
+ log.info("... bus teardown");
if (bus != null)
bus.shutdown(true);
Modified: stack/cxf/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 11:35:48 UTC (rev 12456)
+++ stack/cxf/trunk/modules/testsuite/framework-tests/src/test/etc/log4j.xml 2010-06-10 16:12:51 UTC (rev 12457)
@@ -56,6 +56,10 @@
<priority value="TRACE"/>
</category>
+ <category name="org.jboss.test.wsf">
+ <priority value="TRACE"/>
+ </category>
+
<category name="org.apache.cxf">
<priority value="INFO"/>
</category>
13 years, 11 months
JBossWS SVN: r12456 - framework/trunk/hudson/hudson-home/jobs/MAVEN-REPOSITORY-CLEAN.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-06-10 07:35:48 -0400 (Thu, 10 Jun 2010)
New Revision: 12456
Modified:
framework/trunk/hudson/hudson-home/jobs/MAVEN-REPOSITORY-CLEAN/config.xml
Log:
fixing hudson clean job
Modified: framework/trunk/hudson/hudson-home/jobs/MAVEN-REPOSITORY-CLEAN/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/MAVEN-REPOSITORY-CLEAN/config.xml 2010-06-10 08:10:24 UTC (rev 12455)
+++ framework/trunk/hudson/hudson-home/jobs/MAVEN-REPOSITORY-CLEAN/config.xml 2010-06-10 11:35:48 UTC (rev 12456)
@@ -10,11 +10,12 @@
USER=`whoami`
-if [ $USER = "hudson" ]; then
- rm -rf /data/maven-repos/hudson/repository
-else
+if [ -d /home/$USER/.m2/repository ]; then
rm -rf /home/$USER/.m2/repository
fi
+if [ -d /data/maven-repos/hudson/repository ]; then
+ rm -rf /data/maven-repos/hudson/repository
+fi
</command>
</hudson.tasks.Shell>
</builders>
13 years, 11 months
JBossWS SVN: r12455 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-10 04:10:24 -0400 (Thu, 10 Jun 2010)
New Revision: 12455
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3006] Using AS6 depchain for test classpath
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2010-06-09 21:54:52 UTC (rev 12454)
+++ stack/native/trunk/modules/testsuite/pom.xml 2010-06-10 08:10:24 UTC (rev 12455)
@@ -446,60 +446,61 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
+ <artifactId>jboss-as-depchain</artifactId>
+ <scope>import</scope>
+ <type>pom</type>
<version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-connector</artifactId>
- <version>${jboss.version}</version>
<exclusions>
+ <!-- Exclusion for not depending on the container integration -->
<exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-webservices</artifactId>
</exclusion>
+ <!-- Exclusions for preventing cyclic dependency on JBossWS-Native (AS 6.0.0.M3) -->
<exclusion>
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
</exclusion>
<exclusion>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-api</artifactId>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-core</artifactId>
</exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-ejb3</artifactId>
- <version>${jboss.version}</version>
- <exclusions>
<exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-factories</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-jaxrpc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-saaj</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-management</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-resources</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-services</artifactId>
+ </exclusion>
+ <!-- Exclusions for preventing http://www.slf4j.org/codes.html#multiple_bindings -->
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-system</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-jms-client</artifactId>
- <version>${hornetq.version}</version>
- </dependency>
</dependencies>
<build>
<plugins>
@@ -515,11 +516,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
- <!-- TODO: replace with maven dependencies -->
- <additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
- </additionalClasspathElements>
</configuration>
</plugin>
</plugins>
@@ -538,60 +534,65 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-aspects</artifactId>
+ <artifactId>jboss-as-depchain</artifactId>
+ <scope>import</scope>
+ <type>pom</type>
<version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-connector</artifactId>
- <version>${jboss.version}</version>
<exclusions>
+ <!-- Exclusion for not depending on the container integration -->
<exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-webservices</artifactId>
</exclusion>
+ <!-- Exclusions for preventing cyclic dependency on JBossWS-CXF (AS 6.0.0) -->
<exclusion>
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-client</artifactId>
</exclusion>
<exclusion>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-api</artifactId>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-management</artifactId>
</exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-ejb3</artifactId>
- <version>${jboss.version}</version>
- <exclusions>
<exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-server</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-factories</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-resources</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-factories</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-services</artifactId>
+ </exclusion>
+ <!-- Exclusions for preventing http://www.slf4j.org/codes.html#multiple_bindings -->
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-security</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-system</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hornetq</groupId>
- <artifactId>hornetq-jms-client</artifactId>
- <version>${hornetq.version}</version>
- </dependency>
</dependencies>
<build>
<plugins>
@@ -607,11 +608,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss601.home}/lib/endorsed</argLine>
- <!-- TODO: replace with maven dependencies -->
- <additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
- </additionalClasspathElements>
</configuration>
</plugin>
</plugins>
13 years, 11 months
JBossWS SVN: r12454 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-06-09 17:54:52 -0400 (Wed, 09 Jun 2010)
New Revision: 12454
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/login-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/users.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService_schema1.xsd
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jboss.xml
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/login-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/users.properties
Modified:
stack/cxf/trunk/modules/server/pom.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AuthenticationManagerLoader.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
Log:
Isolating PicketBox code to the test scope
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/server/pom.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -208,10 +208,6 @@
<groupId>org.jboss.security</groupId>
<artifactId>jboss-security-spi</artifactId>
</dependency>
- <dependency>
- <groupId>org.picketbox</groupId>
- <artifactId>picketbox-bare</artifactId>
- </dependency>
<!-- transitve dependencies -->
<dependency>
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -71,12 +71,12 @@
import org.apache.cxf.service.Service;
import org.apache.cxf.service.invoker.Invoker;
import org.apache.cxf.service.model.BindingOperationInfo;
-import org.jboss.security.SecurityContext;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
/**
* An abstract CXF invoker
@@ -114,11 +114,10 @@
//clear the WebServiceContextImpl's ThreadLocal variable
WebServiceContextImpl.clear();
// clear SecurityContext in case it has been propagated
- SecurityContext sc = exchange.getInMessage().getContent(SecurityContext.class);
- if (sc != null)
- {
- sc.setSubjectInfo(null);
- }
+ SecurityAdaptor adaptor = exchange.getInMessage().getContent(SecurityAdaptor.class);
+ if (adaptor != null) {
+ //TODO: release the propagated state
+ }
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AuthenticationManagerLoader.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AuthenticationManagerLoader.java 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AuthenticationManagerLoader.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -26,7 +26,6 @@
import javax.naming.NamingException;
import org.jboss.security.AuthenticationManager;
-import org.picketbox.factories.SecurityFactory;
/**
* AuthenticationManager loader
@@ -36,7 +35,7 @@
*/
public class AuthenticationManagerLoader
{
- public AuthenticationManager getManagerWithJndi()
+ public AuthenticationManager getManager()
{
try
{
@@ -49,21 +48,5 @@
throw new SecurityException("Unable to lookup AuthenticationManager using JNDI");
}
}
-
- public AuthenticationManager getManager(String securityDomainName)
- {
- SecurityFactory.prepare();
- try
- {
- return SecurityFactory.getAuthenticationManager(securityDomainName);
- }
- catch (Exception ex) {
- throw new SecurityException("Unable to get Authentication Manager", ex);
- }
- finally
- {
- SecurityFactory.release();
- }
- }
-
+
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -33,10 +33,10 @@
import org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor;
import org.jboss.logging.Logger;
import org.jboss.security.AuthenticationManager;
-import org.jboss.security.SecurityContext;
-import org.picketbox.config.PicketBoxConfiguration;
-import org.picketbox.exceptions.ConfigurationStreamNullException;
-import org.picketbox.factories.SecurityFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
/**
* Interceptor which authenticates a current principal and populates Subject
@@ -47,10 +47,11 @@
public class SubjectCreatingInterceptor extends AbstractUsernameTokenAuthenticatingInterceptor
{
private static final Logger log = Logger.getLogger(SubjectCreatingInterceptor.class);
- private static final String DEFAULT_SECURITY_DOMAIN_NAME = "JBossWS";
-
- private String securityDomainName = DEFAULT_SECURITY_DOMAIN_NAME;
+
+ private AuthenticationManagerLoader aml = null;
private boolean propagateContext;
+ private SecurityAdaptorFactory secAdaptorFactory;
+
public SubjectCreatingInterceptor()
{
@@ -60,22 +61,26 @@
public SubjectCreatingInterceptor(Map<String, Object> properties)
{
super(properties);
+ try
+ {
+ aml = AuthenticationManagerLoader.class.newInstance();
+ }
+ catch (Exception ex)
+ {
+ String msg = "AuthenticationManager can not be loaded";
+ log.error(msg);
+ throw new SecurityException(msg);
+ }
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ secAdaptorFactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
+
}
@Override
public Subject createSubject(String name, String password, boolean isDigest, String nonce, String created)
{
- //if (isDigest)
- //{
- //verifyUsernameToken(nonce, created);
- // CallbackHandler cb = new UsernameTokenCallbackHandler(nonce, created);
- // CallbackHandlerPolicyContextHandler.setCaallbackHandler(cb);
- //}
-
- SecurityContext securityContext = getSecurityContext();
-
- // authenticate and populate Subject
- AuthenticationManager am = securityContext.getAuthenticationManager();
+ // authenticate and populate Subject
+ AuthenticationManager am = aml.getManager();
Principal principal = new SimplePrincipal(name);
Subject subject = new Subject();
@@ -96,8 +101,12 @@
if (propagateContext)
{
- securityContext.getUtil().createSubjectInfo(principal, password, subject);
- PhaseInterceptorChain.getCurrentMessage().setContent(SecurityContext.class, securityContext);
+ SecurityAdaptor adaptor = secAdaptorFactory.newSecurityAdapter();
+ adaptor.setPrincipal(principal);
+ adaptor.setCredential(password);
+ adaptor.pushSubjectContext(subject, principal, password);
+
+ PhaseInterceptorChain.getCurrentMessage().setContent(SecurityAdaptor.class, adaptor);
if (TRACE)
log.trace("Security Context has been propagated");
}
@@ -106,77 +115,18 @@
@Override
public void handleFault(SoapMessage message) {
- SecurityContext securityContext = message.getContent(SecurityContext.class);
- if (securityContext != null) {
- securityContext.setSubjectInfo(null);
+ SecurityAdaptor adaptor = message.getContent(SecurityAdaptor.class);
+ if (adaptor != null) {
+ //TODO: release the propagated state
}
}
- private SecurityContext getSecurityContext() {
- SecurityFactory.prepare();
-
- try
- {
- return SecurityFactory.establishSecurityContext(securityDomainName);
- }
- catch (Exception ex) {
- throw new SecurityException("Unable to establish Security Context for domain "
- + securityDomainName, ex);
- }
- finally
- {
- SecurityFactory.release();
- }
- }
- /**
- * Loads a custom configuration file, can be used to add the configuration
- * for new domains or override the default ones configured by JBoss AS
- *
- * Note : loading a custom configuration file may affect other endpoints running
- * in the same container instance. Example, if some other endpoint depends on
- * a default JBossWS security domain and this custom config file overrides JBossWS
- * then the other endpoint may get affected
- *
- * @param configFilePath location of the custom configuration file
- */
- public void setSecurityConfigFile(String configFilePath)
- {
- SecurityFactory.prepare();
- try
- {
- PicketBoxConfiguration idtrustConfig = new PicketBoxConfiguration();
- idtrustConfig.load(configFilePath);
- }
- catch (ConfigurationStreamNullException ex) {
- throw new SecurityException("Unable to load the configuration file " + configFilePath);
- }
- catch (Exception ex) {
- throw new SecurityException("Unable to read the configuration file " + configFilePath, ex);
- }
- finally
- {
- SecurityFactory.release();
- }
- }
-
- /**
- * Sets the security domain name. This property has to be set when loading
- * a custom configuration file. It also can be used to override the default
- * security domain name (JBossWS)
- * @param domainName
- */
- public void setSecurityDomainName(String domainName) {
- securityDomainName = domainName;
- }
-
public void setPropagateContext(boolean propagateContext) {
this.propagateContext = propagateContext;
}
-
-
/** TODO: JBWS-3028
private static final int TIMESTAMP_FRESHNESS_THRESHOLD = 300;
private NonceStore nonceStore;
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/pom.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -14,7 +14,19 @@
<relativePath>../pom.xml</relativePath>
</parent>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-server</artifactId>
+ <version>${version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.picketbox</groupId>
+ <artifactId>picketbox-bare</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<!-- Profiles -->
<profiles>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jaxws.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -194,6 +194,22 @@
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize/WEB-INF">
<include name="jboss-web.xml"/>
+ <include name="jbossws-cxf.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ </war>
+
+ <!-- jaxws-samples-wsse-username-authorize-custom -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username-authorize-custom.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF">
+ <include name="jboss-web.xml"/>
<include name="login-config.xml"/>
<include name="users.properties"/>
<include name="roles.properties"/>
@@ -201,7 +217,7 @@
<include name="wsdl/*"/>
</webinf>
</war>
-
+
<!-- jaxws-samples-wsseEJB -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsseEJB.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -214,6 +230,7 @@
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsseEJB/META-INF">
<include name="jbossws-cxf.xml"/>
+ <include name="jboss.xml"/>
</metainf>
</jar>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.samples.wsse;
+
+import java.util.Collections;
+import org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor;
+import org.picketbox.config.PicketBoxConfiguration;
+import org.picketbox.exceptions.ConfigurationStreamNullException;
+import org.picketbox.factories.SecurityFactory;
+
+
+/**
+ * Interceptor which authenticates a current principal and populates Subject
+ *
+ * @author Sergey Beryozkin
+ *
+ */
+public class CustomSubjectCreatingInterceptor extends SubjectCreatingInterceptor
+{
+
+ public CustomSubjectCreatingInterceptor()
+ {
+ super(Collections.<String, Object> singletonMap("action", "UsernameToken"));
+ }
+
+ public void setSecurityConfigFile(String configFilePath)
+ {
+ SecurityFactory.prepare();
+ try
+ {
+ PicketBoxConfiguration idtrustConfig = new PicketBoxConfiguration();
+ idtrustConfig.load(configFilePath);
+ }
+ catch (ConfigurationStreamNullException ex) {
+ throw new SecurityException("Unable to load the configuration file " + configFilePath);
+ }
+ catch (Exception ex) {
+ throw new SecurityException("Unable to read the configuration file " + configFilePath, ex);
+ }
+ finally
+ {
+ SecurityFactory.release();
+ }
+ }
+
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/CustomSubjectCreatingInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.samples.wsse;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security username authorization test case
+ *
+ * @author Sergey Beryozkin
+ *
+ */
+public final class UsernameAuthorizationCustomFileTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-username-authorize-custom";
+ private final QName servicePort = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityServicePort");
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(UsernameAuthorizationCustomFileTestCase.class, "jaxws-samples-wsse-username-authorize-custom.war");
+ }
+
+ public void testAuthorizedCustomConfig() throws Exception
+ {
+ doTestAuthorized(serviceURL, servicePort, "theKermit");
+ }
+
+private void doTestAuthorized(String endpointAddress, QName portName, String userName) throws Exception
+ {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(portName, ServiceIface.class);
+ setupWsse(proxy, userName);
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ public void testUnauthenticated() throws Exception
+ {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ setupWsse(proxy, "foo");
+ try
+ {
+ proxy.sayHello();
+ fail("User foo should not be authenticated.");
+ }
+ catch (Exception ex)
+ {
+ //expected
+ }
+ }
+
+ public void testUnauthorizedCustomConfig() throws Exception
+ {
+ doTestUnauthorized(serviceURL, servicePort, "theKermit");
+ }
+
+private void doTestUnauthorized(String endpointAddress, QName portName, String userName) throws Exception
+ {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(portName, ServiceIface.class);
+ setupWsse(proxy, userName);
+ try
+ {
+ proxy.greetMe();
+ fail("User kermit should not be authorized to invoke greetMe.");
+ }
+ catch (Exception ex)
+ {
+ assertEquals("Unauthorized", ex.getMessage());
+ }
+ }
+
+ private void setupWsse(ServiceIface proxy, String username)
+ {
+ Client client = ClientProxy.getClient(proxy);
+ Endpoint cxfEndpoint = client.getEndpoint();
+
+ Map<String, Object> outProps = new HashMap<String, Object>();
+ outProps.put("action", "UsernameToken");
+ outProps.put("user", username);
+ outProps.put("passwordType", "PasswordText");
+ outProps.put("passwordCallbackClass", "org.jboss.test.ws.jaxws.samples.wsse.UsernamePasswordCallback");
+ WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(outProps); //request
+ cxfEndpoint.getOutInterceptors().add(wssOut);
+ cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.java 2010-06-09 21:54:52 UTC (rev 12454)
@@ -47,10 +47,8 @@
public final class UsernameAuthorizationTestCase extends JBossWSTest
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-username-authorize/default-config";
- private final String serviceURL2 = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-username-authorize/custom-config";
private final QName servicePort = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityServicePort");
- private final QName servicePort2 = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityServicePort2");
public static Test suite()
{
@@ -62,13 +60,8 @@
doTestAuthorized(serviceURL, servicePort, "kermit");
}
- public void testAuthorizedCustomConfig() throws Exception
+private void doTestAuthorized(String endpointAddress, QName portName, String userName) throws Exception
{
- doTestAuthorized(serviceURL2, servicePort2, "theKermit");
- }
-
- private void doTestAuthorized(String endpointAddress, QName portName, String userName) throws Exception
- {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
URL wsdlURL = new URL(endpointAddress + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
@@ -100,11 +93,6 @@
doTestUnauthorized(serviceURL, servicePort, "kermit");
}
- public void testUnauthorizedCustomConfig() throws Exception
- {
- doTestUnauthorized(serviceURL2, servicePort2, "theKermit");
- }
-
private void doTestUnauthorized(String endpointAddress, QName portName, String userName) throws Exception
{
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity", "SecurityService");
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/jbossws-cxf.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -43,38 +43,5 @@
<bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
</jaxws:inInterceptors>
</jaxws:endpoint>
-
- <bean id="SecurityContextIn2" class="org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingInterceptor">
- <constructor-arg>
- <map>
- <entry key="action" value="UsernameToken"/>
- </map>
- </constructor-arg>
- <property name="securityConfigFile" value="login-config.xml"/>
- <property name="securityDomainName" value="custom"/>
- </bean>
-
- <util:map id="methodPermissions2">
- <entry key="sayHello" value="theFriends"/>
- <entry key="greetMe" value="theSnoopies"/>
- </util:map>
-
- <bean id="AuthorizeIn2" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
- <property name="methodRolesMap" ref="methodPermissions2"/>
- </bean>
-
- <jaxws:endpoint
- id='ServiceImpl2'
- address='http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-authorize/custom-config'
- implementor='org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl'
- endpointName="ns:SecurityServicePort2"
- serviceName="ns:SecurityService"
- xmlns:ns="http://www.jboss.org/jbossws/ws-extensions/wssecurity">
- <jaxws:inInterceptors>
- <ref bean="SecurityContextIn2"/>
- <ref bean="AuthorizeIn2"/>
- <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
- </jaxws:inInterceptors>
- </jaxws:endpoint>
</beans>
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/login-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/login-config.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/login-config.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -1,16 +0,0 @@
-<?xml version='1.0'?>
-
-<policy xmlns="urn:jboss:security-config:5.0"
->
-
- <application-policy name="custom">
- <authentication>
- <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
- flag="required">
- </login-module>
- </authentication>
- </application-policy>
-
-
-</policy>
-
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/roles.properties 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/roles.properties 2010-06-09 21:54:52 UTC (rev 12454)
@@ -1,2 +0,0 @@
-# A sample roles.properties file for use with the UsersRolesLoginModule
-theKermit=theFriends
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/users.properties 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/users.properties 2010-06-09 21:54:52 UTC (rev 12454)
@@ -1,2 +0,0 @@
-# A sample users.properties file for use with the UsersRolesLoginModule
-theKermit=thefrog2
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize/WEB-INF/web.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -10,18 +10,10 @@
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
</servlet>
- <servlet>
- <servlet-name>TestService2</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
- </servlet>
-
<servlet-mapping>
<servlet-name>TestService</servlet-name>
<url-pattern>/default-config/*</url-pattern>
</servlet-mapping>
- <servlet-mapping>
- <servlet-name>TestService2</servlet-name>
- <url-pattern>/custom-config/*</url-pattern>
- </servlet-mapping>
+
</web-app>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jboss-web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jboss-web.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <security-domain>java:/jaas/custom</security-domain>
+</jboss-web>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jbossws-cxf.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jbossws-cxf.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,40 @@
+<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:util='http://www.springframework.org/schema/util'
+ xsi:schemaLocation='http://cxf.apache.org/core
+ http://cxf.apache.org/schemas/core.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util-2.0.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cxf.apache.org/jaxws
+ http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <bean id="SecurityContextIn" class="org.jboss.test.ws.jaxws.samples.wsse.CustomSubjectCreatingInterceptor">
+ <property name="securityConfigFile" value="login-config.xml"/>
+ </bean>
+
+ <util:map id="methodPermissions">
+ <entry key="sayHello" value="theFriends"/>
+ <entry key="greetMe" value="theSnoopies"/>
+ </util:map>
+
+ <bean id="AuthorizeIn" class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
+ <property name="methodRolesMap" ref="methodPermissions"/>
+ </bean>
+
+ <jaxws:endpoint
+ id='ServiceImpl'
+ address='http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-authorize-custom'
+ implementor='org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl'>
+ <jaxws:inInterceptors>
+ <ref bean="SecurityContextIn"/>
+ <ref bean="AuthorizeIn"/>
+ <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+</beans>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/jbossws-cxf.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/login-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/login-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/login-config.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,16 @@
+<?xml version='1.0'?>
+
+<policy xmlns="urn:jboss:security-config:5.0"
+>
+
+ <application-policy name="custom">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ </login-module>
+ </authentication>
+ </application-policy>
+
+
+</policy>
+
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/login-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/roles.properties 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+theKermit=theFriends
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/roles.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/users.properties 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+theKermit=thefrog2
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/users.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+ version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService.wsdl 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity" name="SecurityService"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity" schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <message name="greetMe">
+ <part name="parameters" element="tns:greetMe"/>
+ </message>
+ <message name="greetMeResponse">
+ <part name="parameters" element="tns:greetMeResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ <operation name="greetMe">
+ <input message="tns:greetMe"/>
+ <output message="tns:greetMeResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="greetMe">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-authorize-custom"/>
+ </port>
+ </service>
+</definitions>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService_schema1.xsd (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService_schema1.xsd 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:element name="greetMe" type="tns:greetMe"/>
+
+ <xs:element name="greetMeResponse" type="tns:greetMeResponse"/>
+
+ <xs:complexType name="greetMe">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="greetMeResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/username-authorize-custom/WEB-INF/wsdl/SecurityService_schema1.xsd
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jboss.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jboss.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jboss.xml 2010-06-09 21:54:52 UTC (rev 12454)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
+
+<jboss>
+ <security-domain>java:/jaas/JBossWS</security-domain>
+</jboss>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsseEJB/META-INF/jboss.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-06-09 21:54:52 UTC (rev 12454)
@@ -58,5 +58,4 @@
# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available
# on AS 5.x
-org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.*
-org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.*
+org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-06-09 18:03:49 UTC (rev 12453)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-06-09 21:54:52 UTC (rev 12454)
@@ -58,6 +58,5 @@
# [JBWS-3028] Complete UsernameToken JAAS integration: PicketBox not available
# on AS 5.x
-org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationTestCase.*
-org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase.*
+org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase.*
13 years, 11 months
JBossWS SVN: r12453 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-06-09 14:03:49 -0400 (Wed, 09 Jun 2010)
New Revision: 12453
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3006] Further work on testsuite classpath (and logging configuration)
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2010-06-09 17:36:39 UTC (rev 12452)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2010-06-09 18:03:49 UTC (rev 12453)
@@ -477,10 +477,12 @@
<type>pom</type>
<version>${jboss.version}</version>
<exclusions>
+ <!-- Exclusion for not depending on the container integration -->
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-webservices</artifactId>
</exclusion>
+ <!-- Exclusions for preventing cyclic dependency on JBossWS-Native (AS 6.0.0.M3) -->
<exclusion>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-client</artifactId>
@@ -513,6 +515,15 @@
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-services</artifactId>
</exclusion>
+ <!-- Exclusions for preventing http://www.slf4j.org/codes.html#multiple_bindings -->
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -532,11 +543,8 @@
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
- <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <!-- Lib below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
<additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
@@ -562,10 +570,12 @@
<type>pom</type>
<version>${jboss.version}</version>
<exclusions>
+ <!-- Exclusion for not depending on the container integration -->
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-webservices</artifactId>
</exclusion>
+ <!-- Exclusions for preventing cyclic dependency on JBossWS-CXF (AS 6.0.0) -->
<exclusion>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
@@ -602,6 +612,15 @@
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-services</artifactId>
</exclusion>
+ <!-- Exclusions for preventing http://www.slf4j.org/codes.html#multiple_bindings -->
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logmanager</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -621,11 +640,8 @@
<argLine>${surefire.jvm.args} ${surefire.jvm.management.args} -Djava.endorsed.dirs=${jboss601.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
- <!-- Libs below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
+ <!-- Lib below required just for jaxrpc tests; listed here to prevent CXF stack from depending on Native stack -->
<additionalClasspathElement>${jboss.home}/common/lib/jbossws-native-core.jar</additionalClasspathElement>
- <additionalClasspathElement>${jboss.home}/common/lib/netty.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
13 years, 11 months