Author: indika Date: Wed Jul 29 09:46:13 2009 New Revision: 42110 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=42110
Log: updates rule versions and samples Modified: trunk/esb/java/modules/distribution/pom.xml trunk/esb/java/modules/distribution/src/main/assembly/dist.xml trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/advanced_rule_base.xml trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/always_ibm.xml trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/commission_rule.xml trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.drl trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.xml trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_back_rule.drl trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_forward_rule.drl trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_600.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_601.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_602.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_603.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_604.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_605.xml trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_606.xml Modified: trunk/esb/java/modules/distribution/pom.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/distribution/pom.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/distribution/pom.xml (original) +++ trunk/esb/java/modules/distribution/pom.xml Wed Jul 29 09:46:13 2009 @@ -533,14 +533,24 @@ <!--Rule mediator dependency --> <dependency> - <groupId>org.wso2.rule</groupId> - <artifactId>wso2rule-core</artifactId> - <version>1.0.0</version> + <groupId>org.wso2.carbon.rule</groupId> + <artifactId>org.wso2.carbon.rule.core</artifactId> + <version>2.0.0.SNAPSHOT</version> </dependency> <dependency> - <groupId>org.wso2.rule</groupId> - <artifactId>wso2rule-mediator</artifactId> - <version>1.0.0</version> + <groupId>org.wso2.carbon.rule</groupId> + <artifactId>org.wso2.carbon.rule.engine.drools</artifactId> + <version>2.0.0.SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.wso2.carbon.rule</groupId> + <artifactId>org.wso2.carbon.rule.engine.jsr94</artifactId> + <version>2.0.0.SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.wso2.carbon.rule</groupId> + <artifactId>org.wso2.carbon.rule.mediator</artifactId> + <version>2.0.0.SNAPSHOT</version> </dependency> <!--Drools dependency--> Modified: trunk/esb/java/modules/distribution/src/main/assembly/dist.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/distribution/src/main/assembly/dist.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/distribution/src/main/assembly/dist.xml (original) +++ trunk/esb/java/modules/distribution/src/main/assembly/dist.xml Wed Jul 29 09:46:13 2009 @@ -66,8 +66,10 @@ <include>joda-time.wso2:joda-time:jar</include> <include>org.antlr.wso2:antlr-runtime:jar</include> <include>janino.wso2:janino:jar</include> - <include>org.wso2.rule:wso2rule-core:jar</include> - <include>org.wso2.rule:wso2rule-mediator:jar</include> + <include>org.wso2.carbon.rule:org.wso2.carbon.rule.core:jar</include> + <include>org.wso2.carbon.rule:org.wso2.carbon.rule.engine.drools:jar</include> + <include>org.wso2.carbon.rule:org.wso2.carbon.rule.engine.jsr94:jar</include> + <include>org.wso2.carbon.rule:org.wso2.carbon.rule.mediator:jar</include> <include>org.wso2.carbon:org.wso2.carbon.mediator.autoscale:jar</include> <include>org.wso2.carbon:org.wso2.carbon.ec2-client:jar</include> </includes> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/advanced_rule_base.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/advanced_rule_base.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/advanced_rule_base.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/advanced_rule_base.xml Wed Jul 29 09:46:13 2009 @@ -4,23 +4,26 @@ xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> <import name="org.apache.synapse.MessageContext"/> - <import name="org.wso2.rule.Inputs"/> - <import name="org.wso2.rule.Outputs"/> <import name="org.apache.synapse.Mediator"/> + <import name="org.apache.synapse.mediators.base.SequenceMediator"/> <rule name="Invoke IBM "> <lhs> <pattern object-type="MessageContext" identifier="mc"> </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> + <pattern identifier="seq" object-type="SequenceMediator"> + <field-binding field-name="name" identifier="a4"/> + <field-constraint field-name="name"> + <literal-restriction evaluator="==" value="ibmSequence"/> + </field-constraint> </pattern> - <eval>((String)inputs.get("symbol")).equals("IBM")</eval> + <eval>symbol.equals("IBM")</eval> </lhs> <rhs> - ((Mediator)inputs.get("ibmSeq")).mediate(mc); + ((Mediator)seq).mediate(mc); </rhs> </rule> @@ -28,15 +31,19 @@ <lhs> <pattern object-type="MessageContext" identifier="mc"> </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> + <pattern identifier="seq" object-type="SequenceMediator"> + <field-binding field-name="name" identifier="a4"/> + <field-constraint field-name="name"> + <literal-restriction evaluator="==" value="sunSequence"/> + </field-constraint> </pattern> - <eval>((String)inputs.get("symbol")).equals("SUN")</eval> + <eval>symbol.equals("SUN")</eval> </lhs> <rhs> - ((Mediator)inputs.get("sunSeq")).mediate(mc); + ((Mediator)seq).mediate(mc); </rhs> </rule> @@ -44,15 +51,19 @@ <lhs> <pattern object-type="MessageContext" identifier="mc"> </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> + <pattern identifier="seq" object-type="SequenceMediator"> + <field-binding field-name="name" identifier="a4"/> + <field-constraint field-name="name"> + <literal-restriction evaluator="==" value="msftSequence"/> + </field-constraint> </pattern> - <eval>((String)inputs.get("symbol")).equals("MSFT")</eval> + <eval>symbol.equals("MSFT")</eval> </lhs> <rhs> - ((Mediator)inputs.get("msftSeq")).mediate(mc); + ((Mediator)seq).mediate(mc); </rhs> </rule> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/always_ibm.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/always_ibm.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/always_ibm.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/always_ibm.xml Wed Jul 29 09:46:13 2009 @@ -2,26 +2,14 @@ xmlns="http://drools.org/drools-5.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> - - <import name="org.apache.synapse.MessageContext"/> - <import name="org.wso2.rule.Inputs"/> - <import name="org.wso2.rule.Outputs"/> - <rule name="Invoke Always IBM "> <lhs> - <pattern object-type="MessageContext" identifier="mc"> - </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> - </pattern> - <eval>((String)inputs.get("symbol")).equals("MSFT") - || ((String)inputs.get("symbol")).equals("SUN") - </eval> + <eval>symbol.equals("MSFT") || symbol.equals("SUN")</eval> </lhs> - <rhs> - outputs.put("symbol","IBM"); + update(drools.getWorkingMemory().getFactHandle(symbol),"IBM"); </rhs> </rule> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/commission_rule.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/commission_rule.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/commission_rule.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/commission_rule.xml Wed Jul 29 09:46:13 2009 @@ -3,29 +3,20 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> - <import name="org.apache.synapse.MessageContext"/> - <import name="org.wso2.rule.Inputs"/> - <import name="org.wso2.rule.Outputs"/> - <import name="java.lang.Double"/> - - <rule name="Get commission form SUN and MSFT but not from IBM "> + <lhs> - <pattern object-type="MessageContext" identifier="mc"> - </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> + <pattern object-type="Double" identifier="price"> </pattern> - <eval>((String)inputs.get("symbol")).equals("MSFT") - || ((String)inputs.get("symbol")).equals("SUN") - </eval> + <eval>symbol.equals("MSFT") || symbol.equals("SUN")</eval> </lhs> <rhs> - Double price = (Double)inputs.get("price"); - Object newPrice = price.doubleValue()+ 3000.68; - outputs.put("price",newPrice); + Double newPrice = price.doubleValue()+ 3000.68; + update(drools.getWorkingMemory().getFactHandle(price),newPrice); + retract(drools.getWorkingMemory().getFactHandle(symbol)); </rhs> </rule> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.drl URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.drl?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.drl (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.drl Wed Jul 29 09:46:13 2009 @@ -3,20 +3,18 @@ package SimpleRoutingRules; import org.apache.synapse.MessageContext; -import org.wso2.rule.Inputs; -import org.wso2.rule.Outputs; rule InvokeIBM when -inputs : Inputs() -outputs : Outputs() -eval( ((String)inputs.get("symbol")).equals("IBM") ) +mc : MessageContext() +symbol: String() +eval( symbol.equals("IBM") ) then -outputs.put("execute_children","true"); +mc.setProperty("execute_children","true"); end Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/simple_rule_base.xml Wed Jul 29 09:46:13 2009 @@ -2,29 +2,17 @@ xmlns="http://drools.org/drools-5.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> - <import name="org.apache.synapse.MessageContext"/> - <import name="org.wso2.rule.Inputs"/> - <import name="org.wso2.rule.Outputs"/> - <rule name="Invoke IBM "> - <lhs> - <pattern object-type="MessageContext" identifier="mc"> </pattern> - <pattern object-type="Inputs" identifier="inputs"> + <pattern object-type="String" identifier="symbol"> </pattern> - <pattern object-type="Outputs" identifier="outputs"> - </pattern> - - <eval>((String)inputs.get("symbol")).equals("IBM")</eval> + <eval>symbol.equals("IBM")</eval> </lhs> - <rhs> - outputs.put("execute_children","true"); + mc.setProperty("execute_children","true"); </rhs> - </rule> - -</package> \ No newline at end of file +</package> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_back_rule.drl URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_back_rule.drl?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_back_rule.drl (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_back_rule.drl Wed Jul 29 09:46:13 2009 @@ -2,27 +2,24 @@ <![CDATA[ package BackwardTransformation; -import org.apache.synapse.MessageContext; -import org.wso2.rule.Inputs; -import org.wso2.rule.Outputs; -import samples.CheckPriceResponse; +import org.wso2.carbon.rule.samples.CheckPriceResponse; rule BackwardTransformation when -inputs : Inputs() -outputs : Outputs() -eval( (inputs.get("price") != null) && (inputs.get("symbol") != null) ) +price : Double() +symbol : String() +eval( price != null && symbol != null ) then CheckPriceResponse response = new CheckPriceResponse(); -response.setCode((String)inputs.get("symbol")); -response.setPrice(((Double)inputs.get("price")).toString()); +response.setCode(symbol); +response.setPrice(price); -outputs.put("response",response); +insert(response); end Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_forward_rule.drl URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_forward_rule.drl?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_forward_rule.drl (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/resources/rule/tranform_forward_rule.drl Wed Jul 29 09:46:13 2009 @@ -2,29 +2,24 @@ <![CDATA[ package ForwardTransformation; +import org.wso2.carbon.rule.samples.GetQuoteRequest ; import org.apache.synapse.MessageContext; -import org.wso2.rule.Inputs; -import org.wso2.rule.Outputs; -import samples.GetQuoteRequest; rule ForwardTransformation when -inputs : Inputs() -outputs : Outputs() - -eval( (inputs.get("symbol") != null) ) +symbol : String() +mc : MessageContext() +eval(symbol != null ) then GetQuoteRequest request = new GetQuoteRequest(); -request.setSymbol((String)inputs.get("symbol")); -outputs.put("request",request); - -outputs.put("execute_children","true"); - +request.setSymbol(symbol); +insert(request); +mc.setProperty("execute_children","true"); end ]]> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_600.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_600.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_600.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_600.xml Wed Jul 29 09:46:13 2009 @@ -19,49 +19,37 @@ <!-- Simple rule based routing of messages - same as filter mediator --> <definitions xmlns="http://ws.apache.org/ns/synapse"> - <in> - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource> - - <package name="SimpleRoutingRules" - xmlns="http://drools.org/drools-5.0" - xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" - xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> - - <import name="org.apache.synapse.MessageContext"/> - <import name="org.wso2.rule.Inputs"/> - <import name="org.wso2.rule.Outputs"/> - - <rule name="Invoke IBM "> - - <lhs> - - <pattern object-type="MessageContext" identifier="mc"> - </pattern> - <pattern object-type="Inputs" identifier="inputs"> - </pattern> - <pattern object-type="Outputs" identifier="outputs"> - </pattern> - - <eval>((String)inputs.get("symbol")).equals("IBM")</eval> - </lhs> - - <rhs> - outputs.put("execute_children","true"); - </rhs> - - </rule> - </package> - - </ruleSource> - - <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="SimpleRoutingRules"> + <source> + <package name="SimpleRoutingRules" + xmlns="http://drools.org/drools-5.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" + xs:schemaLocation="http://drools.org/drools-5.0 drools-4.0.xsd"> + <import name="org.apache.synapse.MessageContext"/> + <rule name="Invoke IBM "> + <lhs> + <pattern object-type="MessageContext" identifier="mc"> + </pattern> + <pattern object-type="String" identifier="symbol"> + </pattern> + <eval>symbol.equals("IBM")</eval> + </lhs> + <rhs> + mc.setProperty("execute_children","true"); + </rhs> + </rule> + </package> + </source> + </executionSet> + <session type="stateless"/> + <input name="mc" type="context"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="//m0:getQuote/m0:request/m0:symbol/child::text()" + xmlns:m0="http://services.samples"/> </configuration> - <childMediators> <send> <endpoint> @@ -70,11 +58,8 @@ </send> <drop/> </childMediators> - </rule> - </in> - <out> <send/> </out> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_601.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_601.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_601.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_601.xml Wed Jul 29 09:46:13 2009 @@ -35,11 +35,15 @@ <in> <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-key"/> - - <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="SimpleRoutingRules"> + <source key="rule-script-key"/> + </executionSet> + <session type="stateless"/> + <input name="mc" type="context"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="//m0:getQuote/m0:request/m0:symbol/child::text()" + xmlns:m0="http://services.samples"/> </configuration> <childMediators> <send> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_602.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_602.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_602.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_602.xml Wed Jul 29 09:46:13 2009 @@ -1,69 +1,70 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Simple rule based routing of messages - same as filter mediator --> -<!-- The use of Drools native language --> - -<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.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/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="rule-script-key" - src="file:repository/samples/resources/rule/simple_rule_base.drl"/> - - <in> - - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-key" sourceFormat="drl"/> - - <ruleSet> - <creation> - <property name="source" value="drl"/> - </creation> - </ruleSet> - - <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> - </configuration> - <childMediators> - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - <drop/> - </childMediators> - - </rule> - - </in> - - <out> - <send/> - </out> - -</definitions> +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Simple rule based routing of messages - same as filter mediator --> +<!-- The use of Drools native language --> + +<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.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/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="rule-script-key" + src="file:repository/samples/resources/rule/simple_rule_base.drl"/> + + <in> + + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="SimpleRoutingRules"> + <source key="rule-script-key"/> + <creation> + <property name="source" value="drl"/> + </creation> + </executionSet> + <session type="stateless"/> + <input name="mc" type="context"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="//m0:getQuote/m0:request/m0:symbol/child::text()" + xmlns:m0="http://services.samples"/> + </configuration> + <childMediators> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </childMediators> + + </rule> + + </in> + + <out> + <send/> + </out> + +</definitions> Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_603.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_603.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_603.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_603.xml Wed Jul 29 09:46:13 2009 @@ -1,96 +1,100 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Advance rule based routing - Switching routing decision from rules --> - -<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.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/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="rule-script-key" - src="file:repository/samples/resources/rule/advanced_rule_base.xml"/> - - <sequence name="ibmSequence"> - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - </sequence> - - <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="sunSequence" onError="myFaultHandler"> - - <send> - <endpoint> - <address uri="http://localhost:9009/services/NonExistentStockQuoteService"/> - </endpoint> - </send> - <drop/> - - </sequence> - - <sequence name="msftSequence" onError="myFaultHandler"> - - <send> - <endpoint> - <address uri="http://bogus:9000/services/NonExistentStockQuoteService"/> - </endpoint> - </send> - <drop/> - - </sequence> - - <in> - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-key"/> - <input name="ibmSeq" key="ibmSequence" type="sequence"/> - <input name="sunSeq" key="sunSequence" type="sequence"/> - <input name="msftSeq" key="msftSequence" type="sequence"/> - - <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> - </configuration> - </rule> - - <drop/> - - </in> - - <out> - <send/> - </out> +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Advance rule based routing - Switching routing decision from rules --> + +<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.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/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="rule-script-key" + src="file:repository/samples/resources/rule/advanced_rule_base.xml"/> + + <sequence name="ibmSequence"> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + </sequence> + + <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="sunSequence" onError="myFaultHandler"> + + <send> + <endpoint> + <address uri="http://localhost:9009/services/NonExistentStockQuoteService"/> + </endpoint> + </send> + <drop/> + + </sequence> + + <sequence name="msftSequence" onError="myFaultHandler"> + + <send> + <endpoint> + <address uri="http://bogus:9000/services/NonExistentStockQuoteService"/> + </endpoint> + </send> + <drop/> + + </sequence> + + <in> + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="AdvancedRoutingRules"> + <source key="rule-script-key"/> + </executionSet> + <session type="stateless"/> + <input name="mc" type="context"/> + <input name="ibmSeq" key="ibmSequence" type="mediator"/> + <input name="sunSeq" key="sunSequence" type="mediator"/> + <input name="msftSeq" key="msftSequence" type="mediator"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="//m0:getQuote/m0:request/m0:symbol/child::text()" + xmlns:m0="http://services.samples"/> + </configuration> + </rule> + + <drop/> + + </in> + + <out> + <send/> + </out> </definitions> \ No newline at end of file Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_604.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_604.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_604.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_604.xml Wed Jul 29 09:46:13 2009 @@ -1,59 +1,62 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Simple rule based transformation (changing message ) --> - -<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.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/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="rule-script-key" - src="file:repository/samples/resources/rule/always_ibm.xml"/> - <in> - - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-key"/> - <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> - <output name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" - xmlns:m0="http://services.samples" type="string"/> - </configuration> - - </rule> - - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - - </in> - - <out> - <send/> - </out> - +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Simple rule based transformation (changing message ) --> + +<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.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milliseconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + + <localEntry key="rule-script-key" + src="file:repository/samples/resources/rule/always_ibm.xml"/> + <in> + + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="SimpleMessageTransformationRules"> + <source key="rule-script-key"/> + </executionSet> + <session type="stateless"/> + <input name="symbol" expression="//m0:getQuote/m0:request/m0:symbol/child::text()" + class="java.lang.String" xmlns:m0="http://services.samples" type="pojo"/> + <output name="symbol" expression="//m0:getQuote/m0:request/m0:symbol" + class="java.lang.String" xmlns:m0="http://services.samples" type="pojo"/> + </configuration> + + </rule> + + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + + </in> + + <out> + <send/> + </out> + </definitions> \ No newline at end of file Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_605.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_605.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_605.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_605.xml Wed Jul 29 09:46:13 2009 @@ -1,61 +1,63 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Simple rule based transformation (changing message ) --> -<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.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/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="rule-script-key" - src="file:repository/samples/resources/rule/commission_rule.xml"/> - <in> - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - </in> - - <out> - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-key"/> - <input name="symbol" type="string" - expression="self::node()//m0:return/m1:symbol/child::text()" - xmlns:m0="http://services.samples" - xmlns:m1="http://services.samples/xsd"/> - <input name="price" type="double" - expression="self::node()//m0:return/m1:last/child::text()" - xmlns:m0="http://services.samples" - xmlns:m1="http://services.samples/xsd"/> - - <output name="price" type="double" - expression="self::node()//m0:return/m1:last" - xmlns:m0="http://services.samples" - xmlns:m1="http://services.samples/xsd"/> - </configuration> - </rule> - <send/> - </out> +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Simple rule based transformation (changing message ) --> +<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.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/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="rule-script-key" + src="file:repository/samples/resources/rule/commission_rule.xml"/> + <in> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + </in> + + <out> + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="SimpleMessageTransformationRules"> + <source key="rule-script-key"/> + </executionSet> + <session type="stateless"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="self::node()//m0:return/m1:symbol/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + <input name="price" type="pojo" class="java.lang.Double" + expression="self::node()//m0:return/m1:last/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + <output name="price" type="pojo" class="java.lang.Double" + expression="self::node()//m0:return/m1:last" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + </configuration> + </rule> + <send/> + </out> </definitions> \ No newline at end of file Modified: trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_606.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_606.xml?rev=42110&r1=42109&r2=42110&view=diff ============================================================================== --- trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_606.xml (original) +++ trunk/esb/java/modules/samples/src/main/conf/synapse/synapse_sample_606.xml Wed Jul 29 09:46:13 2009 @@ -1,100 +1,100 @@ -<!-- - ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - ~ - ~ WSO2 Inc. 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. - ~ - --> - -<!-- Transformation with custom Java object --> - -<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.wso2.carbon.mediation.registry.ESBRegistry"> - <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> - <parameter name="root">file:repository/samples/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="rule-script-forward-key" - src="file:repository/samples/resources/rule/tranform_forward_rule.drl"/> - <localEntry key="rule-script-back-key" - src="file:repository/samples/resources/rule/tranform_back_rule.drl"/> - - <in> - - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-forward-key" sourceFormat="drl"/> - <ruleSet> - <creation> - <property name="source" value="drl"/> - </creation> - </ruleSet> - - <input name="symbol" - expression="self::node()//m0:CheckPriceRequest/m0:Code/child::text()" - xmlns:m0="http://services.samples" type="string"/> - - <output name="request" expression="self::node()//m0:CheckPriceRequest" - xmlns:m0="http://services.samples" - class="samples.GetQuoteRequest" type="custom"/> - </configuration> - <childMediators> - <send> - <endpoint> - <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> - </endpoint> - </send> - <drop/> - </childMediators> - </rule> - - </in> - - <out> - - <rule> - <configuration xmlns="http://www.wso2.org/products/wso2commons/rule"> - <ruleSource key="rule-script-back-key" sourceFormat="drl"/> - - <ruleSet> - <creation> - <property name="source" value="drl"/> - </creation> - </ruleSet> - - <input name="symbol" type="string" - expression="self::node()//m0:return/m1:symbol/child::text()" - xmlns:m0="http://services.samples" - xmlns:m1="http://services.samples/xsd"/> - - <input name="price" type="double" - expression="self::node()//m0:return/m1:last/child::text()" - xmlns:m0="http://services.samples" - xmlns:m1="http://services.samples/xsd"/> - - <output name="response" type="custom" - expression="self::node()//m0:return" - class="samples.CheckPriceResponse" - xmlns:m0="http://services.samples"/> - </configuration> - </rule> - - <send/> - - </out> +<!-- + ~ Copyright (c) 2005-2008, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + ~ + ~ WSO2 Inc. 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. + ~ + --> + +<!-- Transformation with custom Java object --> + +<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.wso2.carbon.mediation.registry.ESBRegistry"> + <!-- the root property of the simple URL registry helps resolve a resource URL as root + key --> + <parameter name="root">file:repository/samples/resources/</parameter> + <!-- all resources loaded from the URL registry would be cached for this number of milliseconds --> + <parameter name="cachableDuration">15000</parameter> + </registry> + + <localEntry key="rule-script-forward-key" + src="file:repository/samples/resources/rule/tranform_forward_rule.drl"/> + <localEntry key="rule-script-back-key" + src="file:repository/samples/resources/rule/tranform_back_rule.drl"/> + + <in> + + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="ForwardTransformation"> + <source key="rule-script-forward-key"/> + <creation> + <property name="source" value="drl"/> + </creation> + </executionSet> + <session type="stateless"/> + <input name="mc" type="context"/> + <input name="symbol" + expression="self::node()//m0:CheckPriceRequest/m0:Code/child::text()" + xmlns:m0="http://services.samples" type="pojo" class="java.lang.String"/> + + <output name="request" expression="self::node()//m0:CheckPriceRequest" + xmlns:m0="http://services.samples" + class="org.wso2.carbon.rule.samples.GetQuoteRequest" type="pojo"/> + </configuration> + <childMediators> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </childMediators> + </rule> + + </in> + + <out> + + <rule> + <configuration xmlns="http://www.wso2.org/products/rule/jsr94"> + <executionSet uri="BackwardTransformation"> + <source key="rule-script-back-key"/> + <creation> + <property name="source" value="drl"/> + </creation> + </executionSet> + <session type="stateless"/> + <input name="symbol" type="pojo" class="java.lang.String" + expression="self::node()//m0:return/m1:symbol/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + <input name="price" type="pojo" class="java.lang.Double" + expression="self::node()//m0:return/m1:last/child::text()" + xmlns:m0="http://services.samples" + xmlns:m1="http://services.samples/xsd"/> + + <output name="response" type="pojo" + expression="self::node()//m0:return" + class="org.wso2.carbon.rule.samples.CheckPriceResponse" + xmlns:m0="http://services.samples"/> + </configuration> + + </rule> + + <send/> + + </out> </definitions> \ No newline at end of file _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
