Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_390.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_390.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_390.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_390.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,56 @@ +<!-- + ~ 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. + --> + <!-- introduction to URL source properties, registry based properties and the XQuery mediator --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --> + <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/conf/sample/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milli seconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + <localEntry key="xquery-key-req" + src="file:repository/conf/sample/resources/xquery/xquery_req.xq"/> + <proxy name="StockQuoteProxy"> + <target> + <inSequence> + <xquery key="xquery-key-req"> + <variable name="payload" type="ELEMENT"/> + </xquery> + <send> + <endpoint> + <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/> + </endpoint> + </send> + </inSequence> + <outSequence> + <out> + <xquery key="xquery/xquery_res.xq"> + <variable name="payload" type="ELEMENT"/> + </xquery> + <send/> + </out> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> + +</definitions> \ No newline at end of file
Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_391.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_391.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_391.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_391.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,52 @@ +<!-- + ~ 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. + --> + <!-- introduction to URL source properties, registry based properties and the XQuery mediator --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --> + <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/conf/sample/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milli seconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + <proxy name="StockQuoteProxy"> + <target> + <inSequence> + <send> + <endpoint> + <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/> + </endpoint> + </send> + </inSequence> + <outSequence> + <out> + <xquery key="xquery/xquery_commisson.xq"> + <variable name="payload" type="ELEMENT"></variable> + <variable name="commission" type="ELEMENT" key="misc/commission.xml"></variable> + </xquery> + <send/> + </out> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> + +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_4.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,72 @@ +<!-- + ~ 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. + --> + +<!-- introduction to error handling --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <!-- the default fault handling sequence used by Synapse - named 'fault' --> + <sequence name="fault"> + <log level="custom"> + <property name="text" value="An unexpected error occured"/> + <property name="message" expression="get-property('ERROR_MESSAGE')"/> + </log> + <drop/> + </sequence> + + <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')"/> + <!--<property name="detail" expression="get-property('ERROR_DETAIL')"/>--> + </log> + <drop/> + </sequence> + + <sequence name="main"> + <in> + <switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples/xsd"> + <case regex="IBM"> + <send> + <endpoint><address uri="http://localhost:9000/soap/SimpleStockQuoteService"/></endpoint> + </send> + </case> + <case regex="MSFT"> + <send> + <endpoint key="bogus"/> + </send> + </case> + <case regex="SUN"> + <sequence key="sunSequence"/> + </case> + </switch> + <drop/> + </in> + + <out> + <send/> + </out> + </sequence> + + <sequence name="sunSequence" onError="sunErrorHandler"> + <send> + <endpoint key="sunPort"/> + </send> + </sequence> + +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_400.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_400.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_400.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_400.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,54 @@ +<!-- + ~ 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. + --> + <!-- Advanced message splitting and aggregating the responses --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <proxy name="SplitAggregateProxy"> + <target> + <inSequence> + <iterate expression="//m0:getQuote/m0:request" preservePayload="true" + attachPath="//m0:getQuote" + xmlns:m0="http://services.samples/xsd"> + <target> + <sequence> + <send> + <endpoint> + <address + uri="http://localhost:9000/soap/SimpleStockQuoteService"/> + </endpoint> + </send> + </sequence> + </target> + </iterate> + </inSequence> + <outSequence> + <aggregate> + <onComplete expression="//m0:getQuoteResponse" + xmlns:m0="http://services.samples/xsd"> + <send/> + </onComplete> + <invalidate> + <log level="full"/> + <drop/> + </invalidate> + </aggregate> + </outSequence> + </target> + </proxy> +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_5.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,38 @@ +<!-- introduction to error handling --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="myFaultHandler"> + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason expression="get-property('ERROR_MESSAGE')"/> + </makefault> + + <property name="RESPONSE" value="true"/> + <header name="To" expression="get-property('ReplyTo')"/> + <send/> + </sequence> + + <sequence name="main" onError="myFaultHandler"> + <in> + <switch source="//m0:getQuote/m0:request/m0:symbol" + xmlns:m0="http://services.samples/xsd"> + <case regex="MSFT"> + <send> + <endpoint><address uri="http://bogus:9000/soap/NonExistentStockQuoteService"/></endpoint> + </send> + </case> + <case regex="SUN"> + <send> + <endpoint><address uri="http://localhost:9009/soap/NonExistentStockQuoteService"/></endpoint> + </send> + </case> + </switch> + <drop/> + </in> + + <out> + <send/> + </out> + </sequence> + +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_50.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_50.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_50.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_50.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,31 @@ +<!-- + ~ 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. + --> +<!-- POX to SOAP conversion --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <!-- filtering of messages with XPath and regex matches --> + <filter source="get-property('To')" regex=".*/StockQuote.*"> + <send> + <endpoint> + <address uri="http://localhost:9000/soap/SimpleStockQuoteService" format="soap11"/> + </endpoint> + </send> + <drop/> + </filter> + <send/> +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_51.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_51.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_51.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_51.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,48 @@ +<!-- + ~ 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. + --> +<!-- 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:9000/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:9000/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> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_52.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_52.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_52.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_52.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,70 @@ +<!-- + ~ 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. + --> + +<!-- demontrates simple session less load balancing between 3 endpoints --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + <loadbalance> + <endpoint> + <address uri="http://localhost:9001/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9003/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + </loadbalance> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_53.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_53.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_53.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_53.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,70 @@ +<!-- + ~ 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. + --> + +<!-- Demontrates failover sending among 3 endpoints. --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + <failover> + <endpoint> + <address uri="http://localhost:9001/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9003/soap/LBService1"> + <enableAddressing/> + <suspendDurationOnFailure>60</suspendDurationOnFailure> + </address> + </endpoint> + </failover> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_54.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_54.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_54.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_54.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,72 @@ +<!-- + ~ 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. + --> + +<!-- Demontrates session affinity load balancing between 3 endpoints. We are using client + initiated session for this sample. --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + <!-- specify the session as the simple client session provided by Synapse for + testing purpose --> + <session type="simpleClientSession"/> + + <loadbalance> + <endpoint> + <address uri="http://localhost:9001/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9003/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + </loadbalance> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_55.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_55.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_55.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_55.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,85 @@ +<!-- + ~ 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. + --> + +<!-- Demontrates the session affinity load balancing between fail over endpoints. If endpoint servers +maintain session specific data, such data have to replicated among the failover endpoints. --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + <!-- specify the session as the simple client session provided by Synapse for + testing purpose --> + <session type="simpleClientSession"/> + + <loadbalance> + <endpoint> + <failover> + <endpoint> + <address uri="http://localhost:9001/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + </failover> + </endpoint> + <endpoint> + <failover> + <endpoint> + <address uri="http://localhost:9003/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9004/soap/LBService1"> + <enableAddressing/> + </address> + </endpoint> + </failover> + </endpoint> + </loadbalance> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_56.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_56.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_56.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_56.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,72 @@ +<!-- + ~ 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. + --> + +<!-- Demontrates session affinity load balancing between 3 endpoints. We are using client + initiated session for this sample. --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + + <!-- bind to HTTP sessions based on HTTP cookies --> + <session type="http"/> + + <loadbalance> + <endpoint> + <address uri="http://localhost:9001/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9003/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + </loadbalance> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_57.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_57.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_57.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_57.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,85 @@ +<!-- + ~ 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. + --> + +<!-- Demontrates the session affinity load balancing between fail over endpoints. If endpoint servers +maintain session specific data, such data have to replicated among the failover endpoints. --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main" onError="errorHandler"> + <in> + <send> + <endpoint> + + <!-- bind to HTTP sessions based on HTTP cookies --> + <session type="http"/> + + <loadbalance> + <endpoint> + <failover> + <endpoint> + <address uri="http://localhost:9001/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9002/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + </failover> + </endpoint> + <endpoint> + <failover> + <endpoint> + <address uri="http://localhost:9003/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + <endpoint> + <address uri="http://localhost:9004/soap/LBService2"> + <enableAddressing/> + </address> + </endpoint> + </failover> + </endpoint> + </loadbalance> + </endpoint> + </send> + </in> + + <out> + <!-- Send the messages where they have been sent (i.e. implicit To EPR) --> + <send/> + </out> + </sequence> + + <sequence name="errorHandler"> + + <makefault> + <code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/> + </makefault> + + <header name="To" action="remove"/> + <property name="RESPONSE" value="true"/> + + <send/> + </sequence> + +</definitions> Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_58.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_58.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_58.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_58.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,37 @@ +<!-- + ~ 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. + --> + <!-- demonstrates wsdl endpoint --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main"> + <in> + <send> + <!-- get epr from the given wsdl --> + <endpoint> + <wsdl uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl" service="SimpleStockQuoteService" port="SimpleStockQuoteServiceSOAP11port_http"/> + </endpoint> + </send> + </in> + + <out> + <send/> + </out> + </sequence> + +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_6.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,26 @@ +<!-- + ~ 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. + --> + +<!-- illustration of header, in (out) mediators --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <in> + <header name="To" value="http://localhost:9000/soap/SimpleStockQuoteService"/> + </in> + <send/> +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_7.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,59 @@ +<!-- + ~ 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. + --> +<!-- introduction of static inline XML properties and the validation mediator --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <localEntry key="validate_schema"> + <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns="http://services.samples/xsd" elementFormDefault="qualified" + attributeFormDefault="unqualified" + targetNamespace="http://services.samples/xsd"> + <xs:element name="getQuote"> + <xs:complexType> + <xs:sequence> + <xs:element name="request"> + <xs:complexType> + <xs:sequence> + <xs:element name="stocksymbol" type="xs:string"/> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:schema> + </localEntry> + + <in> + <validate> + <schema key="validate_schema"/> + <on-fail> + <!-- if the request does not validate againt schema throw a fault --> + <makefault> + <code value="tns:Receiver" + xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/> + <reason value="Invalid custom quote request"/> + </makefault> + <property name="RESPONSE" value="true"/> + <header name="To" expression="get-property('ReplyTo')"/> + </on-fail> + </validate> + </in> + <send/> +</definitions> \ No newline at end of file Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_8.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,43 @@ +<!-- + ~ 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. + --> +<!-- introduction to URL source properties, registry based properties and the XSLT mediator --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + + <!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --> + <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/conf/sample/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milli seconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + <!-- 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 Added: webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml?rev=591078&view=auto ============================================================================== --- webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml (added) +++ webservices/synapse/trunk/java/repository/conf/sample/synapse_sample_9.xml Thu Nov 1 09:43:01 2007 @@ -0,0 +1,27 @@ +<!-- + ~ 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. + --> +<!-- introduction dynamic sequences --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
