You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by as...@apache.org on 2007/04/24 10:47:52 UTC
svn commit: r531833 - in /webservices/synapse/trunk/java: pom.xml
repository/conf/sample/synapse_sample_12.xml
repository/conf/sample/synapse_sample_51.xml
src/site/resources/Synapse_Samples.html
Author: asankha
Date: Tue Apr 24 01:47:51 2007
New Revision: 531833
URL: http://svn.apache.org/viewvc?view=rev&rev=531833
Log:
fix revisions for neethi and axiom
Added:
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_51.xml
- copied unchanged from r531549, webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_12.xml
Removed:
webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_12.xml
Modified:
webservices/synapse/trunk/java/pom.xml
webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
Modified: webservices/synapse/trunk/java/pom.xml
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/pom.xml?view=diff&rev=531833&r1=531832&r2=531833
==============================================================================
--- webservices/synapse/trunk/java/pom.xml (original)
+++ webservices/synapse/trunk/java/pom.xml Tue Apr 24 01:47:51 2007
@@ -619,7 +619,7 @@
<!-- Axis2 1.2 and its dependencies -->
<axis2.version>1.2-SNAPSHOT</axis2.version>
- <axiom.version>SNAPSHOT</axiom.version>
+ <axiom.version>1.2.4</axiom.version>
<xml_schema.version>1.3.1</xml_schema.version>
<xml_apis.version>1.3.03</xml_apis.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
@@ -631,9 +631,8 @@
<addressing.version>1.2-SNAPSHOT</addressing.version>
<rampart.version>SNAPSHOT</rampart.version>
<sandesha2.version>1.1</sandesha2.version>
- <neethi.version>SNAPSHOT</neethi.version>
+ <neethi.version>2.0.1</neethi.version>
<wss4j.version>SNAPSHOT</wss4j.version>
- <xmlsec.version>1.3.0</xmlsec.version>
<xerces.version>2.8.1</xerces.version>
<xalan.version>2.7.0</xalan.version>
Modified: webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html?view=diff&rev=531833&r1=531832&r2=531833
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html (original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html Tue Apr 24 01:47:51 2007
@@ -21,15 +21,60 @@
<meta http-equiv="content-type" content="">
<title></title>
<style type="text/css">
- pre {
- font-family: Georgia, "verdena",verdena, serif;
- font-size:10;
- border-style:solid 1px #333;
- color: #000;
- padding-left:10px;
- padding-right:10px;
- background-color: #cdcdcd;
- }
+
+pre {
+ padding: 0px;
+ margin-top: 5px;
+ margin-left: 15px;
+ margin-bottom: 5px;
+ margin-right: 5px;
+ text-align: left;
+ background-color: #f0f0f0;
+ padding: 3px;
+ border: 1px dashed #3c78b5;
+ font-size: 11px;
+ font-family: Courier;
+ margin: 10px;
+ line-height: 13px;
+}
+h1 {
+font-size: 24px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+color: #003366;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 36px 0px 4px 0px;
+}
+
+h2 {
+font-size: 18px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+ border-bottom: 1px solid #3c78b5;
+padding: 2px;
+margin: 27px 0px 4px 0px;
+}
+
+h3 {
+font-size: 14px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 21px 0px 4px 0px;
+}
+
+h4 {
+font-size: 12px;
+line-height: normal;
+font-weight: bold;
+background-color: #f0f0f0;
+padding: 2px;
+margin: 18px 0px 4px 0px;
+}
</style>
</head>
@@ -140,11 +185,9 @@
example.</p>
<ol>
<li>Smart Client mode</li>
- <pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/
- </pre>
+ <pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ </pre>
<li>Using Synapse as a HTTP Proxy</li>
<pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dprxurl=http://localhost:8080/</pre>
- <pre></pre>
<li>Dumb Client</li>
<p>See sample # 1</p>
@@ -363,15 +406,15 @@
<property name="text" value="An unexpected error occured"/>
<property name="message" expression="get-property('ERROR_MESSAGE')"/>
</log>
-<drop/>
+ <drop/>
</sequence>
-<sequence name="sunErrorHandler">
+ <sequence name="sunErrorHandler">
<log level="custom">
<property name="text" value="An unexpected error occured for stock SUN"/>
<property name="message" expression="get-property('ERROR_MESSAGE')"/>
</log>
-<drop/>
+ <drop/>
</sequence>
<!-- default message handling sequence used by Synapse - named 'main' -->
@@ -441,9 +484,8 @@
invoked, and it specifies 'sunErrorHandler' as its error handler. Hence when
the send fails, now you could see the proper error handler invocation and the
custom error message as follows:</p>
-<pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ -Dsymbol=SUN
-
-[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator <sunSequence> :: mediate()
+<pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ -Dsymbol=SUN</pre>
+<pre>[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator <sunSequence> :: mediate()
[HttpServerWorker-1] DEBUG SequenceMediator - Setting the onError handler for the sequence
[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence <SequenceMediator> :: mediate()
[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
@@ -509,14 +551,14 @@
<p>Returns:</p>
<pre><soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapenv:Client</faultcode>
-<faultstring>java.net.UnknownHostException: bogus</faultstring><detail /></soapenv:Fault></pre>
+ <faultstring>java.net.UnknownHostException: bogus</faultstring><detail /></soapenv:Fault></pre>
<p>And</p>
<pre>ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8080/ -Dsymbol=SUN</pre>
<p>Returns:</p>
<pre><soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapenv:Client</faultcode>
-<faultstring>java.net.ConnectException: Connection refused</faultstring><detail /></soapenv:Fault></pre>
+ <faultstring>java.net.ConnectException: Connection refused</faultstring><detail /></soapenv:Fault></pre>
<h2><a name="Sample6">Sample 6:</a></h2>
<pre><definitions xmlns="http://ws.apache.org/ns/synapse">
@@ -631,10 +673,10 @@
</in>
<out>
<!-- transform the standard response back into the custom format the client expects -->
- <!-- the key is looked up in the remote registry and loaded as a 'dynamic' registry resource -->
+ <!-- the key is looked up in the remote registry and loaded as a 'dynamic' registry resource -->
<xslt key="transform/transform_back.xslt"/>
</out>
-<send/>
+ <send/>
</definitions></pre>
<p><strong>Objective: Introduction to static and dynamic registry resources
@@ -721,8 +763,6 @@
detected so that changes could be reloaded without restarting the Synapse
instance.</p>
-<p></p>
-
<h2><a name="Sample9">Sample 9:</a></h2>
<pre><!-- introduction dynamic sequences -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
@@ -828,7 +868,7 @@
<h2><a name="Sample11">Sample 11:</a></h2>
<pre><!-- a full registry based configuration -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
-<registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
+ <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
<parameter name="root">file:./repository/conf/sample/resources/</parameter>
<parameter name="cachableDuration">15000</parameter>
</registry>
@@ -859,71 +899,9 @@
<send/>
</definitions></pre>
-<h2>Sample 12:</h2>
-<pre><!-- MTOM and SwA and message properties to correlate requests and responses -->
-<definitions xmlns="http://ws.apache.org/ns/synapse">
- <in>
- <filter source="get-property('Action')" regex="urn:uploadFileUsingMTOM">
- <property name="example" value="mtom"/>
- <send>
- <endpoint>
- <address uri="http://localhost:9001/soap/MTOMSwASampleService" optimize="mtom"/>
- </endpoint>
- </send>
- </filter>
- <filter source="get-property('Action')" regex="urn:uploadFileUsingSwA">
- <property name="example" value="swa"/>
- <send>
- <endpoint>
- <address uri="http://localhost:9001/soap/MTOMSwASampleService" optimize="swa"/>
- </endpoint>
- </send>
- </filter>
- </in>
- <out>
- <filter source="get-property('example')" regex="mtom">
- <property name="enableMTOM" value="true" scope="axis2"/>
- </filter>
- <filter source="get-property('example')" regex="swa">
- <property name="enableSwA" value="true" scope="axis2"/>
- </filter>
- <send/>
- </out>
-</definitions></pre>
-
-<p><strong>Objective: MTOM and SwA optimizations and request/response
-correlation</strong></p>
-
-<p><strong>Pre-Requisites:</strong><br>
-Start the Synapse configuration numbered 10: i.e. synapse -sample 10<br>
-Start the Axis2 server and deploy the MTOMSwASampleService if not already
-done</p>
-
-<p>Execute the 'ant optimizeclient' specifying MTOM optimization as
-follows:</p>
-<pre>ant optimizeclient -Dopt_mode=mtom</pre>
-
-<p>The configuration now sets a local message context property, and forwards
-the message to 'http://localhost:9000/soap/MTOMSwASampleService' optimizing
-bindary content as MTOM. By sending this message through TCPMon you would be
-able to see the actual message sent over the http transport if required. Thus
-during response processing, by checking the local message property Synapse
-could identify the past information about the current message context, and
-uses this knowledge to transform the response back to the client in the same
-format as the original request.</p>
-
-<p>When the client executes successfully, it will upload a file containging
-the ASF logo and receive its response back again and save it into a temporary
-file.</p>
-<pre>[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as MTOM</pre>
-<pre>[java] Saved response to file : /tmp/mtom-36877.gif</pre>
-
-<p>Next try SwA as:</p>
-<pre>ant optimizeclient -Dopt_mode=swa
-[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as SwA
-[java] Saved response to file : /tmp/swa-47549.gif</pre>
+<p></p>
-<h1>WS-Security</h1>
+<h1>Endpoints</h1>
<p><a name="WSSecurity" id="WSSecurity"></a></p>
@@ -932,8 +910,7 @@
<!-- Connecting to endpoints with WS-Security for outgoing messages -->
<definitions>
- <set-property name="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/>
-
+ <set-property name="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/>
<endpoint name="secure" address="http://localhost:9000/axis2/services/SecureStockQuoteService3">
<enableSec policy="sec_policy"/>
<enableAddressing/>
@@ -990,9 +967,73 @@
<p></p>
-<p></p>
+<h2>Sample 51:</h2>
+<pre><!-- MTOM and SwA and message properties to correlate requests and responses -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+ <in>
+ <filter source="get-property('Action')" regex="urn:uploadFileUsingMTOM">
+ <property name="example" value="mtom"/>
+ <send>
+ <endpoint>
+ <address uri="http://localhost:9001/soap/MTOMSwASampleService" optimize="mtom"/>
+ </endpoint>
+ </send>
+ </filter>
+ <filter source="get-property('Action')" regex="urn:uploadFileUsingSwA">
+ <property name="example" value="swa"/>
+ <send>
+ <endpoint>
+ <address uri="http://localhost:9001/soap/MTOMSwASampleService" optimize="swa"/>
+ </endpoint>
+ </send>
+ </filter>
+ </in>
+ <out>
+ <filter source="get-property('example')" regex="mtom">
+ <property name="enableMTOM" value="true" scope="axis2"/>
+ </filter>
+ <filter source="get-property('example')" regex="swa">
+ <property name="enableSwA" value="true" scope="axis2"/>
+ </filter>
+ <send/>
+ </out>
+</definitions></pre>
-<p></p>
+<p><strong>Objective: MTOM and SwA optimizations and request/response
+correlation</strong></p>
+
+<p><strong>Pre-Requisites:</strong><br>
+Start the Synapse configuration numbered 10: i.e. synapse -sample 51<br>
+Start the Axis2 server and deploy the MTOMSwASampleService if not already
+done</p>
+
+<p>Execute the 'ant optimizeclient' specifying MTOM optimization as
+follows:</p>
+<pre>ant optimizeclient -Dopt_mode=mtom</pre>
+
+<p>The configuration now sets a local message context property, and forwards
+the message to 'http://localhost:9000/soap/MTOMSwASampleService' optimizing
+bindary content as MTOM. By sending this message through TCPMon you would be
+able to see the actual message sent over the http transport if required. Thus
+during response processing, by checking the local message property Synapse
+could identify the past information about the current message context, and
+uses this knowledge to transform the response back to the client in the same
+format as the original request.</p>
+
+<p>When the client executes successfully, it will upload a file containging
+the ASF logo and receive its response back again and save it into a temporary
+file.</p>
+<pre>[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as MTOM</pre>
+<pre>[java] Saved response to file : /tmp/mtom-36877.gif</pre>
+
+<p>Next try SwA as:</p>
+<pre>ant optimizeclient -Dopt_mode=swa
+[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as SwA
+[java] Saved response to file : /tmp/swa-47549.gif</pre>
+
+<p>By using TCPMon and sending the message through it, one can inspect that
+the requests and responses sent are indeed MTOM optimized or sent as http
+attachments.</p>
<h1><a name="ProxyServices">Proxy services</a></h1>
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org