You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by pi...@apache.org on 2007/09/06 12:49:17 UTC

svn commit: r573215 [9/22] - in /webservices/rampart/tags/c/0.90: ./ build/ build/linux/ build/win32/ include/ samples/ samples/authn_provider/ samples/callback/ samples/callback/htpasswd_callback/ samples/client/ samples/client/sec_echo/ samples/clien...

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/client-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,47 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+            <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+            <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,47 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario5/service-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/client-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,56 @@
+<wsp:Policy 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/Never">
+								<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:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <wsp:Policy>
+                    <!--Please uncomment ONE of these to select an identifier pattern-->
+                    <sp:MustSupportRefKeyIdentifier/>
+                    <!--sp:MustSupportRefEmbeddedToken/-->
+                    <!--sp:MustSupportRefIssuerSerial-->
+                </wsp:Policy>
+            </sp:Wss10>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/b_cert.cert</rampc:ReceiverCertificate>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,56 @@
+<wsp:Policy 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/Never">
+								<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:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <wsp:Policy>
+                    <sp:MustSupportRefKeyIdentifier/>
+                    <sp:MustSupportRefEmbeddedToken/>
+                    <sp:MustSupportRefIssuerSerial/>
+                </wsp:Policy>
+            </sp:Wss10>
+
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/a_cert.cert</rampc:ReceiverCertificate>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario6/service-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/client-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,67 @@
+<wsp:Policy 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/Always">
+								<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:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+                    <!--sp:SignBeforeEncrypting/-->
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+                    <sp:MustSupportRefEmbeddedToken/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/b_cert.cert</rampc:ReceiverCertificate>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,68 @@
+<wsp:Policy 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/Never">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+                    <sp:MustSupportRefKeyIdentifier/>
+                    <sp:MustSupportRefEmbeddedToken/>
+                    <sp:MustSupportRefIssuerSerial/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/a_cert.cert</rampc:ReceiverCertificate>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario7/service-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,66 @@
+<wsp:Policy 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/Always">
+								<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:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+                    <sp:MustSupportRefEmbeddedToken/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/b_cert.cert</rampc:ReceiverCertificate>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/client-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,66 @@
+<wsp:Policy 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/Always">
+								<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:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <wsp:Policy>
+                    <sp:MustSupportRefEmbeddedToken/>
+                </wsp:Policy>
+            </sp:Wss10>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+            <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+            <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/b_cert.cert</rampc:ReceiverCertificate>
+            <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+            <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,66 @@
+<wsp:Policy 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/Never">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <wsp:Policy>
+                    <sp:MustSupportRefEmbeddedToken/>
+                </wsp:Policy>
+            </sp:Wss10>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+            <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+            <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/a_cert.cert</rampc:ReceiverCertificate>
+            <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+            <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario8/service-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,66 @@
+<wsp:Policy 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/Never">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic256Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+            <wsp:Policy>
+                <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+            </wsp:Policy>
+            </sp:SignedSupportingTokens>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+                    <sp:MustSupportRefEmbeddedToken/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+            </sp:EncryptedParts>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+            </sp:SignedParts>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:User>Gampola</rampc:User>
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordType>Digest</rampc:PasswordType>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/a_cert.cert</rampc:ReceiverCertificate>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/client-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,51 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+                            <sp:Basic192Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+                <sp:Header  Namespace="http://www.w3.org/2005/08/addressing"/>
+            </sp:SignedParts>
+            <!--rampc:SignedItems xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:Element Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+            </rampc:SignedItems-->                
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>a</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+            <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate>
+            <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-incoming-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-incoming-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-incoming-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-incoming-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,51 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+					<sp:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic192Rsa15/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:Body/>
+                <sp:Header Namespace="http://www.w3.org/2005/08/addressing"/>
+            </sp:SignedParts>
+            <rampc:SignedItems xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:Element Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+            </rampc:SignedItems>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:EncryptionUser>b</rampc:EncryptionUser>
+                <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+                <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_cert.cert</rampc:Certificate>
+                <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/bhome/b_key.pem</rampc:PrivateKey>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-outgoing-secpolicy.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-outgoing-secpolicy.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-outgoing-secpolicy.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/scenario9/service-outgoing-secpolicy.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,32 @@
+<wsp:Policy 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/Always">
+								<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/Always">
+								<wsp:Policy>
+									<sp:WssX509V3Token10/>
+								</wsp:Policy>
+							</sp:X509Token>
+						</wsp:Policy>
+					</sp:RecipientToken>
+                    <sp:IncludeTimestamp/>
+				</wsp:Policy>
+            </sp:AsymmetricBinding>
+            <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+                <rampc:TimeToLive>360</rampc:TimeToLive>
+            </rampc:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>

Added: webservices/rampart/tags/c/0.90/samples/secpolicy/test_scen.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/secpolicy/test_scen.sh?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/secpolicy/test_scen.sh (added)
+++ webservices/rampart/tags/c/0.90/samples/secpolicy/test_scen.sh Thu Sep  6 03:48:44 2007
@@ -0,0 +1,29 @@
+#!/bin/bash
+_SMPL_DIR="$PWD"
+
+if [ $# -ne 2 ]
+then
+    echo "Usage : $0 scenarioX server-port"
+    exit
+fi
+    S_i=$1
+    _PORT=$2
+    echo "-------------------------------------------------------------------------"
+    echo ">Deploying $S_i"
+    sh deploy.sh $S_i
+    echo ">Killing server"
+    killall axis2_http_server
+    echo ">Go to $AXIS2C_HOME"
+    cd $AXIS2C_HOME/bin
+    echo ">Start server @ $_PORT"
+    ./axis2_http_server -p$_PORT &
+    echo ">Go to client directory"
+    cd $_SMPL_DIR/../client/sec_echo
+    echo ">Run the sample"
+    sh update_n_run.sh
+    echo ">Jump back to samples dir :$_SMPL_DIR"
+    cd $_SMPL_DIR
+    
+killall axis2_http_server
+echo "DONE"
+

Propchange: webservices/rampart/tags/c/0.90/samples/secpolicy/test_scen.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: webservices/rampart/tags/c/0.90/samples/server/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/samples/server/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,4 @@
+samplesdir=$(prefix)/samples/server
+SUBDIRS = sec_echo 
+#EXTRA_DIST = axis2.xml axis2.log
+#samples_DATA=  Makefile.am Makefile.in

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,13 @@
+prglibdir=$(prefix)/services/sec_echo
+samplesdir=$(prefix)/samples/server/sec_echo
+prglib_LTLIBRARIES = libsec_echo.la
+samples_DATA=echo.c echo_skeleton.c echo.h services.xml Makefile.am Makefile.in
+prglib_DATA= services.xml
+EXTRA_DIST = services.xml
+noinst_HEADERS = echo.h
+SUBDIRS =
+libsec_echo_la_SOURCES = echo.c echo_skeleton.c
+libsec_echo_la_LIBADD  =
+INCLUDES = -I$(AXIS2C_HOME)/include/axis2-1.0 \
+			@UTILINC@ \
+			@AXIOMINC@

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/README
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/README?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/README (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/README Thu Sep  6 03:48:44 2007
@@ -0,0 +1,11 @@
+HOW TO CONFIGURE SERVER?
+-----------------------
+Make sure that you have 
+Go to rampart/samples/server/sec_echo and
+Run  %make install
+This will deploy a sec_echo service and copy security enabled services.xml
+file.
+
+Note: You may change the services.xml file to adjust it to your environment. E.g. Changing the passwordCallbackClass parameter.
+
+

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.c?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.c (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.c Thu Sep  6 03:48:44 2007
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "echo.h"
+#include <axiom_xml_writer.h>
+#include <axiom_util.h>
+#include <stdio.h>
+
+axiom_node_t *
+build_om_programatically(const axutil_env_t *env, axis2_char_t *text);
+
+axiom_node_t *
+axis2_echo_echo(const axutil_env_t *env, axiom_node_t *node)
+{
+    axiom_node_t *ret_node = NULL;
+    axis2_char_t *name = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    name = axiom_util_get_localname(node, env);
+     
+    ret_node = build_om_programatically(env, name);
+    return ret_node;
+}
+
+/* Builds the response content */
+axiom_node_t *
+build_om_programatically(const axutil_env_t *env, axis2_char_t *text)
+{
+    axiom_node_t *echo_om_node = NULL;
+    axiom_element_t* echo_om_ele = NULL;
+    axiom_node_t* text_om_node = NULL;
+    axiom_element_t * text_om_ele = NULL;
+    axiom_namespace_t *ns1 = NULL;
+
+    ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/rampart/samples", "ns1");
+
+    echo_om_ele = axiom_element_create(env, NULL, "RecievedNode", ns1, &echo_om_node);
+
+    text_om_ele = axiom_element_create(env, echo_om_node, "LocalName", NULL, &text_om_node);
+
+    axiom_element_set_text(text_om_ele, env, text, text_om_node);
+
+    return echo_om_node;
+}
+

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.h (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef CALC_H
+#define CALC_H
+
+
+#include <axis2_svc_skeleton.h>
+#include <axutil_log_default.h>
+#include <axutil_error_default.h>
+#include <axiom_text.h>
+#include <axiom_node.h>
+#include <axiom_element.h>
+
+axiom_node_t *axis2_echo_echo(const axutil_env_t *env, axiom_node_t *node);
+
+#endif /* CALC_H*/

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo_skeleton.c?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo_skeleton.c (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/echo_skeleton.c Thu Sep  6 03:48:44 2007
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <axis2_svc_skeleton.h>
+#include "echo.h"
+#include <axutil_array_list.h>
+#include <axis2_msg_ctx.h>
+#include <stdio.h>
+
+int AXIS2_CALL
+echo_free(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env);
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+echo_invoke(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axis2_msg_ctx_t *msg_ctx);
+
+
+int AXIS2_CALL
+echo_init(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env);
+
+axiom_node_t* AXIS2_CALL
+echo_on_fault(axis2_svc_skeleton_t *svc_skeli,
+        const axutil_env_t *env, axiom_node_t *node);
+
+static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
+    echo_init,
+    echo_invoke,
+    echo_on_fault,
+    echo_free
+};
+
+
+/*Create function */
+axis2_svc_skeleton_t *
+axis2_echo_create(const axutil_env_t *env)
+{
+    axis2_svc_skeleton_t *svc_skeleton = NULL;
+    /* Allocate memory for the structs */
+    svc_skeleton = AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_svc_skeleton_t));
+
+    svc_skeleton->ops = AXIS2_MALLOC(
+                env->allocator, sizeof(axis2_svc_skeleton_ops_t));
+
+    svc_skeleton->ops = &echo_svc_skeleton_ops_var;
+
+    svc_skeleton->func_array = NULL;
+    /* Assign function pointers */
+
+    return svc_skeleton;
+}
+
+/* Initialize the service */
+int AXIS2_CALL
+echo_init(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env)
+{
+    svc_skeleton->func_array = axutil_array_list_create(env, 0);
+    /* Add the implemented operation names of the service to
+     * the array list of functions 
+     */
+    axutil_array_list_add(svc_skeleton->func_array, env, "echoString");
+    /* Any initialization stuff of echo service should go here */
+    return AXIS2_SUCCESS;
+}
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+echo_invoke(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env,
+        axiom_node_t *node,
+        axis2_msg_ctx_t *msg_ctx)
+{
+    /* Invoke the business logic.
+     * Depending on the function name invoke the correct impl method.
+     * We have only echo in this sample, hence invoke echo method.
+     * To see how to deal with multiple impl methods, have a look at the
+     * math sample.
+     */
+
+    return axis2_echo_echo(env, node);
+}
+
+/* On fault, handle the fault */
+axiom_node_t* AXIS2_CALL
+echo_on_fault(axis2_svc_skeleton_t *svc_skeli,
+        const axutil_env_t *env, axiom_node_t *node)
+{
+    /* Here we are just setting a simple error message inside an element
+     * called 'EchoServiceError' 
+     */
+    axiom_node_t *error_node = NULL;
+    axiom_node_t *text_node = NULL;
+    axiom_element_t *error_ele = NULL;
+    
+	error_ele = axiom_element_create(env, NULL, "EchoServiceError", NULL,  &error_node);
+    axiom_element_set_text(error_ele, env, "Echo service failed ", text_node);
+    return error_node;
+}
+
+/* Free the resources used */
+int AXIS2_CALL
+echo_free(axis2_svc_skeleton_t *svc_skeleton,
+        const axutil_env_t *env)
+{
+    /* Free the function array */
+    if (svc_skeleton->func_array)
+    {
+        axutil_array_list_free(svc_skeleton->func_array, env);
+        svc_skeleton->func_array = NULL;
+    }
+
+
+    /* Free the service skeleton */
+    if (svc_skeleton)
+    {
+        AXIS2_FREE(env->allocator, svc_skeleton);
+        svc_skeleton = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+/**
+ * Following block distinguish the exposed part of the dll.
+ */
+AXIS2_EXPORT int
+axis2_get_instance(axis2_svc_skeleton_t **inst,
+        const axutil_env_t *env)
+{
+    *inst = axis2_echo_create(env);
+    if (!(*inst))
+    {
+        return AXIS2_FAILURE;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(axis2_svc_skeleton_t *inst,
+        const axutil_env_t *env)
+{
+    axis2_status_t status = AXIS2_FAILURE;
+    if (inst)
+    {
+        status = AXIS2_SVC_SKELETON_FREE(inst, env);
+    }
+    return status;
+}
+

Added: webservices/rampart/tags/c/0.90/samples/server/sec_echo/services.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/samples/server/sec_echo/services.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/samples/server/sec_echo/services.xml (added)
+++ webservices/rampart/tags/c/0.90/samples/server/sec_echo/services.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,19 @@
+<service name="sec_echo">
+    <parameter name="ServiceClass" locked="xsd:false">sec_echo</parameter>
+
+   <description>
+        This is a testing service , to test the system is working or not
+   </description>
+    <!--Rampart configurations START -->
+    <module ref="rampart"/>
+    <parameter name="OutflowSecurityPolicy">AXIS2C_HOME/services/sec_echo/outgoing-secpolicy.xml</parameter>
+    <parameter name="InflowSecurityPolicy">AXIS2C_HOME/services/sec_echo/incoming-secpolicy.xml</parameter>
+    
+    <!--Rampart configurations END -->
+
+    <operation name="echoString">
+            <!--messageReceiver class="axis2_receivers" /-->
+        <parameter name="wsamapping" >http://ws.apache.org/axis2/c/samples/sec_echo</parameter>
+    </operation>
+
+</service>

Added: webservices/rampart/tags/c/0.90/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/src/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1 @@
+SUBDIRS = omxmlsec secpolicy handlers util core data 

Added: webservices/rampart/tags/c/0.90/src/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/core/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/core/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/src/core/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,17 @@
+TESTS =
+prglibdir=$(prefix)/modules/rampart
+prglib_LTLIBRARIES = libmod_rampart.la
+prglib_DATA= ../data/module.xml
+
+libmod_rampart_la_SOURCES = mod_rampart.c
+
+libmod_rampart_la_LIBADD  = ../handlers/librampart_handlers.la \
+			    ../util/librampart_util.la \
+			    ../omxmlsec/libomxmlsec.la \
+				../secpolicy/model/librp_model.la \
+				../secpolicy/builder/librp_builder.la \
+				${AXIS2C_HOME}/lib
+
+INCLUDES = -I$(top_builddir)/include \
+			-I ../../include \
+			@AXIS2INC@

Added: webservices/rampart/tags/c/0.90/src/core/mod_rampart.c
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/core/mod_rampart.c?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/core/mod_rampart.c (added)
+++ webservices/rampart/tags/c/0.90/src/core/mod_rampart.c Thu Sep  6 03:48:44 2007
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <axis2_module.h>
+#include <rampart_mod.h>
+#include <axis2_conf_ctx.h>
+
+axis2_status_t AXIS2_CALL
+mod_rampart_shutdown(axis2_module_t *module,
+        const axutil_env_t *env);
+
+axis2_status_t AXIS2_CALL
+mod_rampart_init(axis2_module_t *module,
+        const axutil_env_t *env,
+        axis2_conf_ctx_t *conf_ctx,
+        axis2_module_desc_t *module_desc);
+
+axis2_status_t AXIS2_CALL
+mod_rampart_fill_handler_create_func_map(axis2_module_t *module,
+        const axutil_env_t *env);
+
+static const axis2_module_ops_t addr_module_ops_var = {
+    mod_rampart_init,
+    mod_rampart_shutdown,
+    mod_rampart_fill_handler_create_func_map
+    };
+
+axis2_module_t *
+mod_rampart_create(const axutil_env_t *env)
+{
+    axis2_module_t *module = NULL;
+    module = AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_module_t));
+
+
+    module->ops = &addr_module_ops_var;
+    return module;
+}
+
+axis2_status_t AXIS2_CALL
+mod_rampart_init(axis2_module_t *module,
+        const axutil_env_t *env,
+        axis2_conf_ctx_t *conf_ctx,
+        axis2_module_desc_t *module_desc)
+{
+    /* Any initialization stuff of mod_rampart goes here */
+    AXIS2_LOG_INFO(env->log,"[rampart][mod_rampart] mod_rampart initialized");
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+mod_rampart_shutdown(axis2_module_t *module,
+        const axutil_env_t *env)
+{
+    AXIS2_LOG_INFO(env->log,"[rampart][mod_rampart] mod_rampart shutdown");
+
+    if (module->handler_create_func_map)
+    {
+        axutil_hash_free(module->handler_create_func_map, env);
+        module->handler_create_func_map = NULL;
+    }
+
+    if (module)
+    {
+        AXIS2_FREE(env->allocator, module);
+        module = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+mod_rampart_fill_handler_create_func_map(axis2_module_t *module,
+        const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    module->handler_create_func_map = axutil_hash_make(env);
+    if (!module->handler_create_func_map)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
+                AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    axutil_hash_set(module->handler_create_func_map, "RampartInHandler",
+            AXIS2_HASH_KEY_STRING, rampart_in_handler_create);
+
+    axutil_hash_set(module->handler_create_func_map, "RampartOutHandler",
+            AXIS2_HASH_KEY_STRING, rampart_out_handler_create);
+
+    return AXIS2_SUCCESS;
+}
+
+/**
+ * Following block distinguish the exposed part of the dll.
+ */
+
+AXIS2_EXPORT int
+axis2_get_instance(axis2_module_t **inst,
+        const axutil_env_t *env)
+{
+    *inst = mod_rampart_create(env);
+    if (!(*inst))
+    {
+        return AXIS2_FAILURE;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(axis2_module_t *inst,
+        const axutil_env_t *env)
+{
+    axis2_status_t status = AXIS2_FAILURE;
+    if (inst)
+    {
+        status = mod_rampart_shutdown(inst, env);
+    }
+    return status;
+}

Added: webservices/rampart/tags/c/0.90/src/data/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/data/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/data/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/src/data/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,4 @@
+datadir=$(prefix)/modules/rampart/
+data_DATA=module.xml
+EXTRA_DIST = module.xml
+

Added: webservices/rampart/tags/c/0.90/src/data/module.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/data/module.xml?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/data/module.xml (added)
+++ webservices/rampart/tags/c/0.90/src/data/module.xml Thu Sep  6 03:48:44 2007
@@ -0,0 +1,19 @@
+<module name="rampart" class="mod_rampart">
+    <inflow>
+        <handler name="RampartInHandler" class="mod_rampart">
+            <order phase="PreDispatch"/>
+        </handler>
+    </inflow>
+
+    <outflow>
+        <handler name="RampartOutHandler" class="mod_rampart">
+            <order phase="MessageOut"/>
+        </handler>
+    </outflow>
+
+    <Outfaultflow>
+        <handler name="RampartOutHandler" class="mod_rampart">
+            <order phase="MessageOut"/>
+        </handler>
+    </Outfaultflow>
+</module>

Added: webservices/rampart/tags/c/0.90/src/handlers/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/handlers/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/handlers/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/src/handlers/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,8 @@
+TESTS =
+noinst_LTLIBRARIES = librampart_handlers.la
+
+librampart_handlers_la_SOURCES =	rampart_out_handler.c\
+								rampart_in_handler.c
+INCLUDES = -I$(top_builddir)/include \
+			-I ../../include \
+			@AXIS2INC@

Added: webservices/rampart/tags/c/0.90/src/handlers/rampart_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/handlers/rampart_in_handler.c?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/handlers/rampart_in_handler.c (added)
+++ webservices/rampart/tags/c/0.90/src/handlers/rampart_in_handler.c Thu Sep  6 03:48:44 2007
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_handler_desc.h>
+#include <axutil_array_list.h>
+#include <axutil_hash.h>
+#include <axiom_soap_const.h>
+#include <axiom_soap_envelope.h>
+#include <axiom_soap_header.h>
+#include <axiom_soap_header_block.h>
+#include <axis2_op.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_msg_info_headers.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+#include <rampart_username_token.h>
+#include <rampart_handler_util.h>
+#include <rampart_timestamp_token.h>
+#include <rampart_util.h>
+#include <rampart_sec_header_processor.h>
+#include <rampart_sec_processed_result.h>
+#include <rp_policy_creator.h>
+#include <rp_secpolicy_builder.h>
+#include <rampart_context.h>
+#include <rampart_engine.h>
+
+/*************************** Function headers *********************************/
+
+axis2_status_t AXIS2_CALL
+rampart_in_handler_invoke(struct axis2_handler *handler,
+        const axutil_env_t *env,
+        struct axis2_msg_ctx *msg_ctx);
+
+
+/**********************end of header functions ****************************/
+
+AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+rampart_in_handler_create(const axutil_env_t *env,
+         axutil_string_t *name)
+{
+    axis2_handler_t *handler = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    handler = axis2_handler_create(env);
+    if (!handler)
+    {
+        return NULL;
+    }
+#if 0
+    if (handler->ops)
+        handler->ops->invoke = rampart_in_handler_invoke;
+#else
+     axis2_handler_set_invoke(handler, env, rampart_in_handler_invoke);
+#endif
+    return handler;
+}
+
+
+axis2_status_t AXIS2_CALL
+rampart_in_handler_invoke(struct axis2_handler *handler,
+        const axutil_env_t *env,
+        struct axis2_msg_ctx *msg_ctx)
+{
+    axiom_soap_envelope_t *soap_envelope = NULL;
+    axiom_soap_header_t *soap_header = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    axiom_node_t *sec_node = NULL;
+    rampart_context_t *rampart_context = NULL;
+    axis2_bool_t serverside =  AXIS2_FALSE;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    /*since rampart in_handler is a global handler we should
+    first check whether the rampart module is engaged.If not engaged we 
+    should not process the message but return success.*/    
+
+    /*This method is implemented in rampart_handler utils.*/
+    if(!rampart_is_rampart_engaged(env,msg_ctx))
+    {
+        AXIS2_LOG_INFO(env->log, "[rampart][rampart_in_handler] Not intended for processing in Rampart");
+        return AXIS2_SUCCESS;
+    }
+ 
+
+    soap_envelope =  axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
+    if(!soap_envelope)
+    {
+       AXIS2_LOG_INFO(env->log, "[rampart][rampart_in_handler] No SOAP envelope found. ERROR");
+       return AXIS2_FAILURE;
+    }        
+        
+    soap_header = axiom_soap_envelope_get_header(soap_envelope, env);
+    if (!soap_header)
+    {
+        AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] No SOAP header found. ERROR");
+        /*No SOAP header, so no point of proceeding*/
+        return AXIS2_SUCCESS;
+    }
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "SOAP header found");
+
+    sec_node = rampart_get_security_token(env, msg_ctx, soap_header);
+    
+    if(!sec_node)
+    {
+        AXIS2_LOG_INFO(env->log, 
+		    "[rampart][rampart_in_handler] No security header element.");
+        return AXIS2_FAILURE;
+    }
+
+    status = rampart_set_security_processed_results_property(env, msg_ctx);
+    
+    if(AXIS2_FAILURE == status)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+				"[rampart][rampart_in_handler] Unable to set the security processed results");
+    }
+
+    rampart_context = rampart_engine_init(env,msg_ctx,AXIS2_TRUE);
+    if(!rampart_context)
+        return AXIS2_FAILURE;
+
+    status = rampart_shp_process_message(env, msg_ctx, rampart_context, 
+						soap_envelope, sec_node);
+    
+    if(status!=AXIS2_SUCCESS)
+    {
+        AXIS2_LOG_INFO(env->log,
+            "[rampart][rampart_in_handler] Security Header processing failed.");
+        rampart_engine_shutdown(env,rampart_context);
+        return status;
+    }        
+            
+    serverside = axis2_msg_ctx_get_server_side(msg_ctx,env);
+    /*We do not need rampart context to be freed in the server side*/
+    if(!serverside){
+    /*This method will free the rampart_context*/
+        status = rampart_engine_shutdown(env, rampart_context);
+    }        
+    
+    return status;
+}

Added: webservices/rampart/tags/c/0.90/src/handlers/rampart_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/handlers/rampart_out_handler.c?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/handlers/rampart_out_handler.c (added)
+++ webservices/rampart/tags/c/0.90/src/handlers/rampart_out_handler.c Thu Sep  6 03:48:44 2007
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <axis2_handler_desc.h>
+#include <axutil_qname.h>
+#include <axis2_svc.h>
+#include <axiom_soap.h>
+#include <rampart_util.h>
+#include <axis2_endpoint_ref.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+#include <rampart_username_token.h>
+#include <rampart_handler_util.h>
+#include <rampart_timestamp_token.h>
+#include <rampart_encryption.h>
+#include <rampart_sec_header_builder.h>
+#include <rp_policy_creator.h>
+#include <rp_secpolicy_builder.h>
+#include <rampart_context.h>
+#include <rampart_engine.h>
+
+/*********************** Function headers *********************************/
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rampart_out_handler_invoke(struct axis2_handler *handler,
+        const axutil_env_t * env,
+        struct axis2_msg_ctx *msg_ctx);
+
+
+
+/**********************end of header functions ****************************/
+
+AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+rampart_out_handler_create(const axutil_env_t *env,  axutil_string_t *name)
+{
+    axis2_handler_t *handler = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    handler = axis2_handler_create(env);
+    if (!handler)
+    {
+        return NULL;
+    }
+
+    /* set the base struct's invoke op */
+#if 0
+    if (handler->ops)
+        handler->ops->invoke = rampart_out_handler_invoke;
+#else
+    axis2_handler_set_invoke(handler, env, rampart_out_handler_invoke);
+#endif
+    return handler;
+}
+
+axis2_status_t AXIS2_CALL
+rampart_out_handler_invoke(struct axis2_handler * handler,
+        const axutil_env_t * env, axis2_msg_ctx_t * msg_ctx)
+{
+    axiom_soap_envelope_t *soap_envelope = NULL;
+    axiom_soap_header_t *soap_header = NULL;
+    axiom_node_t *soap_header_node = NULL;
+    axiom_element_t *soap_header_ele = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    rampart_context_t *rampart_context = NULL;
+    axis2_bool_t serverside = AXIS2_FALSE;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    serverside = axis2_msg_ctx_get_server_side(msg_ctx,env);
+    soap_envelope =  axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
+    if (!soap_envelope)
+    {
+        AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] No SOAP envelope found. ERROR");
+        return AXIS2_FAILURE;
+    }
+
+    /*We are checking for the soap header element*/
+    soap_header  = axiom_soap_envelope_get_header(soap_envelope, env);
+
+    if (!soap_header)
+    {
+        AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] No SOAP header found. ERROR");
+        /*No SOAP header, so no point of proceeding*/
+        return AXIS2_SUCCESS;
+    }
+
+    /*if the soap header is available then add the security header*/
+    if (soap_header)
+    {
+        soap_header_node = axiom_soap_header_get_base_node(soap_header, env);
+        if(!soap_header_node)
+        {
+            AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] Cannot Create the header node");
+            /*No SOAP header, so no point of proceeding*/
+            return AXIS2_SUCCESS;
+        }
+        soap_header_ele = (axiom_element_t *)axiom_node_get_data_element(soap_header_node,env);
+
+        /*since rampart out_handler is a global handler we should
+        first check whether the rampart module is engaged.If not we
+        should not process the message and return success.*/
+
+        /*This method is implemented in rampart_handler utils.*/
+        if(!rampart_is_rampart_engaged(env,msg_ctx))
+        {
+            AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] Not intended for processing in Rampart");            
+            return AXIS2_SUCCESS;
+        }
+
+        rampart_context = rampart_engine_init(env,msg_ctx,AXIS2_FALSE);
+        if(!rampart_context)
+            return AXIS2_FAILURE;
+
+        /*We call the security header builder*/
+        status = rampart_shb_build_message(env, msg_ctx, rampart_context, soap_envelope);
+        if(AXIS2_FAILURE == status){
+                AXIS2_LOG_INFO(env->log,
+                    "[rampart][rampart_out_handler] Security header building failed ERROR");
+                rampart_engine_shutdown(env,rampart_context);
+                return AXIS2_FAILURE;
+        }
+        /*status = rampart_engine_shutdown(env,rampart_context);*/
+    }
+    return status;
+}

Added: webservices/rampart/tags/c/0.90/src/omxmlsec/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/src/omxmlsec/Makefile.am?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/src/omxmlsec/Makefile.am (added)
+++ webservices/rampart/tags/c/0.90/src/omxmlsec/Makefile.am Thu Sep  6 03:48:44 2007
@@ -0,0 +1,20 @@
+SUBDIRS = tokens openssl c14n
+lib_LTLIBRARIES = libomxmlsec.la
+
+libomxmlsec_la_SOURCES = ctx.c  buffer.c key.c cipher.c error.c axis2_utils.c axiom.c \
+                         iv.c xml_encryption.c encryption.c\
+						utility.c asym_ctx.c x509_cert.c key_mgr.c sign_part.c sign_ctx.c \
+						xml_signature.c signature.c transform.c transforms_factory.c xml_key_processor.c \
+						xml_key_info_builder.c
+						
+
+libomxmlsec_la_LIBADD  = -lssl\
+			${AXIS2C_HOME}/lib \
+			tokens/liboxstokens.la \
+			openssl/libomopenssl.la \
+			c14n/liboxsc14n.la \
+			-lcrypto 
+
+INCLUDES = -I$(top_builddir)/include \
+			-I ../../include \
+			@AXIS2INC@