You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2006/09/23 20:22:37 UTC
svn commit: r449283 - in /webservices/axis2/trunk/java/modules: integration/
integration/test-resources/rampart/
integration/test-resources/rampart/policy/
integration/test/org/apache/rahas/ integration/test/org/apache/rampart/
security/src/org/apache/...
Author: ruchithf
Date: Sat Sep 23 11:22:36 2006
New Revision: 449283
URL: http://svn.apache.org/viewvc?view=rev&rev=449283
Log:
Adding integration tests to test Rampart WS-SecPolicy integration
Added:
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/1.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/3.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/4.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/5.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/6.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/7.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-1.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-3.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-4.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-5.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-6.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-7.xml
webservices/axis2/trunk/java/modules/integration/test-resources/rampart/store.jks (with props)
webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/
webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/PWCallback.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/RampartTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/Service.java
Modified:
webservices/axis2/trunk/java/modules/integration/maven.xml
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/PWCallback.java
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/RampartUtil.java
Modified: webservices/axis2/trunk/java/modules/integration/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/maven.xml?view=diff&rev=449283&r1=449282&r2=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/maven.xml Sat Sep 23 11:22:36 2006
@@ -17,161 +17,250 @@
</postGoal>
<preGoal name="test:compile">
- <!-- Set a property that can be picked up from the ant build.xml's -->
- <ant:property name="maven.class.path" refid="maven.dependency.classpath"/>
- <!-- copy the mars so that they are available on the test classpath -->
- <copy file="../addressing/target/addressing-${addressing_version}.mar"
- tofile="target/test-classes/modules/addressing-${addressing_version}.mar"/>
- <copy file="../security/target/rampart-${rampart_version}.mar"
- tofile="target/test-classes/modules/rampart-${rampart_version}.mar"/>
-
- <j:set var="axis2.home" value="${basedir}/target"/>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-d xmlbeans -p samples.wsdl.perf -o target/perf -s -t -ss -sd -g -uri test/samples/wsdl/perf/perf.wsdl"/>
- </java>
- <ant:copy overwrite="yes" todir="target/perf/src/samples/wsdl/perf">
- <ant:fileset dir="test/samples/wsdl/perf">
- <ant:include name="*Skeleton.java"/>
- </ant:fileset>
- </ant:copy>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf"
- target="make.repo"/>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf"
- target="jar.client"/>
- <ant:move file="target/perf/build/lib/PerfPortType-test-client.jar"
- tofile="target/perf/build/lib/PerfSoapService-test-client.jar" />
-
- <ant:move file="target/perf/build/lib/PerfPortType.aar"
- tofile="target/perf/build/lib/PerfSoapService.aar" />
-
- <ant:path id="samples.wsdl.perf.client.jar"
- location="target/perf/build/lib/PerfSoapService-test-client.jar"/>
-
- <maven:addPath id="maven.dependency.classpath" refid="samples.wsdl.perf.client.jar"/>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-d adb -p samples.wsdl.perf2 -o target/perf2 -s -t -ss -sd -g -uri test/samples/wsdl/perf2/perf.wsdl"/>
- </java>
- <ant:copy overwrite="yes" todir="target/perf2/src/samples/wsdl/perf2">
- <ant:fileset dir="test/samples/wsdl/perf2">
- <ant:include name="*Skeleton.java"/>
- </ant:fileset>
- </ant:copy>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf2"
- target="make.repo"/>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf2"
- target="jar.client"/>
- <ant:move file="target/perf2/build/lib/PerfPortType-test-client.jar"
- tofile="target/perf2/build/lib/PerfSoapService2-test-client.jar" />
- <ant:path id="samples.wsdl.perf2.client.jar"
- location="target/perf2/build/lib/PerfSoapService2-test-client.jar"/>
- <maven:addPath id="maven.dependency.classpath" refid="samples.wsdl.perf2.client.jar"/>
-
- <!-- compile the schema for XMLbeans -->
- <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-src target/xmlbeans-src -d target/classes test-resources/xsd/type-test.xsd"/>
- </java>
-
-
- <ant:echo>Running codegen RPC WSDLs - take 1</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/rpc-test1 -uri test-resources/rpc/test-rpc-2.wsdl -uw"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test1"
- target="jar.client"/>
-
- <ant:echo>Running codegen RPC WSDLs - take 2</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/rpc-test2 -uri test-resources/rpc/test-rpc-3.wsdl -uw"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test2"
- target="jar.client"/>
-
-
- <ant:echo>Running codegen RPC WSDLs - take 3</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/rpc-test3 -uri test-resources/rpc/test-rpc-2.wsdl -uw -d xmlbeans"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test3"
- target="jar.client"/>
-
- <ant:echo>Running codegen RPC WSDLs - take 4</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/rpc-test4 -uri test-resources/rpc/test-rpc-2.wsdl -uw -d xmlbeans -ss -sd"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test4"
- target="jar.server"/>
-
- <ant:echo>Running codegen RPC WSDLs with helper mode - take 1</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/helper-test1 -uri test-resources/rpc/test-rpc-2.wsdl -u -Eh"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/helper-test1"
- target="jar.client"/>
-
- <ant:echo>Running codegen RPC WSDLs with helper mode - take 2</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/helper-test2 -uri test-resources/rpc/test-rpc-2.wsdl -u -Eh"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/helper-test2"
- target="jar.client"/>
+ <!-- Set a property that can be picked up from the ant build.xml's -->
+ <ant:property name="maven.class.path" refid="maven.dependency.classpath"/>
+
+ <!-- copy the mars so that they are available on the test classpath -->
+ <copy file="../addressing/target/addressing-${addressing_version}.mar"
+ tofile="target/test-classes/modules/addressing-${addressing_version}.mar"/>
+ <copy file="../security/target/rampart-${rampart_version}.mar"
+ tofile="target/test-classes/modules/rampart-${rampart_version}.mar"/>
- <j:if test="${context.getVariable('maven.test.skip') != 'true'}">
- <j:if test="${context.getVariable('skip.enterprise.tests') != 'true'}">
- <!-- codegen for the enterprise wsdl -->
- <ant:echo>Running codegen for Enterprise WSDL - take 1</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-d xmlbeans -o target/enterprise-test1 -s -uri test-resources/enterprise.wsdl"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test1"
- target="jar.client"/>
- <ant:echo>Running codegen for Enterprise WSDL - take 2</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-o target/enterprise-test2 -s -uri test-resources/enterprise.wsdl"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test2"
- target="jar.client"/>
-
- <ant:echo>Running codegen for Enterprise WSDL - take 3</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-d xmlbeans -ss -sd -g -o target/enterprise-test3 -s -uri test-resources/enterprise.wsdl"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test3"
- target="jar.server"/>
+ <j:set var="axis2.home" value="${basedir}/target"/>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-d xmlbeans -p samples.wsdl.perf -o target/perf -s -t -ss -sd -g -uri test/samples/wsdl/perf/perf.wsdl"/>
+ </java>
+ <ant:copy overwrite="yes" todir="target/perf/src/samples/wsdl/perf">
+ <ant:fileset dir="test/samples/wsdl/perf">
+ <ant:include name="*Skeleton.java"/>
+ </ant:fileset>
+ </ant:copy>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf"
+ target="make.repo"/>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf"
+ target="jar.client"/>
+ <ant:move file="target/perf/build/lib/PerfPortType-test-client.jar"
+ tofile="target/perf/build/lib/PerfSoapService-test-client.jar" />
+
+ <ant:move file="target/perf/build/lib/PerfPortType.aar"
+ tofile="target/perf/build/lib/PerfSoapService.aar" />
+
+ <ant:path id="samples.wsdl.perf.client.jar"
+ location="target/perf/build/lib/PerfSoapService-test-client.jar"/>
- <ant:echo>Running codegen for Enterprise WSDL - take 4</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-ns2p urn:sobject.enterprise.soap.sforce.com=com.salesforce -d xmlbeans -ss -sd -g -o target/enterprise-test4 -s -uri test-resources/enterprise.wsdl"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test4"
- target="jar.server"/>
- <ant:echo>Running codegen for eBaySvc WSDL</ant:echo>
- <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
- <classpath refid="maven.dependency.classpath"/>
- <arg line="-ss -sd -g -b -o target/eBaySvc -s -uri test-resources/eBaySvc.wsdl"/>
- </java>
- <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/eBaySvc"
- target="jar.server"/>
- </j:if>
+ <maven:addPath id="maven.dependency.classpath" refid="samples.wsdl.perf.client.jar"/>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-d adb -p samples.wsdl.perf2 -o target/perf2 -s -t -ss -sd -g -uri test/samples/wsdl/perf2/perf.wsdl"/>
+ </java>
+ <ant:copy overwrite="yes" todir="target/perf2/src/samples/wsdl/perf2">
+ <ant:fileset dir="test/samples/wsdl/perf2">
+ <ant:include name="*Skeleton.java"/>
+ </ant:fileset>
+ </ant:copy>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf2"
+ target="make.repo"/>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/perf2"
+ target="jar.client"/>
+ <ant:move file="target/perf2/build/lib/PerfPortType-test-client.jar"
+ tofile="target/perf2/build/lib/PerfSoapService2-test-client.jar" />
+ <ant:path id="samples.wsdl.perf2.client.jar"
+ location="target/perf2/build/lib/PerfSoapService2-test-client.jar"/>
+ <maven:addPath id="maven.dependency.classpath" refid="samples.wsdl.perf2.client.jar"/>
+
+ <!-- compile the schema for XMLbeans -->
+ <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-src target/xmlbeans-src -d target/classes test-resources/xsd/type-test.xsd"/>
+ </java>
+
+ <j:if test="${context.getVariable('skip.enterprise.tests') != 'true'}">
+ <ant:echo>Running codegen RPC WSDLs - take 1</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/rpc-test1 -uri test-resources/rpc/test-rpc-2.wsdl -uw"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test1"
+ target="jar.client"/>
+
+ <ant:echo>Running codegen RPC WSDLs - take 2</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/rpc-test2 -uri test-resources/rpc/test-rpc-3.wsdl -uw"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test2"
+ target="jar.client"/>
+
+
+ <ant:echo>Running codegen RPC WSDLs - take 3</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/rpc-test3 -uri test-resources/rpc/test-rpc-2.wsdl -uw -d xmlbeans"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test3"
+ target="jar.client"/>
+
+ <ant:echo>Running codegen RPC WSDLs - take 4</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/rpc-test4 -uri test-resources/rpc/test-rpc-2.wsdl -uw -d xmlbeans -ss -sd"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/rpc-test4"
+ target="jar.server"/>
+
+ <ant:echo>Running codegen RPC WSDLs with helper mode - take 1</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/helper-test1 -uri test-resources/rpc/test-rpc-2.wsdl -u -Eh"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/helper-test1"
+ target="jar.client"/>
+
+ <ant:echo>Running codegen RPC WSDLs with helper mode - take 2</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/helper-test2 -uri test-resources/rpc/test-rpc-2.wsdl -u -Eh"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/helper-test2"
+ target="jar.client"/>
+
+ <j:if test="${context.getVariable('maven.test.skip') != 'true'}">
+
+ <!-- codegen for the enterprise wsdl -->
+ <ant:echo>Running codegen for Enterprise WSDL - take 1</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-d xmlbeans -o target/enterprise-test1 -s -uri test-resources/enterprise.wsdl"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test1"
+ target="jar.client"/>
+ <ant:echo>Running codegen for Enterprise WSDL - take 2</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-o target/enterprise-test2 -s -uri test-resources/enterprise.wsdl"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test2"
+ target="jar.client"/>
+
+
+ <ant:echo>Running codegen for Enterprise WSDL - take 3</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-d xmlbeans -ss -sd -g -o target/enterprise-test3 -s -uri test-resources/enterprise.wsdl"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test3"
+ target="jar.server"/>
+
+ <ant:echo>Running codegen for Enterprise WSDL - take 4</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-ns2p urn:sobject.enterprise.soap.sforce.com=com.salesforce -d xmlbeans -ss -sd -g -o target/enterprise-test4 -s -uri test-resources/enterprise.wsdl"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/enterprise-test4"
+ target="jar.server"/>
+ <ant:echo>Running codegen for eBaySvc WSDL</ant:echo>
+ <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+ <classpath refid="maven.dependency.classpath"/>
+ <arg line="-ss -sd -g -b -o target/eBaySvc -s -uri test-resources/eBaySvc.wsdl"/>
+ </java>
+ <ant:ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="target/eBaySvc"
+ target="jar.server"/>
+ </j:if>
</j:if>
</preGoal>
<postGoal name="test:compile">
<j:if test="${context.getVariable('maven.test.skip') != 'true'}">
+
+ <!--Setting up service and client repos for org.apache.rampart.* tests -->
+ <mkdir dir="target/temp-ramp"/>
+ <mkdir dir="target/temp-ramp/META-INF"/>
+
+ <copy overwrite="yes" file="target/test-classes/org/apache/rampart/Service.class"
+ tofile="target/temp-ramp/org/apache/rampart/Service.class"/>
+ <copy overwrite="yes" file="target/test-classes/org/apache/rampart/PWCallback.class"
+ tofile="target/temp-ramp/org/apache/rampart/PWCallback.class"/>
+
+ <copy overwrite="yes" file="test-resources/rampart/store.jks"
+ tofile="target/temp-ramp/store.jks"/>
+
+ <ant:path id="ramp.client.props" location="test-resources/rampart"/>
+ <maven:addPath id="maven.dependency.classpath" refid="ramp.client.props"/>
+
+ <mkdir dir="target/test-resources/rampart_client_repo"/>
+ <mkdir dir="target/test-resources/rampart_client_repo/conf"/>
+ <mkdir dir="target/test-resources/rampart_client_repo/modules"/>
+
+ <copy file="../security/target/rampart-${rampart_version}.mar"
+ tofile="target/test-resources/rampart_client_repo/modules/rampart-${rampart_version}.mar"/>
+ <copy file="../rahas/target/rahas-${rahas_version}.mar"
+ tofile="target/test-resources/rampart_client_repo/modules/rahas-${rahas_version}.mar"/>
+ <copy file="../addressing/target/addressing-${addressing_version}.mar"
+ tofile="target/test-resources/rampart_client_repo/modules/addressing-${addressing_version}.mar"/>
+
+ <mkdir dir="target/test-resources/rampart_service_repo"/>
+ <mkdir dir="target/test-resources/rampart_service_repo/conf"/>
+ <mkdir dir="target/test-resources/rampart_service_repo/services"/>
+ <mkdir dir="target/test-resources/rampart_service_repo/modules"/>
+
+ <copy file="../security/target/rampart-${rampart_version}.mar"
+ tofile="target/test-resources/rampart_service_repo/modules/rampart-${rampart_version}.mar"/>
+ <copy file="../rahas/target/rahas-${rahas_version}.mar"
+ tofile="target/test-resources/rampart_service_repo/modules/rahas-${rahas_version}.mar"/>
+ <copy file="../addressing/target/addressing-${addressing_version}.mar"
+ tofile="target/test-resources/rampart_service_repo/modules/addressing-${addressing_version}.mar"/>
+
+ <!-- Service 1 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-1.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService1.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 2 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-2.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService2.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 3 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-3.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService3.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 4 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-4.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService4.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 5 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-5.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService5.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 6 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-6.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService6.aar"
+ basedir="target/temp-ramp"/>
+
+ <!-- Service 7 -->
+ <copy overwrite="yes" file="test-resources/rampart/services-7.xml"
+ tofile="target/temp-ramp/META-INF/services.xml"/>
+
+ <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService7.aar"
+ basedir="target/temp-ramp"/>
<!-- Service classes for the SecConv tests -->
<mkdir dir="target/temp-sc"/>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/1.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/1.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/1.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/1.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,52 @@
+<wsp:Policy wsu:Id="UTOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+<wsp:ExactlyOne>
+ <wsp:All>
+ <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken RequireClientCertificate="false"/>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+</wsp:ExactlyOne>
+</wsp:Policy>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/2.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/2.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/2.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,69 @@
+<wsp:Policy wsu:Id="SigOnly" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/3.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/3.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/3.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/3.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,73 @@
+<wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/4.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/4.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/4.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/4.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,74 @@
+<wsp:Policy wsu:Id="EncrSig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptBeforeSigning />
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/5.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/5.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/5.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/5.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,75 @@
+<wsp:Policy wsu:Id="SigEncrDK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/6.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/6.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/6.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/6.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,72 @@
+<wsp:Policy wsu:Id="SigEncrTripleDesRSA15" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+<wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+</wsp:ExactlyOne>
+</wsp:Policy>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/7.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/7.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/7.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/policy/7.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,74 @@
+<wsp:Policy wsu:Id="SigEncrTripleDesRSA15DK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+<wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">test-resources/rampart/store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+</wsp:ExactlyOne>
+</wsp:Policy>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-1.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-1.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-1.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-1.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,50 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="UTOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken RequireClientCertificate="false"/>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-2.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-2.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-2.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,75 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigOnly" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-3.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-3.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-3.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-3.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,87 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-4.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-4.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-4.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-4.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,88 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+<wsp:Policy wsu:Id="EncrSig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptBeforeSigning />
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-5.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-5.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-5.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-5.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,88 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrDK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-6.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-6.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-6.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-6.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,85 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-7.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-7.xml?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-7.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/rampart/services-7.xml Sat Sep 23 11:22:36 2006
@@ -0,0 +1,88 @@
+<service name="SecureService">
+
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15DK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
Added: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/store.jks
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/rampart/store.jks?view=auto&rev=449283
==============================================================================
Binary file - no diff available.
Propchange: webservices/axis2/trunk/java/modules/integration/test-resources/rampart/store.jks
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/PWCallback.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/PWCallback.java?view=diff&rev=449283&r1=449282&r2=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/PWCallback.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/PWCallback.java Sat Sep 23 11:22:36 2006
@@ -193,5 +193,3 @@
}
}
-
-
Added: webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/PWCallback.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/PWCallback.java?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/PWCallback.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/PWCallback.java Sat Sep 23 11:22:36 2006
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCallback implements CallbackHandler {
+
+
+
+ /** Field key */
+
+ private static final byte[] key = {
+
+ (byte) 0x31, (byte) 0xfd, (byte) 0xcb, (byte) 0xda, (byte) 0xfb,
+
+ (byte) 0xcd, (byte) 0x6b, (byte) 0xa8, (byte) 0xe6, (byte) 0x19,
+
+ (byte) 0xa7, (byte) 0xbf, (byte) 0x51, (byte) 0xf7, (byte) 0xc7,
+
+ (byte) 0x3e, (byte) 0x80, (byte) 0xae, (byte) 0x98, (byte) 0x51,
+
+ (byte) 0xc8, (byte) 0x51, (byte) 0x34, (byte) 0x04,
+
+ };
+
+
+
+ /*
+
+ * (non-Javadoc)
+
+ * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
+
+ */
+
+
+
+ /**
+
+ * Method handle
+
+ *
+
+ * @param callbacks
+
+ * @throws java.io.IOException
+
+ * @throws javax.security.auth.callback.UnsupportedCallbackException
+
+ */
+
+ public void handle(Callback[] callbacks)
+
+ throws IOException, UnsupportedCallbackException {
+
+
+
+ for (int i = 0; i < callbacks.length; i++) {
+
+ if (callbacks[i] instanceof WSPasswordCallback) {
+
+ WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+
+
+
+ /*
+
+ * This usage type is used only in case we received a
+
+ * username token with a password of type PasswordText or
+
+ * an unknown password type.
+
+ *
+
+ * This case the WSPasswordCallback object contains the
+
+ * identifier (aka username), the password we received, and
+
+ * the password type string to identify the type.
+
+ *
+
+ * Here we perform only a very simple check.
+
+ */
+
+ if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
+
+ if(pc.getIdentifer().equals("Ron") && pc.getPassword().equals("noR")) {
+
+ return;
+
+ }
+
+ if(pc.getIdentifer().equals("joe") && pc.getPassword().equals("eoj")) {
+
+ return;
+
+ }
+
+ if (pc.getPassword().equals("sirhC")) {
+
+ return;
+
+ }
+
+ throw new UnsupportedCallbackException(callbacks[i],
+
+ "check failed");
+
+ }
+
+ /*
+
+ * here call a function/method to lookup the password for
+
+ * the given identifier (e.g. a user name or keystore alias)
+
+ * e.g.: pc.setPassword(passStore.getPassword(pc.getIdentfifier))
+
+ * for Testing we supply a fixed name here.
+
+ */
+
+ if (pc.getUsage() == WSPasswordCallback.KEY_NAME) {
+
+ pc.setKey(key);
+
+ } else if(pc.getIdentifer().equals("alice")) {
+
+ pc.setPassword("password");
+
+ } else if(pc.getIdentifer().equals("bob")) {
+
+ pc.setPassword("password");
+
+ } else if(pc.getIdentifer().equals("Ron")) {
+
+ pc.setPassword("noR");
+
+ } else if(pc.getIdentifer().equals("joe")) {
+
+ pc.setPassword("eoj");
+
+ } else if(pc.getIdentifer().equals("ip")) {
+
+ pc.setPassword("password");
+
+ } else {
+
+ pc.setPassword("sirhC");
+
+ }
+
+ } else {
+
+ throw new UnsupportedCallbackException(callbacks[i],
+
+ "Unrecognized Callback");
+
+ }
+
+ }
+
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/RampartTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/RampartTest.java?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/RampartTest.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/RampartTest.java Sat Sep 23 11:22:36 2006
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.integration.UtilServer;
+import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyEngine;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+
+public class RampartTest extends TestCase {
+
+ public final static int PORT = UtilServer.TESTING_PORT;
+
+ public RampartTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ UtilServer.start(Constants.TESTING_PATH + "rampart_service_repo" ,null);
+ }
+
+
+ protected void tearDown() throws Exception {
+ UtilServer.stop();
+ }
+
+
+ public void testWithPolicy() {
+ try {
+ String repo = Constants.TESTING_PATH + "rampart_client_repo";
+
+ ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo, null);
+ ServiceClient serviceClient = new ServiceClient(configContext, null);
+ Options options = new Options();
+
+ serviceClient.engageModule(new QName("addressing"));
+ serviceClient.engageModule(new QName("rampart"));
+
+ for (int i = 1; i <= 1; i++) { //<-The number of tests we have
+ options.setTo(new EndpointReference("http://127.0.0.1:" + PORT + "/axis2/services/SecureService" + i));
+ options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, loadPolicy("test-resources/rampart/policy/" + i + ".xml"));
+ serviceClient.setOptions(options);
+
+ //Blocking invocation
+ serviceClient.sendReceive(getEchoElement());
+
+
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+
+ private OMElement getEchoElement() {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMNamespace omNs = fac.createOMNamespace(
+ "http://example1.org/example1", "example1");
+ OMElement method = fac.createOMElement("echo", omNs);
+ OMElement value = fac.createOMElement("Text", omNs);
+ value.addChild(fac.createOMText(value, "Testing Rampart with WS-SecPolicy"));
+ method.addChild(value);
+
+ return method;
+ }
+
+ private Policy loadPolicy(String xmlPath) throws Exception {
+ StAXOMBuilder builder = new StAXOMBuilder(xmlPath);
+ return PolicyEngine.getPolicy(builder.getDocumentElement());
+ }
+
+
+
+}
Added: webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/Service.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/Service.java?view=auto&rev=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/Service.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rampart/Service.java Sat Sep 23 11:22:36 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart;
+import org.apache.axiom.om.OMElement;
+
+public class Service {
+
+ public OMElement echo(OMElement elem) {
+ elem.build();
+ elem.detach();
+ System.out.println("Service invoked");
+ return elem;
+ }
+
+}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java?view=diff&rev=449283&r1=449282&r2=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/RampartReceiver.java Sat Sep 23 11:22:36 2006
@@ -68,10 +68,13 @@
Document doc = ((Element)msgContext.getEnvelope()).getOwnerDocument();
msgContext.setEnvelope(Axis2Util.getSOAPEnvelopeFromDOOMDocument(doc));
} catch (WSSecurityException e) {
+ e.printStackTrace();
throw new AxisFault(e);
} catch (WSSPolicyException e) {
+ e.printStackTrace();
throw new AxisFault(e);
} catch (RampartException e) {
+ e.printStackTrace();
throw new AxisFault(e);
} finally {
// Reset the document builder factory
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/RampartUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/RampartUtil.java?view=diff&rev=449283&r1=449282&r2=449283
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/RampartUtil.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/util/RampartUtil.java Sat Sep 23 11:22:36 2006
@@ -171,7 +171,7 @@
Properties prop = cryptoConfig.getProp();
return CryptoFactory.getInstance(provider, prop);
} else {
- throw new RampartException("missingEncryptionCrypto");
+ return null;
}
}
}
@@ -195,7 +195,7 @@
Properties prop = cryptoConfig.getProp();
return CryptoFactory.getInstance(provider, prop);
} else {
- throw new RampartException("missingSignatureCrypto");
+ return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org