You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org> on 2011/03/09 12:07:59 UTC
[jira] Created: (SYNAPSE-738) Function-Templates for Synapse
Configuration
Function-Templates for Synapse Configuration
--------------------------------------------
Key: SYNAPSE-738
URL: https://issues.apache.org/jira/browse/SYNAPSE-738
Project: Synapse
Issue Type: New Feature
Components: Core
Affects Versions: FUTURE
Reporter: Udayanga Wickramasinghe
Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
For example if we consider following scenario ,
<proxy name="SplitAggregateProxy">
<target>
<inSequence>
<iterate expression="//m0:getQuote/m0:
request"
preservePayload="true"
attachPath="//m0:getQuote"
xmlns:m0="http://services.samples">
<target>
<sequence>
<send>
<endpoint>
<address
uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</sequence>
</target>
</iterate>
</inSequence>
<outSequence>
<aggregate>
<onComplete expression="//m0:getQuoteResponse"
xmlns:m0="http://services.samples">
<send/>
</onComplete>
</aggregate>
</outSequence>
</target>
</proxy>
Here what user really wants to look at is three configuration parameters ,
1. Two XPath expressions
2. An endpoint address
we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
Function templates will look like following in synapse config,
1)
<template name="[func name]">
/**parameters for this function template**/
<parameter name="p1" />*
/**any sequence**/
<any sequence>+
</template>
-->A Template is an extension of Sequence , hence template body can contain any sequence in general
--> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
ie:- <aggregate>
<onComplete xmlns:m0="http://services.samples" expression="$func:p2">
<log level="full" />
<send/>
</onComplete>
</aggregate>
OR
<log level="custom">
<property name="p1-value" expression="$func:p1"/>
<property name="p2-value" expression="get-property('func','p2')"/>
</log>
2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
<invoke target="[target func template]">
<parameter name="p2" value="{any xpath} | plain-value"/>*
</invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_function_templates.patch
attached is a patch for the initial implementation of synapse function-template(s). please review and commit
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Updated] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Issue Comment Edited] (SYNAPSE-738) Function-Templates for
Synapse Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038455#comment-13038455 ]
Udayanga Wickramasinghe edited comment on SYNAPSE-738 at 5/24/11 8:53 AM:
--------------------------------------------------------------------------
patch to support dynamic xpath for attach xpath expressions for Iterate Mediator
was (Author: udayangaw@wso2.com):
patch to support dynamic xpath for attach xpath expressions
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_Iterate_mediator_attachXpath.patch, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Resolved] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Hiranya Jayathilaka (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka resolved SYNAPSE-738.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 2.1
All patches are available in trunk and branch.
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Assignee: Hiranya Jayathilaka
> Fix For: 2.1
>
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_Iterate_mediator_attachXpath.patch, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Updated] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_config_changes_update.patch
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Updated] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_call_tempalate.patch
did changes for invoke mediator config names ie:-changed name to "call-tempalate"..please review and commit
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Assigned] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Hiranya Jayathilaka (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiranya Jayathilaka reassigned SYNAPSE-738:
-------------------------------------------
Assignee: Hiranya Jayathilaka
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Assignee: Hiranya Jayathilaka
> Fix For: 2.1
>
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_Iterate_mediator_attachXpath.patch, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_config_changes.patch
included synapse config level changes to accomadate tempalates + test cases for Synapse Observer API change..
Please review and commit
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_update.patch
included body element (ie:- <sequence> ) to synapse template mediator
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Updated] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udayanga Wickramasinghe updated SYNAPSE-738:
--------------------------------------------
Attachment: synapse_SYNAPSE-738_Iterate_mediator_attachXpath.patch
patch to support dynamic xpath for attach xpath expressions
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_Iterate_mediator_attachXpath.patch, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] [Commented] (SYNAPSE-738) Function-Templates for Synapse
Configuration
Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031579#comment-13031579 ]
Udayanga Wickramasinghe commented on SYNAPSE-738:
-------------------------------------------------
included patch for initializing/destroyinh sequence templates at startup/shutdown
> Function-Templates for Synapse Configuration
> --------------------------------------------
>
> Key: SYNAPSE-738
> URL: https://issues.apache.org/jira/browse/SYNAPSE-738
> Project: Synapse
> Issue Type: New Feature
> Components: Core
> Affects Versions: FUTURE
> Reporter: Udayanga Wickramasinghe
> Attachments: synapse_SYNAPSE-738, synapse_SYNAPSE-738_call_tempalate.patch, synapse_SYNAPSE-738_config_changes.patch, synapse_SYNAPSE-738_config_changes_update.patch, synapse_SYNAPSE-738_sequence_template_init_bug_fix.patch, synapse_SYNAPSE-738_update.patch, synapse_function_templates.patch
>
>
> Implementing Function templates in Synapse can be used to reduce lot of complexity as well as eliminate redundancy at synapse configuration. At the moment a large portion of ESB configuration are at the micro level. Because of this users have to individually configure each and every mediator to achieve some high level task. But what we need is a high level abstraction that users can easily use to model such scenarios .
> For example if we consider following scenario ,
> <proxy name="SplitAggregateProxy">
> <target>
> <inSequence>
> <iterate expression="//m0:getQuote/m0:
> request"
> preservePayload="true"
> attachPath="//m0:getQuote"
> xmlns:m0="http://services.samples">
> <target>
> <sequence>
> <send>
> <endpoint>
> <address
> uri="http://localhost:9000/services/SimpleStockQuoteService"/>
> </endpoint>
> </send>
> </sequence>
> </target>
> </iterate>
> </inSequence>
> <outSequence>
> <aggregate>
> <onComplete expression="//m0:getQuoteResponse"
> xmlns:m0="http://services.samples">
> <send/>
> </onComplete>
> </aggregate>
> </outSequence>
> </target>
> </proxy>
> Here what user really wants to look at is three configuration parameters ,
> 1. Two XPath expressions
> 2. An endpoint address
> we can hide a lot of this complexity by introducing a 'template' configuration that parameterize (like a function does) a known pattern such as this one.Parameterization can be done using xpath expressions..
> Function templates will look like following in synapse config,
> 1)
> <template name="[func name]">
> /**parameters for this function template**/
> <parameter name="p1" />*
> /**any sequence**/
> <any sequence>+
> </template>
> -->A Template is an extension of Sequence , hence template body can contain any sequence in general
> --> any mediator/comp inside template body can refer to its parameters just like a normal function does ,by xpath function scope (ie:-func) variable
> ie:- <aggregate>
> <onComplete xmlns:m0="http://services.samples" expression="$func:p2">
> <log level="full" />
> <send/>
> </onComplete>
> </aggregate>
> OR
> <log level="custom">
> <property name="p1-value" expression="$func:p1"/>
> <property name="p2-value" expression="get-property('func','p2')"/>
> </log>
>
> 2)To invoke a template in synapse we can define a Invoke mediator which will be in the following form. Using a invoke mediator ,from within any sequence of Synapse we would be able to execute a template with the passed on values for parameters such as p1,p2,etc.... :
> <invoke target="[target func template]">
> <parameter name="p2" value="{any xpath} | plain-value"/>*
> </invoke>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org