You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by hi...@apache.org on 2010/12/02 01:46:59 UTC
svn commit: r1041232 - in
/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide: samples.xml
samples/sample200.xml samples/sample201.xml
Author: hiranya
Date: Thu Dec 2 00:46:59 2010
New Revision: 1041232
URL: http://svn.apache.org/viewvc?rev=1041232&view=rev
Log:
Sample 200, 201
Modified:
synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml
synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample200.xml
synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample201.xml
Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml?rev=1041232&r1=1041231&r2=1041232&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples.xml Thu Dec 2 00:46:59 2010
@@ -92,8 +92,8 @@
<subsection name="QoS Addition/Removal with Proxy Services">
<p>
<ul>
- <li><a href="">Sample 200: Using WS-Security with policy attachments for proxy services</a></li>
- <li><a href="">Sample 201: Reliable message exchange between the client and proxy services using WS-ReliableMessaging</a></li>
+ <li><a href="samples/sample200.html">Sample 200: Engaging WS-Security on proxy services</a></li>
+ <li><a href="samples/sample201.html">Sample 201: Reliable communication between the client and proxy services using WS-ReliableMessaging</a></li>
</ul>
</p>
</subsection>
Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample200.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample200.xml?rev=1041232&r1=1041231&r2=1041232&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample200.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample200.xml Thu Dec 2 00:46:59 2010
@@ -23,7 +23,7 @@
<title>Apache Synapse - Sample 200</title>
</properties>
<body>
- <section name="Sample 200: ">
+ <section name="Sample 200: Engaging WS-Security on Proxy Services">
<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse">
<localEntry key="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/>
@@ -49,13 +49,18 @@
</definitions></div>
<subsection name="Objective">
<p>
-
+ Demonstrates how to secure a proxy service using WS-Security and WS-Policy
+ standards
</p>
</subsection>
<subsection name="Pre-requisites">
<p>
<ul>
<li>
+ Download and install the Java Cryptography Extension (JCE) unlimited
+ strength policy files for your JDK
+ </li>
+ <li>
Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
</li>
<li>
@@ -69,11 +74,27 @@
</p>
</subsection>
<subsection name="Executing the Client">
- <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
-
- <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
-
- <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+ <p>
+ The proxy service expects to receive a signed and encrypted message as specified
+ by the security policy. Please see Apache Rampart and Axis2 documentation on the
+ format of the policy file. The element 'enableSec' specifies that Apache Rampart
+ should be engaged on this proxy service. Hence if Rampart rejects any request
+ messages that does not conform to the specified policy, those messages will
+ never reach the 'inSequence' to be processed. To execute the client, send a stock
+ quote request to the proxy service, and sign and encrypt the request by specifying
+ the client side security policy as follows:
+ </p>
+ <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</div>
+ <p>
+ By following through the debug logs or TCPMon output, you can see that the
+ request received by the proxy service is signed and encrypted. Also, looking up
+ the WSDL of the proxy service by requesting the URL http://localhost:8280/services/StockQuoteProxy?wsdl
+ reveals that the security policy is attached to the provided base WSDL. When
+ sending the message to the backend service, you can verify that the security
+ headers are removed. The response received from Axis2 does not use WS-Security,
+ but the response forwarded back to the client is signed and encrypted as
+ expected by the client.
+ </p>
</subsection>
</section>
<p><a href="../samples.html">Back to Catalog</a></p>
Modified: synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample201.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample201.xml?rev=1041232&r1=1041231&r2=1041232&view=diff
==============================================================================
--- synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample201.xml (original)
+++ synapse/trunk/scratch/hiranya/website/src/site/xdoc/userguide/samples/sample201.xml Thu Dec 2 00:46:59 2010
@@ -23,7 +23,7 @@
<title>Apache Synapse - Sample 201</title>
</properties>
<body>
- <section name="Sample 201: ">
+ <section name="Sample 201: Reliable Communication Between the Client and Proxy Services Using WS-ReliableMessaging">
<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="StockQuoteProxy">
@@ -46,7 +46,8 @@
</definitions></div>
<subsection name="Objective">
<p>
-
+ Show case how to engage WS-ReliableMessaging on proxy services so that the
+ communication between client and the proxy service is reliable
</p>
</subsection>
<subsection name="Pre-requisites">
@@ -66,11 +67,21 @@
</p>
</subsection>
<subsection name="Executing the Client">
- <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
-
- <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
-
- <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+ <p>
+ In the above configuration, a proxy service is created with WS-RM enabled using
+ the <enableRM/> tag. Therefore, this proxy service is capable of
+ communicating with a WS-RM client. It also removes the WS-RM headers in the
+ inSequence before the message is sent to the backend server. This is required as
+ the reliable messaging is applicable only between the client and Synapse. Now
+ start the client with WS-RM as follows:
+ </p>
+ <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dwsrm=true</div>
+ <p>
+ In this case, client sends a WS-RM enabled request to Synapse where Synapse sends
+ normal requests to the server. This can be observed by examining the wire level
+ messages between the client and Synapse. These messages would be similar to the
+ wire level messages shown in <a href="sample101.html">sample 101</a>.
+ </p>
</subsection>
</section>
<p><a href="../samples.html">Back to Catalog</a></p>