You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2010/07/14 11:24:20 UTC

svn commit: r963988 - in /synapse/trunk/java/repository/conf/sample: synapse_sample_4.xml synapse_sample_5.xml synapse_sample_6.xml synapse_sample_7.xml synapse_sample_8.xml synapse_sample_9.xml

Author: ruwan
Date: Wed Jul 14 09:24:19 2010
New Revision: 963988

URL: http://svn.apache.org/viewvc?rev=963988&view=rev
Log:
migrating samples 4 to 9

Modified:
    synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml
    synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml
    synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml
    synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml
    synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml
    synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -26,10 +27,10 @@
             <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')"/>
@@ -40,10 +41,12 @@
 
     <sequence name="main">
         <in>
-            <switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples">
+            <switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol">
                 <case regex="IBM">
                     <send>
-                        <endpoint><address uri="http://localhost:9000/services/SimpleStockQuoteService"/></endpoint>
+                        <endpoint>
+                            <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
+                        </endpoint>
                     </send>
                 </case>
                 <case regex="MSFT">
@@ -52,7 +55,7 @@
                     </send>
                 </case>
                 <case regex="SUN">
-					<sequence key="sunSequence"/>
+                    <sequence key="sunSequence"/>
                 </case>
             </switch>
             <drop/>
@@ -63,10 +66,10 @@
         </out>
     </sequence>
 
-	<sequence name="sunSequence" onError="sunErrorHandler">
+    <sequence name="sunSequence" onError="sunErrorHandler">
         <send>
             <endpoint key="sunPort"/>
         </send>
-	</sequence>
+    </sequence>
 
-</definitions>
\ No newline at end of file
+</definitions>

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -22,7 +23,7 @@
 
     <sequence name="myFaultHandler">
         <makefault response="true">
-            <code value="tns:Server" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"/>
+            <code xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" value="tns:Server"/>
             <reason expression="get-property('ERROR_MESSAGE')"/>
         </makefault>
         <send/>
@@ -30,16 +31,19 @@
 
     <sequence name="main" onError="myFaultHandler">
         <in>
-            <switch source="//m0:getQuote/m0:request/m0:symbol"
-                    xmlns:m0="http://services.samples">
+            <switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol">
                 <case regex="MSFT">
                     <send>
-                        <endpoint><address uri="http://bogus:9000/services/NonExistentStockQuoteService"/></endpoint>
+                        <endpoint>
+                            <address uri="http://bogus:9000/services/NonExistentStockQuoteService"/>
+                        </endpoint>
                     </send>
                 </case>
                 <case regex="SUN">
                     <send>
-                        <endpoint><address uri="http://localhost:9009/services/NonExistentStockQuoteService"/></endpoint>
+                        <endpoint>
+                            <address uri="http://localhost:9009/services/NonExistentStockQuoteService"/>
+                        </endpoint>
                     </send>
                 </case>
             </switch>
@@ -51,4 +55,4 @@
         </out>
     </sequence>
 
-</definitions>
\ No newline at end of file
+</definitions>

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -19,8 +20,12 @@
 
 <!-- Manipulating SOAP headers, and filtering incoming and outgoing messages -->
 <definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration">
-    <in>
-        <header name="To" value="http://localhost:9000/services/SimpleStockQuoteService"/>
-    </in>
-    <send/>
-</definitions>
\ No newline at end of file
+
+    <sequence name="main">
+        <in>
+            <header name="To" value="http://localhost:9000/services/SimpleStockQuoteService"/>
+        </in>
+        <send/>
+    </sequence>
+
+</definitions>

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -16,15 +17,30 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-    
+
 <!-- Introduction to local Registry entries and using Schema validation -->
 <definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration">
 
+    <sequence name="main">
+        <in>
+            <validate>
+                <schema key="validate_schema"/>
+                <on-fail>
+                    <!-- if the request does not validate againt schema throw a fault -->
+                    <makefault response="true">
+                        <code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/>
+                        <reason value="Invalid custom quote request"/>
+                    </makefault>
+                </on-fail>
+            </validate>
+        </in>
+        <send/>
+    </sequence>
+
     <localEntry key="validate_schema">
         <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-                    xmlns="http://services.samples" elementFormDefault="qualified"
-                    attributeFormDefault="unqualified"
-                    targetNamespace="http://services.samples">
+                   xmlns="http://services.samples" elementFormDefault="qualified"
+                   attributeFormDefault="unqualified" targetNamespace="http://services.samples">
             <xs:element name="getQuote">
                 <xs:complexType>
                     <xs:sequence>
@@ -41,18 +57,4 @@
         </xs:schema>
     </localEntry>
 
-    <in>
-        <validate>
-            <schema key="validate_schema"/>
-            <on-fail>
-                <!-- if the request does not validate againt schema throw a fault -->
-                <makefault response="true">
-                    <code value="tns:Receiver"
-                            xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
-                    <reason value="Invalid custom quote request"/>
-                </makefault>
-            </on-fail>
-        </validate>
-    </in>
-    <send/>
-</definitions>
\ No newline at end of file
+</definitions>

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -16,7 +17,7 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-    
+
 <!-- Introduction to static and dynamic registry resources, and using XSLT transformations -->
 <definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration">
 
@@ -31,14 +32,17 @@
     <!-- define the request processing XSLT resource as a static URL source -->
     <localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/>
 
-    <in>
-        <!-- transform the custom quote request into a standard quote requst expected by the service -->
-        <xslt key="xslt-key-req"/>
-    </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 -->
-        <xslt key="transform/transform_back.xslt"/>
-    </out>
-	<send/>
-</definitions> 
\ No newline at end of file
+    <sequence name="main">
+        <in>
+            <!-- transform the custom quote request into a standard quote requst expected by the service -->
+            <xslt key="xslt-key-req"/>
+        </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 -->
+            <xslt key="transform/transform_back.xslt"/>
+        </out>
+        <send/>
+    </sequence>
+
+</definitions>

Modified: synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml?rev=963988&r1=963987&r2=963988&view=diff
==============================================================================
--- synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml (original)
+++ synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml Wed Jul 14 09:24:19 2010
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~  Licensed to the Apache Software Foundation (ASF) under one
   ~  or more contributor license agreements.  See the NOTICE file
@@ -16,13 +17,15 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-    
+
 <!-- Introduction to dynamic sequences with the Registry -->
 <definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration">
+
     <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry">
         <parameter name="root">file:./repository/conf/sample/resources/</parameter>
         <parameter name="cachableDuration">15000</parameter>
     </registry>
 
     <sequence key="sequence/dynamic_seq_1.xml"/>
-</definitions> 
\ No newline at end of file
+
+</definitions>