You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by bi...@apache.org on 2020/04/15 16:08:54 UTC

[axis-axis2-java-rampart] branch RAMPART-426 created (now 8d31bd8)

This is an automated email from the ASF dual-hosted git repository.

billblough pushed a change to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git.


      at 8d31bd8  Merge latest changes from trunk.

This branch includes the following new commits:

     new a7aa3be  Create a development branch to work on the patch for RAMPART-426.
     new 48a0422  Apply the patch provided by Boris Dushanov for RAMPART-426.
     new 98737e4  Merge latest changes from trunk.
     new b55bc56  Merge latest changes from trunk.
     new ecaa028  Avoid unnecessary reordering of imports.
     new e84f18b  Merge latest changes from trunk.
     new 1632238  Remove extra null check from patch.
     new bccd0db  Some cleanup.
     new 338ac2b  Merge latest changes from trunk.
     new c3dd4a0  Merge latest changes from trunk.
     new 7516f46  Normalize whitespace.
     new a14e720  Merge latest changes from trunk.
     new 86c6db7  Replace tabs with spaces.
     new 8d31bd8  Merge latest changes from trunk.

The 14 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[axis-axis2-java-rampart] 11/14: Normalize whitespace.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 7516f46d132fc5e503ad068fd8670d34ced0483e
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 10:22:06 2017 +0000

    Normalize whitespace.
---
 .../src/test/resources/rampart/policy/36.xml       | 135 ++++++++++---------
 .../src/test/resources/rampart/policy/37.xml       | 135 ++++++++++---------
 .../src/test/resources/rampart/policy/38.xml       | 137 ++++++++++---------
 .../src/test/resources/rampart/policy/39.xml       | 135 ++++++++++---------
 .../src/test/resources/rampart/policy/40.xml       | 135 ++++++++++---------
 .../src/test/resources/rampart/policy/41.xml       | 133 ++++++++++---------
 .../src/test/resources/rampart/policy/42.xml       | 134 +++++++++----------
 ...part-asymm-binding-6-3des-r15-inbound-actor.xml | 143 ++++++++++----------
 ...m-binding-6-3des-r15-inbound-outbound-actor.xml | 145 ++++++++++-----------
 ...art-asymm-binding-6-3des-r15-outbound-actor.xml | 143 ++++++++++----------
 10 files changed, 680 insertions(+), 695 deletions(-)

diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/36.xml b/modules/rampart-integration/src/test/resources/rampart/policy/36.xml
index d1c239d..b2ea940 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/36.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/36.xml
@@ -1,70 +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:Basic128/>
-						</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:outboundActor>outboundActor</ramp:outboundActor>
-				
-				<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">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">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: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:Basic128/>
+                        </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:outboundActor>outboundActor</ramp:outboundActor>
+                <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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/37.xml b/modules/rampart-integration/src/test/resources/rampart/policy/37.xml
index fe5ac5a..5b67609 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/37.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/37.xml
@@ -1,70 +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:Basic128/>
-						</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:inboundActor>inboundActor</ramp:inboundActor>
-				
-				<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">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">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: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:Basic128/>
+                        </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:inboundActor>inboundActor</ramp:inboundActor>
+                <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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/38.xml b/modules/rampart-integration/src/test/resources/rampart/policy/38.xml
index f0172db..ed4e50a 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/38.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/38.xml
@@ -1,71 +1,70 @@
 <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:Basic128/>
-						</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:inboundActor>inboundActor</ramp:inboundActor>
-				<ramp:outboundActor>outboundActor</ramp:outboundActor>
-				
-				<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">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">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: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:Basic128/>
+                        </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:inboundActor>inboundActor</ramp:inboundActor>
+                <ramp:outboundActor>outboundActor</ramp:outboundActor>
+                <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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/39.xml b/modules/rampart-integration/src/test/resources/rampart/policy/39.xml
index add04f7..f3679a7 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/39.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/39.xml
@@ -1,70 +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:Basic128/>
-						</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:outboundActor>outboundActor</ramp:outboundActor>
-				
-				<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">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">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: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:Basic128/>
+                        </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:outboundActor>outboundActor</ramp:outboundActor>
+                <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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/40.xml b/modules/rampart-integration/src/test/resources/rampart/policy/40.xml
index 134e262..2b5ed1a 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/40.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/40.xml
@@ -1,70 +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:Basic128/>
-						</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:inboundActor>inboundActor</ramp:inboundActor>
-				
-				<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">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">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: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:Basic128/>
+                        </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:inboundActor>inboundActor</ramp:inboundActor>
+                <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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/41.xml b/modules/rampart-integration/src/test/resources/rampart/policy/41.xml
index 5947c58..975a0bb 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/41.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/41.xml
@@ -1,69 +1,68 @@
 <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:Basic128/>
-						</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">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">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: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:Basic128/>
+                        </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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/42.xml b/modules/rampart-integration/src/test/resources/rampart/policy/42.xml
index 5947c58..77a357f 100644
--- a/modules/rampart-integration/src/test/resources/rampart/policy/42.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/42.xml
@@ -1,69 +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:Basic128/>
-						</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">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">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: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:Basic128/>
+                        </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">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">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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml
index 424e170..8f2a8b7 100644
--- a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml
@@ -1,75 +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.TestCBHandler</ramp:passwordCallbackClass>
-			<ramp:inboundActor>myInboundActor</ramp:inboundActor>
-			
-			<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/keys/interop2.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/keys/interop2.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: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.TestCBHandler</ramp:passwordCallbackClass>
+                <ramp:inboundActor>myInboundActor</ramp:inboundActor>
+                <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/keys/interop2.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/keys/interop2.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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml
index 92102e2..b89561d 100644
--- a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml
@@ -1,76 +1,73 @@
 <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.TestCBHandler</ramp:passwordCallbackClass>
-			<ramp:inboundActor>myOutboundActor</ramp:inboundActor>
-			<ramp:outboundActor>myOutboundActor</ramp:outboundActor>
-			
-			<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/keys/interop2.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/keys/interop2.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: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.TestCBHandler</ramp:passwordCallbackClass>
+                <ramp:inboundActor>myOutboundActor</ramp:inboundActor>
+                <ramp:outboundActor>myOutboundActor</ramp:outboundActor>
+                <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/keys/interop2.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/keys/interop2.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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml
index 5858be2..315d874 100644
--- a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml
@@ -1,75 +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.TestCBHandler</ramp:passwordCallbackClass>
-			<ramp:outboundActor>myOutboundActor</ramp:outboundActor>
-			
-			<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/keys/interop2.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/keys/interop2.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: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.TestCBHandler</ramp:passwordCallbackClass>
+                <ramp:outboundActor>myOutboundActor</ramp:outboundActor>
+                <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/keys/interop2.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/keys/interop2.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>


[axis-axis2-java-rampart] 12/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit a14e7203a1566e011cb2791bd1606cc0b84d5fd4
Merge: 7516f46 d7fea53
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 10:45:09 2017 +0000

    Merge latest changes from trunk.

 .../java/org/apache/rampart/RampartEngineTest.java | 62 +++++++++++-----------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --cc modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
index 603dae1,77e54d7..05f14c9
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
@@@ -26,63 -26,42 +26,63 @@@ import org.apache.axis2.context.Message
  import org.apache.neethi.Policy;
  import org.apache.ws.security.WSConstants;
  import org.apache.ws.security.WSSecurityEngineResult;
+ import org.junit.Test;
+ import org.junit.runner.RunWith;
+ import org.junit.runners.JUnit4;
  
+ @RunWith(JUnit4.class)
  public class RampartEngineTest extends MessageBuilderTestBase {
- 
-     public RampartEngineTest(String name) {
-         super(name);
-     }
- 
+     /**
+      * Tests that Rampart complains about missing security header in request.
+      * 
+      * @throws Exception
+      */
+     @Test(expected=RampartException.class)
      public void testEmptySOAPMessage() throws Exception {
+         MessageContext ctx = getMsgCtx();
  
-         try {
-             MessageContext ctx = getMsgCtx();
+         String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml";
+         Policy policy = this.loadPolicy(policyXml);
  
-             String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml";
-             Policy policy = this.loadPolicy(policyXml);
- 
-             ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+         ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
  
-             RampartEngine engine = new RampartEngine();
-             engine.process(ctx);
-         }
-         catch (RampartException e) {
-             assertEquals("Expected rampart to complain about missing security header",
-                          "Missing wsse:Security header in request", e.getMessage());
-         }
+         RampartEngine engine = new RampartEngine();
+         engine.process(ctx);
      }
  
+     @Test
      public void testValidSOAPMessage() throws Exception {
-     	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
+         runRampartEngine(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
      }
  
+     @Test
      public void testValidSOAP12Message() throws Exception {
-         runValidRampartProcessing(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
+         runRampartEngine(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
      }
 -
 +    
++    @Test
 +    public void testValidSOAPMessageWithActor() throws Exception {
-     	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
++        runRampartEngine(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
 +    }
 +    
++    @Test
 +    public void testValidSOAP12MessageWithRole() throws Exception {
-     	runValidRampartProcessing(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
++        runRampartEngine(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
 +    }
 +    
++    @Test
 +    public void testMissingSOAPInboundActor() throws Exception {
-     	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml");
++        runRampartEngine(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml");
 +    }
 +    
++    // Failure is expected because no outbound actor is set.
++    @Test(expected=RampartException.class)
 +    public void testMissingSOAPOutboundActor() throws Exception {
-     	try{
-         	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml");
-         	fail("Failure is expected because no outbound actor is set.");
-     	}catch(RampartException e){
-     		assertNotNull(e);
-     	}
++        runRampartEngine(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml");
 +    }
 +    
-     private void runValidRampartProcessing(MessageContext ctx, String policyXmlPath) throws Exception{    	
-         Policy policy = loadPolicy(policyXmlPath);
+     private void runRampartEngine(MessageContext ctx, String policyXml) throws Exception {
+         Policy policy = loadPolicy(policyXml);
  
          ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
  


[axis-axis2-java-rampart] 13/14: Replace tabs with spaces.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 86c6db76f4b2e44162ad6757401b9cb6b4913336
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 18:32:21 2017 +0000

    Replace tabs with spaces.
---
 .../src/test/resources/rampart/services-36.xml                    | 6 +++---
 .../src/test/resources/rampart/services-37.xml                    | 6 +++---
 .../src/test/resources/rampart/services-38.xml                    | 8 ++++----
 .../src/test/resources/rampart/services-39.xml                    | 6 +++---
 .../src/test/resources/rampart/services-40.xml                    | 6 +++---
 .../src/test/resources/rampart/services-41.xml                    | 6 +++---
 .../src/test/resources/rampart/services-42.xml                    | 6 +++---
 7 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/modules/rampart-integration/src/test/resources/rampart/services-36.xml b/modules/rampart-integration/src/test/resources/rampart/services-36.xml
index 2e810e9..df20f39 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-36.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-36.xml
@@ -1,9 +1,9 @@
 <service name="SecureService36">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-37.xml b/modules/rampart-integration/src/test/resources/rampart/services-37.xml
index 042758c..3da8aae 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-37.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-37.xml
@@ -1,9 +1,9 @@
 <service name="SecureService37">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-38.xml b/modules/rampart-integration/src/test/resources/rampart/services-38.xml
index 5262628..dce607d 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-38.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-38.xml
@@ -1,9 +1,9 @@
 <service name="SecureService38">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
@@ -70,7 +70,7 @@
                     <ramp:encryptionUser>bob</ramp:encryptionUser>
                     <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
                     <ramp:inboundActor>outboundActor</ramp:inboundActor>
-					<ramp:outboundActor>inboundActor</ramp:outboundActor>
+                    <ramp:outboundActor>inboundActor</ramp:outboundActor>
 
                     <ramp:signatureCrypto>
                         <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-39.xml b/modules/rampart-integration/src/test/resources/rampart/services-39.xml
index 16eb59a..11eee7e 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-39.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-39.xml
@@ -1,9 +1,9 @@
 <service name="SecureService39">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-40.xml b/modules/rampart-integration/src/test/resources/rampart/services-40.xml
index 039d902..4a1b2de 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-40.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-40.xml
@@ -1,9 +1,9 @@
 <service name="SecureService40">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-41.xml b/modules/rampart-integration/src/test/resources/rampart/services-41.xml
index f1540db..fe76dbb 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-41.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-41.xml
@@ -1,9 +1,9 @@
 <service name="SecureService41">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-42.xml b/modules/rampart-integration/src/test/resources/rampart/services-42.xml
index 31d98ae..84dd441 100644
--- a/modules/rampart-integration/src/test/resources/rampart/services-42.xml
+++ b/modules/rampart-integration/src/test/resources/rampart/services-42.xml
@@ -1,9 +1,9 @@
 <service name="SecureService42">
 
-	<module ref="addressing"/>
-	<module ref="rampart"/>
+    <module ref="addressing"/>
+    <module ref="rampart"/>
 
-	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
 
     <operation name="echo">
         <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>


[axis-axis2-java-rampart] 08/14: Some cleanup.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit bccd0db570adb62fe8dc82099faa034abea50e98
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 01:03:30 2017 +0000

    Some cleanup.
---
 .../java/org/apache/rampart/RampartEngine.java     |  3 +-
 .../org/apache/rampart/RampartMessageData.java     | 27 +++----
 .../policy/builders/RampartConfigBuilder.java      |  8 +-
 .../apache/rampart/policy/model/RampartConfig.java | 88 +++++++++++-----------
 modules/rampart-integration/pom.xml                |  2 +-
 .../rampart/AsymmetricBindingBuilderTest.java      |  8 +-
 .../java/org/apache/rampart/RampartEngineTest.java | 16 ++--
 7 files changed, 74 insertions(+), 78 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index f4c17fa..131a7df 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@ -292,7 +292,7 @@ public class RampartEngine {
                 //get the sec context id from the req msg ctx 
 		
 		//Store username in MessageContext property
-		
+
         for (int j = 0; j < results.size(); j++) {
             WSSecurityEngineResult wser = (WSSecurityEngineResult) results.get(j);
             final Integer actInt =
@@ -378,7 +378,6 @@ public class RampartEngine {
 
         }
 
-
 		SOAPEnvelope env = Axis2Util.getSOAPEnvelopeFromDOMDocument(rmd.getDocument(), true);
 
 		if(dotDebug){
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
index af4be4d..b061ff6 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
@@ -16,10 +16,6 @@
 
 package org.apache.rampart;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
@@ -64,6 +60,10 @@ import org.apache.ws.security.util.Loader;
 import org.apache.ws.security.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 public class RampartMessageData {
     
     /**
@@ -374,17 +374,14 @@ public class RampartMessageData {
             
             // set 'actor' of the WSSecHeader with the value from the rampart config 
             if (this.sender && this.policyData != null) {
-            	
-            	this.secHeader = new WSSecHeader();
-            	
-            	RampartConfig rampartConfig = this.policyData.getRampartConfig();
-            	if(null != rampartConfig){
-            		String actor = rampartConfig.getOutboundActor();
-            		if(null != actor){
-            			this.secHeader = new WSSecHeader(actor,true);
-            		}
-            	}
-                
+                this.secHeader = new WSSecHeader();
+                RampartConfig rampartConfig = this.policyData.getRampartConfig();
+                if(null != rampartConfig){
+                    String actor = rampartConfig.getOutboundActor();
+                    if(null != actor){
+                        this.secHeader = new WSSecHeader(actor,true);
+                    }
+                }
                 secHeader.insertSecurityHeader(this.document);
             }
             
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java b/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
index 0a74551..a308972 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
@@ -49,15 +49,15 @@ public class RampartConfigBuilder implements AssertionBuilder<OMElement> {
         }
                 
         childElement = element.getFirstChildWithName(new QName(RampartConfig.NS,
-        		RampartConfig.INBOUND_ACTOR_LN));
+                RampartConfig.INBOUND_ACTOR_LN));
         if (childElement != null) {
-        	rampartConfig.setInboundActor(childElement.getText().trim());
+            rampartConfig.setInboundActor(childElement.getText().trim());
         }
         
         childElement = element.getFirstChildWithName(new QName(RampartConfig.NS,
-        		RampartConfig.OUTBOUND_ACTOR_LN));
+                RampartConfig.OUTBOUND_ACTOR_LN));
         if (childElement != null) {
-        	rampartConfig.setOutboundActor(childElement.getText().trim());
+            rampartConfig.setOutboundActor(childElement.getText().trim());
         }
 
         childElement = element.getFirstChildWithName(new QName(
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java b/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
index 9bfcd2f..8657c47 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
@@ -159,7 +159,7 @@ public class RampartConfig implements Assertion {
     private String nonceLifeTime = Integer.toString(DEFAULT_NONCE_LIFE_TIME);
     
     private SSLConfig sslConfig;
-
+    
     private KerberosConfig kerberosConfig;
     
     private String inboundActor;
@@ -322,15 +322,15 @@ public class RampartConfig implements Assertion {
         }
         
         if (getInboundActor() != null) {
-        	writer.writeStartElement(NS, INBOUND_ACTOR_LN);
-        	writer.writeCharacters(getInboundActor());
-        	writer.writeEndElement();
+            writer.writeStartElement(NS, INBOUND_ACTOR_LN);
+            writer.writeCharacters(getInboundActor());
+            writer.writeEndElement();
         }
         
         if (getOutboundActor() != null) {
-        	writer.writeStartElement(NS, OUTBOUND_ACTOR_LN);
-        	writer.writeCharacters(getOutboundActor());
-        	writer.writeEndElement();
+            writer.writeStartElement(NS, OUTBOUND_ACTOR_LN);
+            writer.writeCharacters(getOutboundActor());
+            writer.writeEndElement();
         }
         
         if (getUserCertAlias() != null) {
@@ -528,42 +528,42 @@ public class RampartConfig implements Assertion {
         this.timeStampStrict = Boolean.valueOf(timeStampStrict);
     }
     
-	/**	  
-	 * @return the inbound actor's URI
-	 * 
-	 */
-	public String getInboundActor() {
-		return inboundActor;
-	}
-
-	/**
-	 * Sets the SOAP 1.1 actor or SOAP 1.2 role identifying the incoming SOAP Security header to process.
-	 * If set, Rampart will expect a SOAP security header with a matching actor/role and fail if
-	 * such is not available in the request. If not set (<code>null</code>), Rampart will process the first
-	 * SOAP security header found.
-	 *  
-	 * @param the inbound actor URI to set
-	 */
-	public void setInboundActor(String inboundActorUri) {
-		this.inboundActor = inboundActorUri;
-	}	
-	
-	/**	  
-	 * @return the outbound actor's URI
-	 * 
-	 */
-	public String getOutboundActor() {
-		return outboundActor;
-	}
-
-	/**	
-	 * Sets the SOAP 1.1 actor or SOAP 1.2 role to set in the outgoing SOAP Security header.
-	 * If not set (<code>null</code>), no SOAP actor/role attribute will be set in the SOAP security header.
- 
-	 * @param the outbound actor URI to set
-	 */
-	public void setOutboundActor(String outboundActorUri) {
-		this.outboundActor = outboundActorUri;
-	}
+    /**
+     * @return the inbound actor's URI
+     * 
+     */
+    public String getInboundActor() {
+        return inboundActor;
+    }
+
+    /**
+     * Sets the SOAP 1.1 actor or SOAP 1.2 role identifying the incoming SOAP Security header to process.
+     * If set, Rampart will expect a SOAP security header with a matching actor/role and fail if
+     * such is not available in the request. If not set (<code>null</code>), Rampart will process the first
+     * SOAP security header found.
+     *  
+     * @param the inbound actor URI to set
+     */
+    public void setInboundActor(String inboundActorUri) {
+        this.inboundActor = inboundActorUri;
+    }
+    
+    /**
+     * @return the outbound actor's URI
+     * 
+     */
+    public String getOutboundActor() {
+        return outboundActor;
+    }
+
+    /**
+     * Sets the SOAP 1.1 actor or SOAP 1.2 role to set in the outgoing SOAP Security header.
+     * If not set (<code>null</code>), no SOAP actor/role attribute will be set in the SOAP security header.
+     *
+     * @param the outbound actor URI to set
+     */
+    public void setOutboundActor(String outboundActorUri) {
+        this.outboundActor = outboundActorUri;
+    }
     
 }
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 6dc1442..8cc6fe5 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -289,7 +289,7 @@
                                 <copy overwrite="yes" file="src/test/resources/rampart/services-37.xml" tofile="target/temp-ramp/META-INF/services.xml" />
                                 <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService37.aar" basedir="target/temp-ramp" />
 
-								<!-- Service 38 -->
+                                <!-- Service 38 -->
                                 <copy overwrite="yes" file="src/test/resources/rampart/services-38.xml" tofile="target/temp-ramp/META-INF/services.xml" />
                                 <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService38.aar" basedir="target/temp-ramp" />
                                 
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java b/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
index eb7b37c..4171470 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
@@ -16,16 +16,16 @@
 
 package org.apache.rampart;
 
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.context.MessageContext;
 import org.apache.neethi.Policy;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.conversation.ConversationConstants;
 
+import javax.xml.namespace.QName;
+
+import java.util.ArrayList;
+
 public class AsymmetricBindingBuilderTest extends MessageBuilderTestBase {
     
     public void testAsymmBinding() throws Exception {
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java b/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
index 2dad0af..b7ad8fb 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
@@ -80,14 +80,6 @@ public class RampartEngineTest extends MessageBuilderTestBase {
     		assertNotNull(e);
     	}
     }
-
-    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
-        SOAPBuilder soapBuilder = new SOAPBuilder();
-        SOAPEnvelope env = ctx.getEnvelope();
-        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
-        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
-        ctx.setEnvelope(env);
-    }
     
     private void runValidRampartProcessing(MessageContext ctx, String policyXmlPath) throws Exception{    	
         Policy policy = loadPolicy(policyXmlPath);
@@ -121,4 +113,12 @@ public class RampartEngineTest extends MessageBuilderTestBase {
         }
         assertNotNull("Result of processing did not include a certificate", usedCert);
     }
+
+    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
+        SOAPBuilder soapBuilder = new SOAPBuilder();
+        SOAPEnvelope env = ctx.getEnvelope();
+        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
+        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
+        ctx.setEnvelope(env);
+    }
 }


[axis-axis2-java-rampart] 07/14: Remove extra null check from patch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 1632238ae5ca7cd9b751d5ad02103626e44394d7
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 28 23:52:27 2017 +0000

    Remove extra null check from patch.
---
 .../java/org/apache/rampart/RampartEngine.java     | 170 ++++++++++-----------
 1 file changed, 84 insertions(+), 86 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index e43f2b6..f4c17fa 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@ -293,92 +293,90 @@ public class RampartEngine {
 		
 		//Store username in MessageContext property
 		
-		if(null != results){
-	        for (int j = 0; j < results.size(); j++) {
-	            WSSecurityEngineResult wser = (WSSecurityEngineResult) results.get(j);
-	            final Integer actInt =
-	                    (Integer) wser.get(WSSecurityEngineResult.TAG_ACTION);
-	            if (WSConstants.ST_UNSIGNED == actInt.intValue()) {
-
-	                Object samlAssertion = wser.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
-
-	                SAMLAssertionHandler samlAssertionHandler
-	                        = SAMLAssertionHandlerFactory.createAssertionHandler(samlAssertion);
-
-	                if (samlAssertionHandler.isBearerAssertion()) {
-	                    break;
-	                }
-	                //Store the token
-	                try {
-	                    TokenStorage store = rmd.getTokenStorage();
-	                    if (store.getToken(samlAssertionHandler.getAssertionId()) == null) {
-	                        Token token = new Token(samlAssertionHandler.getAssertionId(),
-	                                samlAssertionHandler.getAssertionElement(),
-	                                samlAssertionHandler.getDateNotBefore(),
-	                                samlAssertionHandler.getDateNotOnOrAfter());
-
-	                        token.setSecret(samlAssertionHandler.
-	                                getAssertionKeyInfoSecret(signatureCrypto, tokenCallbackHandler));
-	                        store.add(token);
-	                    }
-	                } catch (Exception e) {
-	                    throw new RampartException(
-	                            "errorInAddingTokenIntoStore", e);
-	                }
-	            } else if (WSConstants.UT == actInt) {
-
-			        WSUsernameTokenPrincipal userNameTokenPrincipal = (WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
-
-	                String username = userNameTokenPrincipal.getName();
-	                msgCtx.setProperty(RampartMessageData.USERNAME, username);
-	                
-	                if (userNameTokenPrincipal.getNonce() != null) {
-	                    // Check whether this is a replay attack. To verify that we need to check whether nonce value
-	                    // is a repeating one
-	                    int nonceLifeTimeInSeconds = 0;
-
-	                    if (rpd.getRampartConfig() != null) {
-	                        
-	                        String stringLifeTime = rpd.getRampartConfig().getNonceLifeTime();
-
-	                        try {
-	                            nonceLifeTimeInSeconds = Integer.parseInt(stringLifeTime);
-
-	                        } catch (NumberFormatException e) {
-	                            log.error("Invalid value for nonceLifeTime in rampart configuration file.", e);
-	                            throw new RampartException(
-	                                        "invalidNonceLifeTime", e);
-
-	                        }
-	                    }
-
-	                    String serviceEndpointName = msgCtx.getAxisService().getEndpointName();
-
-	                    boolean valueRepeating = serviceNonceCache.isNonceRepeatingForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce());
-
-	                    if (valueRepeating){
-	                        throw new RampartException("repeatingNonceValue", new Object[]{ userNameTokenPrincipal.getNonce(), username} );
-	                    }
-
-	                    serviceNonceCache.addNonceForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce(), nonceLifeTimeInSeconds);
-	                }
-	            } else if (WSConstants.SIGN == actInt) {
-	                X509Certificate cert = (X509Certificate) wser.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-
-	                if (rpd.isAsymmetricBinding() && cert == null && rpd.getInitiatorToken() != null
-	                        && !rpd.getInitiatorToken().isDerivedKeys()) {
-
-	                    // If symmetric binding is used, the certificate should be null.
-	                    // If certificate is not null then probably initiator and
-	                    // recipient are using 2 different bindings.
-	                    throw new RampartException("invalidSignatureAlgo");
-	                }
-
-	                msgCtx.setProperty(RampartMessageData.X509_CERT, cert);
-	            }
-
-	        }
-		}
+        for (int j = 0; j < results.size(); j++) {
+            WSSecurityEngineResult wser = (WSSecurityEngineResult) results.get(j);
+            final Integer actInt =
+                    (Integer) wser.get(WSSecurityEngineResult.TAG_ACTION);
+            if (WSConstants.ST_UNSIGNED == actInt.intValue()) {
+
+                Object samlAssertion = wser.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+
+                SAMLAssertionHandler samlAssertionHandler
+                        = SAMLAssertionHandlerFactory.createAssertionHandler(samlAssertion);
+
+                if (samlAssertionHandler.isBearerAssertion()) {
+                    break;
+                }
+                //Store the token
+                try {
+                    TokenStorage store = rmd.getTokenStorage();
+                    if (store.getToken(samlAssertionHandler.getAssertionId()) == null) {
+                        Token token = new Token(samlAssertionHandler.getAssertionId(),
+                                samlAssertionHandler.getAssertionElement(),
+                                samlAssertionHandler.getDateNotBefore(),
+                                samlAssertionHandler.getDateNotOnOrAfter());
+
+                        token.setSecret(samlAssertionHandler.
+                                getAssertionKeyInfoSecret(signatureCrypto, tokenCallbackHandler));
+                        store.add(token);
+                    }
+                } catch (Exception e) {
+                    throw new RampartException(
+                            "errorInAddingTokenIntoStore", e);
+                }
+            } else if (WSConstants.UT == actInt) {
+
+		        WSUsernameTokenPrincipal userNameTokenPrincipal = (WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
+
+                String username = userNameTokenPrincipal.getName();
+                msgCtx.setProperty(RampartMessageData.USERNAME, username);
+                
+                if (userNameTokenPrincipal.getNonce() != null) {
+                    // Check whether this is a replay attack. To verify that we need to check whether nonce value
+                    // is a repeating one
+                    int nonceLifeTimeInSeconds = 0;
+
+                    if (rpd.getRampartConfig() != null) {
+                        
+                        String stringLifeTime = rpd.getRampartConfig().getNonceLifeTime();
+
+                        try {
+                            nonceLifeTimeInSeconds = Integer.parseInt(stringLifeTime);
+
+                        } catch (NumberFormatException e) {
+                            log.error("Invalid value for nonceLifeTime in rampart configuration file.", e);
+                            throw new RampartException(
+                                        "invalidNonceLifeTime", e);
+
+                        }
+                    }
+
+                    String serviceEndpointName = msgCtx.getAxisService().getEndpointName();
+
+                    boolean valueRepeating = serviceNonceCache.isNonceRepeatingForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce());
+
+                    if (valueRepeating){
+                        throw new RampartException("repeatingNonceValue", new Object[]{ userNameTokenPrincipal.getNonce(), username} );
+                    }
+
+                    serviceNonceCache.addNonceForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce(), nonceLifeTimeInSeconds);
+                }
+            } else if (WSConstants.SIGN == actInt) {
+                X509Certificate cert = (X509Certificate) wser.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
+
+                if (rpd.isAsymmetricBinding() && cert == null && rpd.getInitiatorToken() != null
+                        && !rpd.getInitiatorToken().isDerivedKeys()) {
+
+                    // If symmetric binding is used, the certificate should be null.
+                    // If certificate is not null then probably initiator and
+                    // recipient are using 2 different bindings.
+                    throw new RampartException("invalidSignatureAlgo");
+                }
+
+                msgCtx.setProperty(RampartMessageData.X509_CERT, cert);
+            }
+
+        }
 
 
 		SOAPEnvelope env = Axis2Util.getSOAPEnvelopeFromDOMDocument(rmd.getDocument(), true);


[axis-axis2-java-rampart] 14/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 8d31bd875af9e799ff93b902cccb3c196f622457
Merge: 86c6db7 fc03dfe
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 18:40:26 2017 +0000

    Merge latest changes from trunk.

 .../src/main/java/org/apache/rampart/RampartEngine.java        |  7 +------
 .../src/main/java/org/apache/rahas/STSMessageReceiver.java     | 10 +++-------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --cc modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index 0c302ac,a4d612b..1b6fa29
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@@ -234,21 -234,7 +234,16 @@@ public class RampartEngine 
  		    }
  		}
  		
 -		String actorValue = secHeader.getRole();
 +		// get the configured 'actor' value and if it is NOT set
 +		// then fallback to the one in the security header
 +		String actorValue = null;
 +		if(null != rampartConfig){
 +			actorValue = rampartConfig.getInboundActor();
 +		}
 +		
 +		if(null == actorValue){
- 		    String actorAttribute = WSConstants.ATTR_ACTOR;
- 		    if (WSConstants.URI_SOAP12_ENV.equals(rmd.getSoapConstants().getEnvelopeURI())) {
- 		        actorAttribute = WSConstants.ATTR_ROLE;
- 		    }
- 			
- 		    actorValue = secHeader.getAttributeValue(new QName(rmd.getSoapConstants().getEnvelopeURI(), actorAttribute));
++		    actorValue = secHeader.getRole();
 +		}
  
  		Crypto signatureCrypto = RampartUtil.getSignatureCrypto(rpd.getRampartConfig(), 
          		msgCtx.getAxisService().getClassLoader());


[axis-axis2-java-rampart] 10/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit c3dd4a056fd5c64bad8375ff3891e0fdffeac6a6
Merge: 338ac2b e3fd292
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 10:13:59 2017 +0000

    Merge latest changes from trunk.

 .../java/org/apache/rampart/MessageBuilderTestBase.java    | 14 --------------
 .../test/java/org/apache/rampart/RampartEngineTest.java    |  2 +-
 2 files changed, 1 insertion(+), 15 deletions(-)



[axis-axis2-java-rampart] 03/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 98737e4b2ee72441decd37a48bac58ab495db8a7
Merge: 48a0422 4b70d3b
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 28 16:09:03 2017 +0000

    Merge latest changes from trunk.

 modules/rampart-integration/pom.xml                |  90 +-----
 .../org/apache/axis2/integration/JettyServer.java  | 328 +++++++++++----------
 .../apache/axis2/integration/TestConstants.java    |  25 ++
 .../src/main/java/org/apache/rahas/TestClient.java |  29 +-
 .../rahas/RahasSAML2TokenCertForHoKTest.java       |   6 +-
 .../java/org/apache/rahas/RahasSAML2TokenTest.java |  10 +-
 .../rahas/RahasSAML2TokenUTForBearerTest.java      |   9 +-
 .../apache/rahas/RahasSAMLTokenAttributeTest.java  |   7 +-
 .../apache/rahas/RahasSAMLTokenCertForHoKTest.java |   8 +-
 .../rahas/RahasSAMLTokenCertForHoKV1205Test.java   |   8 +-
 .../java/org/apache/rahas/RahasSAMLTokenTest.java  |  11 +-
 .../rahas/RahasSAMLTokenUTForBearerTest.java       |   9 +-
 .../rahas/RahasSAMLTokenUTForBearerV1205Test.java  |  10 +-
 .../apache/rahas/RahasSAMLTokenUTForHoKTest.java   |   7 +-
 .../rahas/RahasSAMLTokenUTForHoKV1205Test.java     |   9 +-
 .../org/apache/rahas/RahasSAMLTokenV1205Test.java  |  10 +-
 .../test/java/org/apache/rampart/RampartTest.java  |  93 ++----
 17 files changed, 275 insertions(+), 394 deletions(-)

diff --cc modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
index 923595a,064d197..e0aec1d
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
@@@ -16,12 -16,10 +16,11 @@@
  
  package org.apache.rampart;
  
- import static org.apache.axis2.integration.JettyServer.getHttpPort;
- import static org.apache.axis2.integration.JettyServer.getHttpsPort;
- import static org.apache.axis2.integration.JettyServer.CLIENT_KEYSTORE;
- import static org.apache.axis2.integration.JettyServer.KEYSTORE_PASSWORD;
+ import static org.apache.axis2.integration.TestConstants.TESTING_PATH;
+ import static org.junit.Assert.assertEquals;
++import static org.junit.Assert.assertNotNull;
+ import static org.junit.Assert.fail;
  
- import junit.framework.TestCase;
  import org.apache.axiom.om.OMAbstractFactory;
  import org.apache.axiom.om.OMElement;
  import org.apache.axiom.om.OMFactory;


[axis-axis2-java-rampart] 04/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit b55bc5683c925beb3a8c9642c638c78da3462cea
Merge: 98737e4 9d3edc5
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 28 18:26:39 2017 +0000

    Merge latest changes from trunk.

 modules/rampart-integration/pom.xml                |  15 --
 .../org/apache/axis2/integration/JettyServer.java  | 297 ---------------------
 .../src/main/java/org/apache/rahas/TestClient.java |  42 +--
 .../test/java/org/apache/rampart/RampartTest.java  |  72 +++--
 pom.xml                                            |   2 -
 5 files changed, 37 insertions(+), 391 deletions(-)



[axis-axis2-java-rampart] 05/14: Avoid unnecessary reordering of imports.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit ecaa0286045620b7ab770d2e9b8255cb78fc3e19
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 28 23:29:44 2017 +0000

    Avoid unnecessary reordering of imports.
---
 .../main/java/org/apache/rampart/RampartEngine.java    | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index 8e73be1..f9dbbe7 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@ -16,15 +16,6 @@
 
 package org.apache.rampart;
 
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import javax.xml.namespace.QName;
-
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPHeader;
@@ -50,6 +41,15 @@ import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.WSUsernameTokenPrincipal;
 import org.apache.ws.security.components.crypto.Crypto;
 
+import javax.xml.namespace.QName;
+
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
 public class RampartEngine {
 
 	private static Log log = LogFactory.getLog(RampartEngine.class);


[axis-axis2-java-rampart] 09/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 338ac2be10e0b670efa2fe1ac341f17e5d8f0510
Merge: bccd0db 5b46f7c
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Jan 29 01:16:46 2017 +0000

    Merge latest changes from trunk.

 .../java/org/apache/rampart/RampartEngine.java     | 127 +++++++++++----------
 1 file changed, 64 insertions(+), 63 deletions(-)



[axis-axis2-java-rampart] 01/14: Create a development branch to work on the patch for RAMPART-426.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit a7aa3be6aff82bfac54e7f1258a64428463211db
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 14 14:23:43 2017 +0000

    Create a development branch to work on the patch for RAMPART-426.


[axis-axis2-java-rampart] 06/14: Merge latest changes from trunk.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit e84f18b4b9f17dc746bb895776cf1919becd463e
Merge: ecaa028 c145a4c
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 28 23:39:27 2017 +0000

    Merge latest changes from trunk.

 modules/rampart-core/pom.xml                       |   5 +
 .../java/org/apache/rampart/RampartEngine.java     |  96 +++++-
 .../org/apache/rampart/builder/BindingBuilder.java |  98 +++++-
 .../rampart/builder/TransportBindingBuilder.java   |  80 +++++
 .../policy/builders/KerberosConfigBuilder.java     | 100 ++++++
 .../policy/builders/RampartConfigBuilder.java      |  11 +
 .../rampart/policy/model/KerberosConfig.java       | 361 +++++++++++++++++++++
 .../apache/rampart/policy/model/RampartConfig.java |  18 +
 .../java/org/apache/rampart/util/RampartUtil.java  |  61 ++++
 .../org.apache.neethi.builders.AssertionBuilder    |   3 +-
 .../resources/org/apache/rampart/errors.properties |   8 +
 .../policy/builders/KerberosConfigBuilderTest.java | 121 +++++++
 .../rampart/policy/builders/kerberosConfig.policy  |  22 ++
 modules/rampart-integration/pom.xml                |  90 ++++-
 .../apache/rampart/KerberosDelegationService.java  |  78 +++++
 .../KerberosDelegationServiceValidator.java        |  46 +++
 .../org/apache/rampart/RampartKerberosTest.java    | 296 +++++++++++++++++
 .../org/apache/rampart/util/KerberosServer.java    | 207 ++++++++++++
 .../rampart/util/KerberosTokenDecoderImpl.java     | 156 +++++++++
 .../src/test/resources/kerberos/alice.keytab       | Bin 0 -> 666 bytes
 .../src/test/resources/kerberos/bob.keytab         | Bin 0 -> 328 bytes
 .../src/test/resources/kerberos/jaas.conf          |  49 +++
 .../src/test/resources/kerberos/krb5.conf.template |   8 +
 .../src/test/resources/kerberos/readme             |   9 +
 .../src/test/resources/kerberos/users.ldif         |  60 ++++
 .../rampart/kerberos/KerberosDelegation.xml        |  86 +++++
 .../kerberos/KerberosOverTransportKeytab.xml       |  85 +++++
 .../rampart/kerberos/KerberosOverTransportPWCB.xml |  88 +++++
 modules/rampart-policy/pom.xml                     |  10 +
 .../java/org/apache/ws/secpolicy/Constants.java    |   4 +
 .../org/apache/ws/secpolicy/SP11Constants.java     |   9 +
 .../org/apache/ws/secpolicy/SP12Constants.java     |   9 +
 .../java/org/apache/ws/secpolicy/SPConstants.java  |   5 +-
 .../apache/ws/secpolicy/model/KerberosToken.java   | 152 +++++++++
 .../secpolicy11/builders/KerberosTokenBuilder.java |  84 +++++
 .../secpolicy12/builders/KerberosTokenBuilder.java |  84 +++++
 .../org.apache.neethi.builders.AssertionBuilder    |   4 +-
 .../apache/ws/secpolicy/KerberosPolicyTest.java    | 212 ++++++++++++
 .../src/test/resources/policy/kerberos-11.xml      |  16 +
 .../src/test/resources/policy/kerberos-12.xml      |  16 +
 .../src/test/resources/policy/kerberos-gss-11.xml  |  16 +
 .../src/test/resources/policy/kerberos-gss-12.xml  |  16 +
 .../resources/policy/kerberos-gss-keyref-11.xml    |  18 +
 .../resources/policy/kerberos-gss-keyref-12.xml    |  17 +
 .../test/resources/policy/kerberos-keyref-11.xml   |  17 +
 .../test/resources/policy/kerberos-keyref-12.xml   |  17 +
 pom.xml                                            |   9 +
 47 files changed, 2946 insertions(+), 11 deletions(-)

diff --cc modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index f9dbbe7,66b5648..e43f2b6
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@@ -27,28 -27,28 +27,39 @@@ import org.apache.commons.logging.LogFa
  import org.apache.rahas.Token;
  import org.apache.rahas.TokenStorage;
  import org.apache.rampart.policy.RampartPolicyData;
++import org.apache.rampart.policy.model.KerberosConfig;
 +import org.apache.rampart.policy.model.RampartConfig;
  import org.apache.rampart.saml.SAMLAssertionHandler;
  import org.apache.rampart.saml.SAMLAssertionHandlerFactory;
  import org.apache.rampart.util.Axis2Util;
  import org.apache.rampart.util.RampartUtil;
 -import org.apache.rampart.policy.model.KerberosConfig;
 -import org.apache.rampart.policy.model.RampartConfig;
  import org.apache.ws.secpolicy.WSSPolicyException;
 -import org.apache.ws.secpolicy.model.UsernameToken;
+ import org.apache.ws.secpolicy.model.KerberosToken;
+ import org.apache.ws.secpolicy.model.SupportingToken;
 -import org.apache.ws.security.*;
 +import org.apache.ws.secpolicy.model.UsernameToken;
++import org.apache.ws.security.NamePasswordCallbackHandler;
 +import org.apache.ws.security.WSConstants;
++import org.apache.ws.security.WSPasswordCallback;
++import org.apache.ws.security.WSSConfig;
 +import org.apache.ws.security.WSSecurityEngine;
 +import org.apache.ws.security.WSSecurityEngineResult;
 +import org.apache.ws.security.WSSecurityException;
 +import org.apache.ws.security.WSUsernameTokenPrincipal;
  import org.apache.ws.security.components.crypto.Crypto;
+ import org.apache.ws.security.validate.KerberosTokenDecoder;
+ import org.apache.ws.security.validate.KerberosTokenValidator;
  
+ import javax.security.auth.callback.CallbackHandler;
+ import javax.security.auth.callback.UnsupportedCallbackException;
  import javax.xml.namespace.QName;
  
+ import java.io.IOException;
  import java.security.cert.X509Certificate;
 -import java.util.*;
 +import java.util.ArrayList;
 +import java.util.Collection;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Vector;
  
  public class RampartEngine {
  
@@@ -141,22 -223,8 +234,21 @@@
  		    }
  		}
  		
 -		String actorValue = secHeader.getAttributeValue(new QName(rmd
 -				.getSoapConstants().getEnvelopeURI(), "actor"));
 +		// get the configured 'actor' value and if it is NOT set
 +		// then fallback to the one in the security header
 +		String actorValue = null;
- 		RampartConfig rampartConfig = rpd.getRampartConfig();
 +		if(null != rampartConfig){
 +			actorValue = rampartConfig.getInboundActor();
 +		}
 +		
 +		if(null == actorValue){
 +		    String actorAttribute = WSConstants.ATTR_ACTOR;
 +		    if (WSConstants.URI_SOAP12_ENV.equals(rmd.getSoapConstants().getEnvelopeURI())) {
 +		        actorAttribute = WSConstants.ATTR_ROLE;
 +		    }
 +			
 +		    actorValue = secHeader.getAttributeValue(new QName(rmd.getSoapConstants().getEnvelopeURI(), actorAttribute));
 +		}
  
  		Crypto signatureCrypto = RampartUtil.getSignatureCrypto(rpd.getRampartConfig(), 
          		msgCtx.getAxisService().getClassLoader());
diff --cc modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
index a539641,bdad069..9bfcd2f
--- a/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
@@@ -157,10 -152,17 +159,20 @@@ public class RampartConfig implements A
      private String nonceLifeTime = Integer.toString(DEFAULT_NONCE_LIFE_TIME);
      
      private SSLConfig sslConfig;
 -    
++
+     private KerberosConfig kerberosConfig;
      
 +    private String inboundActor;
 +    private String outboundActor;
++    
+     public KerberosConfig getKerberosConfig() {
+         return kerberosConfig;
+     }
  
+     public void setKerberosConfig(KerberosConfig kerberosConfig) {
+         this.kerberosConfig = kerberosConfig;
+     }
+     
      /*To set timeStampStrict in WSSConfig through rampartConfig - default value is false*/
      private boolean timeStampStrict = false;
      


[axis-axis2-java-rampart] 02/14: Apply the patch provided by Boris Dushanov for RAMPART-426.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch RAMPART-426
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 48a0422d73e8b5706d5c8798e64a3db1d16b9fac
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Jan 14 14:24:52 2017 +0000

    Apply the patch provided by Boris Dushanov for RAMPART-426.
---
 .../java/org/apache/rampart/RampartEngine.java     | 209 ++++++++++++---------
 .../org/apache/rampart/RampartMessageData.java     |  23 ++-
 .../policy/builders/RampartConfigBuilder.java      |  12 ++
 .../apache/rampart/policy/model/RampartConfig.java |  60 ++++++
 modules/rampart-integration/pom.xml                |  27 +++
 .../test/java/org/apache/rampart/RampartTest.java  |   6 +-
 .../src/test/resources/rampart/policy/36.xml       |  70 +++++++
 .../src/test/resources/rampart/policy/37.xml       |  70 +++++++
 .../src/test/resources/rampart/policy/38.xml       |  71 +++++++
 .../src/test/resources/rampart/policy/39.xml       |  70 +++++++
 .../src/test/resources/rampart/policy/40.xml       |  70 +++++++
 .../src/test/resources/rampart/policy/41.xml       |  69 +++++++
 .../src/test/resources/rampart/policy/42.xml       |  69 +++++++
 .../src/test/resources/rampart/services-36.xml     |  87 +++++++++
 .../src/test/resources/rampart/services-37.xml     |  87 +++++++++
 .../src/test/resources/rampart/services-38.xml     |  89 +++++++++
 .../src/test/resources/rampart/services-39.xml     |  88 +++++++++
 .../src/test/resources/rampart/services-40.xml     |  88 +++++++++
 .../src/test/resources/rampart/services-41.xml     |  88 +++++++++
 .../src/test/resources/rampart/services-42.xml     |  88 +++++++++
 .../rampart/AsymmetricBindingBuilderTest.java      |  59 +++++-
 .../org/apache/rampart/MessageBuilderTestBase.java |   2 +-
 .../java/org/apache/rampart/RampartEngineTest.java |  80 ++++----
 .../rampart/policy/model/RampartPolicyTest.java    |   3 +
 ...part-asymm-binding-6-3des-r15-inbound-actor.xml |  75 ++++++++
 ...m-binding-6-3des-r15-inbound-outbound-actor.xml |  76 ++++++++
 ...art-asymm-binding-6-3des-r15-outbound-actor.xml |  75 ++++++++
 .../test-resources/policy/rampart-policy-1.xml     |   2 +
 .../test-resources/policy/soapmessage12.xml        |  57 ++++++
 29 files changed, 1720 insertions(+), 150 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
index dda31b0..8e73be1 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartEngine.java
@@ -16,6 +16,15 @@
 
 package org.apache.rampart;
 
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axiom.soap.SOAPHeader;
@@ -27,19 +36,20 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.rahas.Token;
 import org.apache.rahas.TokenStorage;
 import org.apache.rampart.policy.RampartPolicyData;
+import org.apache.rampart.policy.model.RampartConfig;
 import org.apache.rampart.saml.SAMLAssertionHandler;
 import org.apache.rampart.saml.SAMLAssertionHandlerFactory;
 import org.apache.rampart.util.Axis2Util;
 import org.apache.rampart.util.RampartUtil;
 import org.apache.ws.secpolicy.WSSPolicyException;
 import org.apache.ws.secpolicy.model.UsernameToken;
-import org.apache.ws.security.*;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityEngine;
+import org.apache.ws.security.WSSecurityEngineResult;
+import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.WSUsernameTokenPrincipal;
 import org.apache.ws.security.components.crypto.Crypto;
 
-import javax.xml.namespace.QName;
-import java.security.cert.X509Certificate;
-import java.util.*;
-
 public class RampartEngine {
 
 	private static Log log = LogFactory.getLog(RampartEngine.class);
@@ -131,8 +141,22 @@ public class RampartEngine {
 		    }
 		}
 		
-		String actorValue = secHeader.getAttributeValue(new QName(rmd
-				.getSoapConstants().getEnvelopeURI(), "actor"));
+		// get the configured 'actor' value and if it is NOT set
+		// then fallback to the one in the security header
+		String actorValue = null;
+		RampartConfig rampartConfig = rpd.getRampartConfig();
+		if(null != rampartConfig){
+			actorValue = rampartConfig.getInboundActor();
+		}
+		
+		if(null == actorValue){
+		    String actorAttribute = WSConstants.ATTR_ACTOR;
+		    if (WSConstants.URI_SOAP12_ENV.equals(rmd.getSoapConstants().getEnvelopeURI())) {
+		        actorAttribute = WSConstants.ATTR_ROLE;
+		    }
+			
+		    actorValue = secHeader.getAttributeValue(new QName(rmd.getSoapConstants().getEnvelopeURI(), actorAttribute));
+		}
 
 		Crypto signatureCrypto = RampartUtil.getSignatureCrypto(rpd.getRampartConfig(), 
         		msgCtx.getAxisService().getClassLoader());
@@ -176,91 +200,94 @@ public class RampartEngine {
                 //get the sec context id from the req msg ctx 
 		
 		//Store username in MessageContext property
+		
+		if(null != results){
+	        for (int j = 0; j < results.size(); j++) {
+	            WSSecurityEngineResult wser = (WSSecurityEngineResult) results.get(j);
+	            final Integer actInt =
+	                    (Integer) wser.get(WSSecurityEngineResult.TAG_ACTION);
+	            if (WSConstants.ST_UNSIGNED == actInt.intValue()) {
+
+	                Object samlAssertion = wser.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+
+	                SAMLAssertionHandler samlAssertionHandler
+	                        = SAMLAssertionHandlerFactory.createAssertionHandler(samlAssertion);
+
+	                if (samlAssertionHandler.isBearerAssertion()) {
+	                    break;
+	                }
+	                //Store the token
+	                try {
+	                    TokenStorage store = rmd.getTokenStorage();
+	                    if (store.getToken(samlAssertionHandler.getAssertionId()) == null) {
+	                        Token token = new Token(samlAssertionHandler.getAssertionId(),
+	                                samlAssertionHandler.getAssertionElement(),
+	                                samlAssertionHandler.getDateNotBefore(),
+	                                samlAssertionHandler.getDateNotOnOrAfter());
+
+	                        token.setSecret(samlAssertionHandler.
+	                                getAssertionKeyInfoSecret(signatureCrypto, tokenCallbackHandler));
+	                        store.add(token);
+	                    }
+	                } catch (Exception e) {
+	                    throw new RampartException(
+	                            "errorInAddingTokenIntoStore", e);
+	                }
+	            } else if (WSConstants.UT == actInt) {
+
+			        WSUsernameTokenPrincipal userNameTokenPrincipal = (WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
+
+	                String username = userNameTokenPrincipal.getName();
+	                msgCtx.setProperty(RampartMessageData.USERNAME, username);
+	                
+	                if (userNameTokenPrincipal.getNonce() != null) {
+	                    // Check whether this is a replay attack. To verify that we need to check whether nonce value
+	                    // is a repeating one
+	                    int nonceLifeTimeInSeconds = 0;
+
+	                    if (rpd.getRampartConfig() != null) {
+	                        
+	                        String stringLifeTime = rpd.getRampartConfig().getNonceLifeTime();
+
+	                        try {
+	                            nonceLifeTimeInSeconds = Integer.parseInt(stringLifeTime);
+
+	                        } catch (NumberFormatException e) {
+	                            log.error("Invalid value for nonceLifeTime in rampart configuration file.", e);
+	                            throw new RampartException(
+	                                        "invalidNonceLifeTime", e);
+
+	                        }
+	                    }
+
+	                    String serviceEndpointName = msgCtx.getAxisService().getEndpointName();
+
+	                    boolean valueRepeating = serviceNonceCache.isNonceRepeatingForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce());
+
+	                    if (valueRepeating){
+	                        throw new RampartException("repeatingNonceValue", new Object[]{ userNameTokenPrincipal.getNonce(), username} );
+	                    }
+
+	                    serviceNonceCache.addNonceForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce(), nonceLifeTimeInSeconds);
+	                }
+	            } else if (WSConstants.SIGN == actInt) {
+	                X509Certificate cert = (X509Certificate) wser.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
+
+	                if (rpd.isAsymmetricBinding() && cert == null && rpd.getInitiatorToken() != null
+	                        && !rpd.getInitiatorToken().isDerivedKeys()) {
+
+	                    // If symmetric binding is used, the certificate should be null.
+	                    // If certificate is not null then probably initiator and
+	                    // recipient are using 2 different bindings.
+	                    throw new RampartException("invalidSignatureAlgo");
+	                }
+
+	                msgCtx.setProperty(RampartMessageData.X509_CERT, cert);
+	            }
+
+	        }
+		}
 
-        for (int j = 0; j < results.size(); j++) {
-            WSSecurityEngineResult wser = (WSSecurityEngineResult) results.get(j);
-            final Integer actInt =
-                    (Integer) wser.get(WSSecurityEngineResult.TAG_ACTION);
-            if (WSConstants.ST_UNSIGNED == actInt.intValue()) {
-
-                Object samlAssertion = wser.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
-
-                SAMLAssertionHandler samlAssertionHandler
-                        = SAMLAssertionHandlerFactory.createAssertionHandler(samlAssertion);
-
-                if (samlAssertionHandler.isBearerAssertion()) {
-                    break;
-                }
-                //Store the token
-                try {
-                    TokenStorage store = rmd.getTokenStorage();
-                    if (store.getToken(samlAssertionHandler.getAssertionId()) == null) {
-                        Token token = new Token(samlAssertionHandler.getAssertionId(),
-                                samlAssertionHandler.getAssertionElement(),
-                                samlAssertionHandler.getDateNotBefore(),
-                                samlAssertionHandler.getDateNotOnOrAfter());
-
-                        token.setSecret(samlAssertionHandler.
-                                getAssertionKeyInfoSecret(signatureCrypto, tokenCallbackHandler));
-                        store.add(token);
-                    }
-                } catch (Exception e) {
-                    throw new RampartException(
-                            "errorInAddingTokenIntoStore", e);
-                }
-            } else if (WSConstants.UT == actInt) {
-
-		        WSUsernameTokenPrincipal userNameTokenPrincipal = (WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
-
-                String username = userNameTokenPrincipal.getName();
-                msgCtx.setProperty(RampartMessageData.USERNAME, username);
-                
-                if (userNameTokenPrincipal.getNonce() != null) {
-                    // Check whether this is a replay attack. To verify that we need to check whether nonce value
-                    // is a repeating one
-                    int nonceLifeTimeInSeconds = 0;
-
-                    if (rpd.getRampartConfig() != null) {
-                        
-                        String stringLifeTime = rpd.getRampartConfig().getNonceLifeTime();
-
-                        try {
-                            nonceLifeTimeInSeconds = Integer.parseInt(stringLifeTime);
-
-                        } catch (NumberFormatException e) {
-                            log.error("Invalid value for nonceLifeTime in rampart configuration file.", e);
-                            throw new RampartException(
-                                        "invalidNonceLifeTime", e);
-
-                        }
-                    }
-
-                    String serviceEndpointName = msgCtx.getAxisService().getEndpointName();
-
-                    boolean valueRepeating = serviceNonceCache.isNonceRepeatingForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce());
-
-                    if (valueRepeating){
-                        throw new RampartException("repeatingNonceValue", new Object[]{ userNameTokenPrincipal.getNonce(), username} );
-                    }
-
-                    serviceNonceCache.addNonceForService(serviceEndpointName, username, userNameTokenPrincipal.getNonce(), nonceLifeTimeInSeconds);
-                }
-            } else if (WSConstants.SIGN == actInt) {
-                X509Certificate cert = (X509Certificate) wser.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-
-                if (rpd.isAsymmetricBinding() && cert == null && rpd.getInitiatorToken() != null
-                        && !rpd.getInitiatorToken().isDerivedKeys()) {
-
-                    // If symmetric binding is used, the certificate should be null.
-                    // If certificate is not null then probably initiator and
-                    // recipient are using 2 different bindings.
-                    throw new RampartException("invalidSignatureAlgo");
-                }
-
-                msgCtx.setProperty(RampartMessageData.X509_CERT, cert);
-            }
-
-        }
 
 		SOAPEnvelope env = Axis2Util.getSOAPEnvelopeFromDOMDocument(rmd.getDocument(), true);
 
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java b/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
index b195b22..af4be4d 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/RampartMessageData.java
@@ -16,6 +16,10 @@
 
 package org.apache.rampart;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
@@ -60,10 +64,6 @@ import org.apache.ws.security.util.Loader;
 import org.apache.ws.security.util.WSSecurityUtil;
 import org.w3c.dom.Document;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
 public class RampartMessageData {
     
     /**
@@ -372,8 +372,19 @@ public class RampartMessageData {
                 this.customClassLoader = axisService.getClassLoader(); 
             } 
             
-            if(this.sender && this.policyData != null) {
-                this.secHeader = new WSSecHeader();
+            // set 'actor' of the WSSecHeader with the value from the rampart config 
+            if (this.sender && this.policyData != null) {
+            	
+            	this.secHeader = new WSSecHeader();
+            	
+            	RampartConfig rampartConfig = this.policyData.getRampartConfig();
+            	if(null != rampartConfig){
+            		String actor = rampartConfig.getOutboundActor();
+            		if(null != actor){
+            			this.secHeader = new WSSecHeader(actor,true);
+            		}
+            	}
+                
                 secHeader.insertSecurityHeader(this.document);
             }
             
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java b/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
index d111fbd..2c7efb8 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/RampartConfigBuilder.java
@@ -46,6 +46,18 @@ public class RampartConfigBuilder implements AssertionBuilder<OMElement> {
         if (childElement != null) {
             rampartConfig.setUserCertAlias(childElement.getText().trim());
         }
+                
+        childElement = element.getFirstChildWithName(new QName(RampartConfig.NS,
+        		RampartConfig.INBOUND_ACTOR_LN));
+        if (childElement != null) {
+        	rampartConfig.setInboundActor(childElement.getText().trim());
+        }
+        
+        childElement = element.getFirstChildWithName(new QName(RampartConfig.NS,
+        		RampartConfig.OUTBOUND_ACTOR_LN));
+        if (childElement != null) {
+        	rampartConfig.setOutboundActor(childElement.getText().trim());
+        }
 
         childElement = element.getFirstChildWithName(new QName(
                 RampartConfig.NS, RampartConfig.ENCRYPTION_USER_LN));
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java b/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
index 5bfba4f..a539641 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/RampartConfig.java
@@ -40,6 +40,9 @@ import javax.xml.stream.XMLStreamWriter;
  *  &lt;ramp:timestampMaxSkew&gt;0&lt;/ramp:timestampMaxSkew&gt;
  *  &lt;ramp:tokenStoreClass&gt;org.apache.rahas.StorageImpl&lt;/ramp:tokenStoreClass&gt;
  *  &lt;ramp:nonceLifeTime&gt;org.apache.rahas.StorageImpl&lt;/ramp:nonceLifeTime&gt;
+ *  &lt;ramp:inboundActor&gt;inboundActorURI&lt;/ramp:inboundActor&gt;
+ *  &lt;ramp:outboundActor&gt;outboundActorURI&lt;/ramp:outboundActor&gt;
+
  *  
  *  &lt;ramp:signatureCrypto&gt;
  *  &lt;ramp:crypto provider=&quot;org.apache.ws.security.components.crypto.Merlin&quot;&gt;
@@ -78,6 +81,10 @@ public class RampartConfig implements Assertion {
 
     public final static String USER_LN = "user";
     
+    public final static String INBOUND_ACTOR_LN = "inboundActor";
+    
+    public final static String OUTBOUND_ACTOR_LN = "outboundActor";
+    
     public final static String USER_CERT_ALIAS_LN = "userCertAlias";
 
     public final static String ENCRYPTION_USER_LN = "encryptionUser";
@@ -150,6 +157,9 @@ public class RampartConfig implements Assertion {
     private String nonceLifeTime = Integer.toString(DEFAULT_NONCE_LIFE_TIME);
     
     private SSLConfig sslConfig;
+    
+    private String inboundActor;
+    private String outboundActor;
 
     /*To set timeStampStrict in WSSConfig through rampartConfig - default value is false*/
     private boolean timeStampStrict = false;
@@ -299,6 +309,18 @@ public class RampartConfig implements Assertion {
             writer.writeEndElement();
         }
         
+        if (getInboundActor() != null) {
+        	writer.writeStartElement(NS, INBOUND_ACTOR_LN);
+        	writer.writeCharacters(getInboundActor());
+        	writer.writeEndElement();
+        }
+        
+        if (getOutboundActor() != null) {
+        	writer.writeStartElement(NS, OUTBOUND_ACTOR_LN);
+        	writer.writeCharacters(getOutboundActor());
+        	writer.writeEndElement();
+        }
+        
         if (getUserCertAlias() != null) {
             writer.writeStartElement(NS, USER_CERT_ALIAS_LN);
             writer.writeCharacters(getUserCertAlias());
@@ -488,4 +510,42 @@ public class RampartConfig implements Assertion {
         this.timeStampStrict = Boolean.valueOf(timeStampStrict);
     }
     
+	/**	  
+	 * @return the inbound actor's URI
+	 * 
+	 */
+	public String getInboundActor() {
+		return inboundActor;
+	}
+
+	/**
+	 * Sets the SOAP 1.1 actor or SOAP 1.2 role identifying the incoming SOAP Security header to process.
+	 * If set, Rampart will expect a SOAP security header with a matching actor/role and fail if
+	 * such is not available in the request. If not set (<code>null</code>), Rampart will process the first
+	 * SOAP security header found.
+	 *  
+	 * @param the inbound actor URI to set
+	 */
+	public void setInboundActor(String inboundActorUri) {
+		this.inboundActor = inboundActorUri;
+	}	
+	
+	/**	  
+	 * @return the outbound actor's URI
+	 * 
+	 */
+	public String getOutboundActor() {
+		return outboundActor;
+	}
+
+	/**	
+	 * Sets the SOAP 1.1 actor or SOAP 1.2 role to set in the outgoing SOAP Security header.
+	 * If not set (<code>null</code>), no SOAP actor/role attribute will be set in the SOAP security header.
+ 
+	 * @param the outbound actor URI to set
+	 */
+	public void setOutboundActor(String outboundActorUri) {
+		this.outboundActor = outboundActorUri;
+	}
+    
 }
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 8fed00a..eb1689d 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -280,7 +280,34 @@
                                 <!-- Service 35 -->
                                 <copy overwrite="yes" file="src/test/resources/rampart/services-35.xml" tofile="target/temp-ramp/META-INF/services.xml" />
                                 <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService35.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 36 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-36.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService36.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 37 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-37.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService37.aar" basedir="target/temp-ramp" />
 
+								<!-- Service 38 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-38.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService38.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 39 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-39.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService39.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 40 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-40.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService40.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 41 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-41.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService41.aar" basedir="target/temp-ramp" />
+                                
+                                <!-- Service 42 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-42.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService42.aar" basedir="target/temp-ramp" />
 
                                 <!-- Service SC-1 -->
                                 <copy overwrite="yes" file="src/test/resources/rampart/issuer.properties" tofile="target/temp-ramp/issuer.properties" />
diff --git a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
index 622a627..923595a 100644
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
@@ -135,7 +135,7 @@ public class RampartTest extends TestCase {
             }
 
             //for (int i = 34; i <= 34; i++) { //<-The number of tests we have
-            for (int i = 1; i <= 35; i++) { //<-The number of tests we have
+            for (int i = 1; i <= 42; i++) { //<-The number of tests we have
                 if(!basic256Supported && (i == 3 || i == 4 || i == 5)) {
                     //Skip the Basic256 tests
                     continue;
@@ -179,7 +179,7 @@ public class RampartTest extends TestCase {
                 }
                 
                 // Invoking the service in the TestCase-28 should fail. So handling it differently..
-                if (i == 28 || i == 34) {
+                if (i == 28 || i == 34 || i == 37 || i == 39 || i == 40 || i == 41) {
                     try {
 
                         //Blocking invocation
@@ -203,6 +203,8 @@ public class RampartTest extends TestCase {
                             // Need to find the exact cause
                             //assertEquals(resources.getString("invalidSignatureAlgo"), axisFault.getMessage());
                             System.out.println(axisFault.getMessage());
+                        }else{
+                        	assertNotNull(axisFault);
                         }
 
                     }
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/36.xml b/modules/rampart-integration/src/test/resources/rampart/policy/36.xml
new file mode 100644
index 0000000..d1c239d
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/36.xml
@@ -0,0 +1,70 @@
+<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:Basic128/>
+						</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:outboundActor>outboundActor</ramp:outboundActor>
+				
+				<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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/37.xml b/modules/rampart-integration/src/test/resources/rampart/policy/37.xml
new file mode 100644
index 0000000..fe5ac5a
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/37.xml
@@ -0,0 +1,70 @@
+<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:Basic128/>
+						</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:inboundActor>inboundActor</ramp:inboundActor>
+				
+				<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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/38.xml b/modules/rampart-integration/src/test/resources/rampart/policy/38.xml
new file mode 100644
index 0000000..f0172db
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/38.xml
@@ -0,0 +1,71 @@
+<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:Basic128/>
+						</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:inboundActor>inboundActor</ramp:inboundActor>
+				<ramp:outboundActor>outboundActor</ramp:outboundActor>
+				
+				<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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/39.xml b/modules/rampart-integration/src/test/resources/rampart/policy/39.xml
new file mode 100644
index 0000000..add04f7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/39.xml
@@ -0,0 +1,70 @@
+<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:Basic128/>
+						</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:outboundActor>outboundActor</ramp:outboundActor>
+				
+				<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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/40.xml b/modules/rampart-integration/src/test/resources/rampart/policy/40.xml
new file mode 100644
index 0000000..134e262
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/40.xml
@@ -0,0 +1,70 @@
+<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:Basic128/>
+						</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:inboundActor>inboundActor</ramp:inboundActor>
+				
+				<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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/41.xml b/modules/rampart-integration/src/test/resources/rampart/policy/41.xml
new file mode 100644
index 0000000..5947c58
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/41.xml
@@ -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:Basic128/>
+						</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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/42.xml b/modules/rampart-integration/src/test/resources/rampart/policy/42.xml
new file mode 100644
index 0000000..5947c58
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/42.xml
@@ -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:Basic128/>
+						</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">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">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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-36.xml b/modules/rampart-integration/src/test/resources/rampart/services-36.xml
new file mode 100644
index 0000000..2e810e9
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-36.xml
@@ -0,0 +1,87 @@
+<service name="SecureService36">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-37.xml b/modules/rampart-integration/src/test/resources/rampart/services-37.xml
new file mode 100644
index 0000000..042758c
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-37.xml
@@ -0,0 +1,87 @@
+<service name="SecureService37">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-38.xml b/modules/rampart-integration/src/test/resources/rampart/services-38.xml
new file mode 100644
index 0000000..5262628
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-38.xml
@@ -0,0 +1,89 @@
+<service name="SecureService38">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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:inboundActor>outboundActor</ramp:inboundActor>
+					<ramp:outboundActor>inboundActor</ramp:outboundActor>
+
+                    <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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-39.xml b/modules/rampart-integration/src/test/resources/rampart/services-39.xml
new file mode 100644
index 0000000..16eb59a
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-39.xml
@@ -0,0 +1,88 @@
+<service name="SecureService39">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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:inboundActor>inboundActor</ramp:inboundActor>
+
+                    <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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-40.xml b/modules/rampart-integration/src/test/resources/rampart/services-40.xml
new file mode 100644
index 0000000..039d902
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-40.xml
@@ -0,0 +1,88 @@
+<service name="SecureService40">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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:outboundActor>outboundActor</ramp:outboundActor>
+
+                    <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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-41.xml b/modules/rampart-integration/src/test/resources/rampart/services-41.xml
new file mode 100644
index 0000000..f1540db
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-41.xml
@@ -0,0 +1,88 @@
+<service name="SecureService41">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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:inboundActor>inboundActor</ramp:inboundActor>
+
+                    <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">rampart/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>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-42.xml b/modules/rampart-integration/src/test/resources/rampart/services-42.xml
new file mode 100644
index 0000000..31d98ae
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-42.xml
@@ -0,0 +1,88 @@
+<service name="SecureService42">
+
+	<module ref="addressing"/>
+	<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>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</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:Basic128/>
+                            </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:outboundActor>outboundActor</ramp:outboundActor>
+
+                    <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">rampart/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>
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java b/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
index 0d8a2a0..eb7b37c 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/AsymmetricBindingBuilderTest.java
@@ -16,15 +16,16 @@
 
 package org.apache.rampart;
 
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMElement;
 import org.apache.axis2.context.MessageContext;
 import org.apache.neethi.Policy;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.conversation.ConversationConstants;
 
-import javax.xml.namespace.QName;
-
-import java.util.ArrayList;
-
 public class AsymmetricBindingBuilderTest extends MessageBuilderTestBase {
     
     public void testAsymmBinding() throws Exception {
@@ -178,6 +179,56 @@ public class AsymmetricBindingBuilderTest extends MessageBuilderTestBase {
         list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
         
         this.verifySecHeader(list.iterator(), ctx.getEnvelope());
+        
+        //verify that no actor attribute is available
+        OMElement secHeader =
+        		ctx.getEnvelope().getHeader().
+                        getFirstChildWithName(new QName(WSConstants.WSSE_NS,
+                                                        WSConstants.WSSE_LN));        
+        String actor = secHeader.getAttributeValue(new QName(ctx.getEnvelope().getNamespaceURI(), WSConstants.ATTR_ACTOR));        
+        assertNull("It is expected that 'actor' attribute is not available in case when no outboundActor is configured.", actor);
+    }
+    
+    public void testAsymmBindingTripleDesRSA15WithOutboundActor() throws Exception {
+        MessageContext ctx = getMsgCtx();
+        
+        String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml";
+        Policy policy = this.loadPolicy(policyXml);
+        
+        ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+        
+        MessageBuilder builder = new MessageBuilder();
+        builder.build(ctx);
+        
+        OMElement secHeader =
+        		ctx.getEnvelope().getHeader().
+                        getFirstChildWithName(new QName(WSConstants.WSSE_NS,
+                                                        WSConstants.WSSE_LN));
+        
+        String actor = secHeader.getAttributeValue(new QName(ctx.getEnvelope().getNamespaceURI(), WSConstants.ATTR_ACTOR));
+        
+        assertEquals("myOutboundActor", actor);
+    }
+    
+    public void testAsymmBindingTripleDesRSA15WithOutboundRole() throws Exception {
+        MessageContext ctx = getMsgCtx12();
+        
+        String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml";
+        Policy policy = this.loadPolicy(policyXml);
+        
+        ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+        
+        MessageBuilder builder = new MessageBuilder();
+        builder.build(ctx);
+        
+        OMElement secHeader =
+        		ctx.getEnvelope().getHeader().
+                        getFirstChildWithName(new QName(WSConstants.WSSE_NS,
+                                                        WSConstants.WSSE_LN));
+        
+        String actor = secHeader.getAttributeValue(new QName(ctx.getEnvelope().getNamespaceURI(), WSConstants.ATTR_ROLE));
+        
+        assertEquals("myOutboundActor", actor);
     }
 
     public void testAsymmBindingTripleDesRSA15DK() throws Exception {
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/MessageBuilderTestBase.java b/modules/rampart-tests/src/test/java/org/apache/rampart/MessageBuilderTestBase.java
index 5686c78..b93d320 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/MessageBuilderTestBase.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/MessageBuilderTestBase.java
@@ -74,7 +74,7 @@ public class MessageBuilderTestBase extends TestCase {
      * @throws AxisFault
      */
     protected MessageContext getMsgCtx12() throws Exception {
-        return initMsgCtxFromMessage("test-resources/policy/soapmessage.xml");
+        return initMsgCtxFromMessage("test-resources/policy/soapmessage12.xml");
     }
 
     /**
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java b/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
index 95a1e25..2dad0af 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/RampartEngineTest.java
@@ -53,48 +53,44 @@ public class RampartEngineTest extends MessageBuilderTestBase {
     }
 
     public void testValidSOAPMessage() throws Exception {
-
-        MessageContext ctx = getMsgCtx();
-
-        String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml";
-        Policy policy = loadPolicy(policyXml);
-
-        ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
-
-        MessageBuilder builder = new MessageBuilder();
-        builder.build(ctx);
-
-        // Building the SOAP envelope from the OMElement
-        buildSOAPEnvelope(ctx);
-
-        RampartEngine engine = new RampartEngine();
-        List<WSSecurityEngineResult> results = engine.process(ctx);
-
-        /*
-        The principle purpose of the test case is to verify that the above processes
-        without throwing an exception. However, perform a minimal amount of validation on the
-        results.
-        */
-        assertNotNull("RampartEngine returned null result", results);
-        //verify cert was stored
-        X509Certificate usedCert = null;
-        for (WSSecurityEngineResult result : results) {
-            Integer action = (Integer) result.get(WSSecurityEngineResult.TAG_ACTION);
-            if (action == WSConstants.SIGN) {
-                //the result is for the signature, which contains the used certificate
-                usedCert = (X509Certificate) result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-                break;
-            }
-        }
-        assertNotNull("Result of processing did not include a certificate", usedCert);
+    	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
     }
 
     public void testValidSOAP12Message() throws Exception {
+        runValidRampartProcessing(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml");
+    }
+    
+    public void testValidSOAPMessageWithActor() throws Exception {
+    	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
+    }
+    
+    public void testValidSOAP12MessageWithRole() throws Exception {
+    	runValidRampartProcessing(getMsgCtx12(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml");
+    }
+    
+    public void testMissingSOAPInboundActor() throws Exception {
+    	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml");
+    }
+    
+    public void testMissingSOAPOutboundActor() throws Exception {
+    	try{
+        	runValidRampartProcessing(getMsgCtx(), "test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml");
+        	fail("Failure is expected because no outbound actor is set.");
+    	}catch(RampartException e){
+    		assertNotNull(e);
+    	}
+    }
 
-        MessageContext ctx = getMsgCtx12();
-
-        String policyXml = "test-resources/policy/rampart-asymm-binding-6-3des-r15.xml";
-        Policy policy = loadPolicy(policyXml);
+    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
+        SOAPBuilder soapBuilder = new SOAPBuilder();
+        SOAPEnvelope env = ctx.getEnvelope();
+        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
+        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
+        ctx.setEnvelope(env);
+    }
+    
+    private void runValidRampartProcessing(MessageContext ctx, String policyXmlPath) throws Exception{    	
+        Policy policy = loadPolicy(policyXmlPath);
 
         ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
 
@@ -125,12 +121,4 @@ public class RampartEngineTest extends MessageBuilderTestBase {
         }
         assertNotNull("Result of processing did not include a certificate", usedCert);
     }
-
-    private void buildSOAPEnvelope(MessageContext ctx) throws Exception {
-        SOAPBuilder soapBuilder = new SOAPBuilder();
-        SOAPEnvelope env = ctx.getEnvelope();
-        ByteArrayInputStream inStream = new ByteArrayInputStream(env.toString().getBytes());
-        env = (SOAPEnvelope) soapBuilder.processDocument(inStream, getContentTypeForEnvelope(env), ctx);
-        ctx.setEnvelope(env);
-    }
 }
diff --git a/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java b/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java
index da6b0de..eb0d5f6 100644
--- a/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java
+++ b/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java
@@ -77,6 +77,9 @@ public class RampartPolicyTest extends TestCase {
                 .getProperty("keystoreFile"));
         assertEquals("Incorrect property value", "password", prop
                 .getProperty("keystorePassword"));
+        
+        assertEquals("myInboundActor", config.getInboundActor());
+        assertEquals("myOutboundActor", config.getOutboundActor());
     }
     
 }
\ No newline at end of file
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml
new file mode 100644
index 0000000..424e170
--- /dev/null
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-actor.xml
@@ -0,0 +1,75 @@
+<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.TestCBHandler</ramp:passwordCallbackClass>
+			<ramp:inboundActor>myInboundActor</ramp:inboundActor>
+			
+			<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/keys/interop2.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/keys/interop2.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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml
new file mode 100644
index 0000000..92102e2
--- /dev/null
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-inbound-outbound-actor.xml
@@ -0,0 +1,76 @@
+<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.TestCBHandler</ramp:passwordCallbackClass>
+			<ramp:inboundActor>myOutboundActor</ramp:inboundActor>
+			<ramp:outboundActor>myOutboundActor</ramp:outboundActor>
+			
+			<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/keys/interop2.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/keys/interop2.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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml
new file mode 100644
index 0000000..5858be2
--- /dev/null
+++ b/modules/rampart-tests/test-resources/policy/rampart-asymm-binding-6-3des-r15-outbound-actor.xml
@@ -0,0 +1,75 @@
+<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.TestCBHandler</ramp:passwordCallbackClass>
+			<ramp:outboundActor>myOutboundActor</ramp:outboundActor>
+			
+			<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/keys/interop2.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/keys/interop2.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>
diff --git a/modules/rampart-tests/test-resources/policy/rampart-policy-1.xml b/modules/rampart-tests/test-resources/policy/rampart-policy-1.xml
index 5f1e907..c23ee2a 100644
--- a/modules/rampart-tests/test-resources/policy/rampart-policy-1.xml
+++ b/modules/rampart-tests/test-resources/policy/rampart-policy-1.xml
@@ -3,6 +3,8 @@
 		<ramp:user>alice</ramp:user>
 		<ramp:encryptionUser>bob</ramp:encryptionUser>
 		<ramp:passwordCallbackClass>org.apache.axis2.security.PWCallback</ramp:passwordCallbackClass>
+		<ramp:inboundActor>myInboundActor</ramp:inboundActor>
+		<ramp:outboundActor>myOutboundActor</ramp:outboundActor>
 		
 		<ramp:signatureCrypto>
 			<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
diff --git a/modules/rampart-tests/test-resources/policy/soapmessage12.xml b/modules/rampart-tests/test-resources/policy/soapmessage12.xml
new file mode 100644
index 0000000..c8e5d0b
--- /dev/null
+++ b/modules/rampart-tests/test-resources/policy/soapmessage12.xml
@@ -0,0 +1,57 @@
+<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+                  xmlns:axis2="http://ws.apache.org/namespaces/axis2">
+    <soapenv:Header xmlns:fabrikam="http://example.com/fabrikam">
+        <wsa:MessageID soapenv:mustUnderstand="0">
+            uuid:920C5190-0B8F-11D9-8CED-F22EDEEBF7E5</wsa:MessageID>
+        <wsa:To soapenv:mustUnderstand="0">http://localhost:8081/axis/services/BankPort</wsa:To>
+        <wsa:From axis2:AttrExt="123456789" soapenv:mustUnderstand="0" >
+            <wsa:Address>
+                http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
+            <wsa:ReferenceParameters>
+                <fabrikam:CustomerKey>123456789</fabrikam:CustomerKey>
+            </wsa:ReferenceParameters>
+            <wsa:ReferenceProperties>
+                <fabrikam:ShoppingCart>ABCDEFG</fabrikam:ShoppingCart>
+            </wsa:ReferenceProperties>
+            <axis2:EPRExt axis2:AttrExt="123456789">123456789</axis2:EPRExt>
+        </wsa:From>
+        <wsa:Action>http://ws.apache.org/tests/action</wsa:Action>
+        <wsa:ReplyTo axis2:AttrExt="123456789">
+            <wsa:Address>http://example.com/fabrikam/acct</wsa:Address>
+            <wsa:ReferenceParameters>
+                <fabrikam:CustomerKey>123456789</fabrikam:CustomerKey>
+            </wsa:ReferenceParameters>
+            <wsa:ReferenceProperties>
+                <fabrikam:ShoppingCart>ABCDEFG</fabrikam:ShoppingCart>
+            </wsa:ReferenceProperties>
+            <axis2:EPRExt axis2:AttrExt="123456789">123456789</axis2:EPRExt>
+        </wsa:ReplyTo>
+        
+        <wsa:FaultTo axis2:AttrExt="123456789">
+            <wsa:Address>http://example.com/fabrikam/fault</wsa:Address>
+            <wsa:ReferenceParameters>
+                <fabrikam:CustomerKey>123456789</fabrikam:CustomerKey>
+            </wsa:ReferenceParameters>
+            <wsa:ReferenceProperties>
+                <fabrikam:ShoppingCart>ABCDEFG</fabrikam:ShoppingCart>
+            </wsa:ReferenceProperties>
+            <axis2:EPRExt axis2:AttrExt="123456789">123456789</axis2:EPRExt>
+        </wsa:FaultTo>
+        <wsa:RelatesTo>http://some.previous.message</wsa:RelatesTo>
+        <wsa:RelatesTo RelationshipType="axis2:some.custom.relationship">http://identifier.of.other.message/</wsa:RelatesTo>
+        
+    </soapenv:Header>
+    <soapenv:Body>
+        <ns1:getBalance soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+                        xmlns:ns1="http://localhost:8081/axis/services/BankPort">
+            <accountNo href="#id0"/>
+        </ns1:getBalance>
+        <multiRef id="id0" soapenc:root="0"
+                  soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+                  xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
+            1001</multiRef>
+    </soapenv:Body>
+</soapenv:Envelope>
\ No newline at end of file