You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Upul Godage (JIRA)" <ji...@apache.org> on 2007/09/05 15:03:33 UTC
[jira] Commented: (SYNAPSE-126) Including multipe script files in
ScriptMediator
[ https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078 ]
Upul Godage commented on SYNAPSE-126:
-------------------------------------
<include /> only used for external scripts. That is when <script key="..." > is used.
New syntax after this change,
<script language="js" key="script/stockquoteTransform.js" function="transformRequest">
<include key="script/testInclude.js" />
<include key="script/testInclude2.js" />
</script>
> Including multipe script files in ScriptMediator
> ------------------------------------------------
>
> Key: SYNAPSE-126
> URL: https://issues.apache.org/jira/browse/SYNAPSE-126
> Project: Synapse
> Issue Type: Improvement
> Components: Extension Mediators
> Reporter: Upul Godage
> Priority: Minor
> Attachments: patch-SYNAPSE-126.txt
>
>
> Present implementation does not support including multiple script files in ScriptMediator.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org
Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator
Posted by Ruwan Linton <ru...@gmail.com>.
Asankha, I have Committed the code.
BTW: Upul, can you change the unit tests for the ScriptMediator in a way
that this functionality will also be tested on the go as Asankha suggested.
Thanks,
Ruwan.
On 9/5/07, Asankha C. Perera <as...@wso2.com> wrote:
>
> Upul
>
> This looks like a useful enhancement - esp for Javascript and other
> scripting languages and to reuse common scripts. Once Ruwan gives the go
> ahead I would like to see this code go into Synapse. Also make sure to have
> unit tests that validates this
>
> thanks
> asankha
>
> Upul Godage (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078 ]
>
> Upul Godage commented on SYNAPSE-126:
> -------------------------------------
>
> <include /> only used for external scripts. That is when <script key="..." > is used.
> New syntax after this change,
>
> <script language="js" key="script/stockquoteTransform.js" function="transformRequest">
> <include key="script/testInclude.js" />
> <include key="script/testInclude2.js" />
> </script>
>
> Including multipe script files in ScriptMediator
> ------------------------------------------------
>
> Key: SYNAPSE-126
> URL: https://issues.apache.org/jira/browse/SYNAPSE-126
> Project: Synapse
> Issue Type: Improvement
> Components: Extension Mediators
> Reporter: Upul Godage
> Priority: Minor
> Attachments: patch-SYNAPSE-126.txt
>
>
> Present implementation does not support including multiple script files in ScriptMediator.
>
>
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"
Re: [jira] Commented: (SYNAPSE-126) Including multipe script files
in ScriptMediator
Posted by "Asankha C. Perera" <as...@wso2.com>.
Upul
This looks like a useful enhancement - esp for Javascript and other
scripting languages and to reuse common scripts. Once Ruwan gives the go
ahead I would like to see this code go into Synapse. Also make sure to
have unit tests that validates this
thanks
asankha
Upul Godage (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078 ]
>
> Upul Godage commented on SYNAPSE-126:
> -------------------------------------
>
> <include /> only used for external scripts. That is when <script key="..." > is used.
> New syntax after this change,
>
> <script language="js" key="script/stockquoteTransform.js" function="transformRequest">
> <include key="script/testInclude.js" />
> <include key="script/testInclude2.js" />
> </script>
>
>
>> Including multipe script files in ScriptMediator
>> ------------------------------------------------
>>
>> Key: SYNAPSE-126
>> URL: https://issues.apache.org/jira/browse/SYNAPSE-126
>> Project: Synapse
>> Issue Type: Improvement
>> Components: Extension Mediators
>> Reporter: Upul Godage
>> Priority: Minor
>> Attachments: patch-SYNAPSE-126.txt
>>
>>
>> Present implementation does not support including multiple script files in ScriptMediator.
>>
>
>
Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator
Posted by Ruwan Linton <ru...@gmail.com>.
Sorry about that, my mistake.
It seems ok now. Good work !!! :D
Thanks,
Ruwan
On 9/5/07, Upul Godage <up...@gmail.com> wrote:
>
> Hi Ruwan,
>
> I looks like the test.js is included in the request side in
> synapse_sample_500.xml.
> <script language="js" key="stockquoteScript"
> function="transformRequest">
> <include key="testScript"/>
> </script>
>
> But stockquoteTransform.js used it in response side.
> function transformResponse(mc) {
> var symbol = mc.getPayloadXML ()..*::symbol.toString();
> var price = test(mc);
> ...
> }
>
> synapse_sample_500.xml should be,
> <script language="js" key="stockquoteScript"
> function="transformResponse">
> <include key="testScript"/>
> </script>
>
> Hope that was the case.
>
> Upul
>
> On 9/5/07, Ruwan Linton < ruwan.linton@gmail.com> wrote:
> >
> > Upul,
> >
> > I have tested this, but it gave me an error saying
> >
> > ERROR ScriptMediator - The Script engine returned an error executing the
> > external js script : stockquoteScript
> > com.sun.phobos.script.util.ExtendedScriptException :
> > org.mozilla.javascript.EcmaError: ReferenceError: "test" is not defined.
> > (<Unknown source>#15)in: <Unknown source>at line no: 15
> >
> > but the function test is on a different file and I have included that in
> > the config.
> >
> > Can U look in to this. I have attached the test files and the config.
> >
> > No error when building but only on the runtime.
> >
> > Thanks,
> > Ruwan
> >
> > On 9/5/07, Upul Godage (JIRA) <ji...@apache.org> wrote:
> > >
> > >
> > > [ https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078
> > > ]
> > >
> > > Upul Godage commented on SYNAPSE-126:
> > > -------------------------------------
> > >
> > > <include /> only used for external scripts. That is when <script
> > > key="..." > is used.
> > > New syntax after this change,
> > >
> > > <script language="js" key="script/stockquoteTransform.js"
> > > function="transformRequest">
> > > <include key="script/testInclude.js" />
> > > <include key="script/testInclude2.js" />
> > > </script>
> > >
> > > > Including multipe script files in ScriptMediator
> > > > ------------------------------------------------
> > > >
> > > > Key: SYNAPSE-126
> > > > URL:
> > > https://issues.apache.org/jira/browse/SYNAPSE-126
> > > > Project: Synapse
> > > > Issue Type: Improvement
> > > > Components: Extension Mediators
> > > > Reporter: Upul Godage
> > > > Priority: Minor
> > > > Attachments: patch-SYNAPSE-126.txt
> > > >
> > > >
> > > > Present implementation does not support including multiple script
> > > files in ScriptMediator.
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"
Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator
Posted by Upul Godage <up...@gmail.com>.
Hi Ruwan,
I looks like the test.js is included in the request side in
synapse_sample_500.xml.
<script language="js" key="stockquoteScript"
function="transformRequest">
<include key="testScript"/>
</script>
But stockquoteTransform.js used it in response side.
function transformResponse(mc) {
var symbol = mc.getPayloadXML()..*::symbol.toString();
var price = test(mc);
...
}
synapse_sample_500.xml should be,
<script language="js" key="stockquoteScript"
function="transformResponse">
<include key="testScript"/>
</script>
Hope that was the case.
Upul
On 9/5/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Upul,
>
> I have tested this, but it gave me an error saying
>
> ERROR ScriptMediator - The Script engine returned an error executing the
> external js script : stockquoteScript
> com.sun.phobos.script.util.ExtendedScriptException :
> org.mozilla.javascript.EcmaError: ReferenceError: "test" is not defined.
> (<Unknown source>#15)in: <Unknown source>at line no: 15
>
> but the function test is on a different file and I have included that in
> the config.
>
> Can U look in to this. I have attached the test files and the config.
>
> No error when building but only on the runtime.
>
> Thanks,
> Ruwan
>
> On 9/5/07, Upul Godage (JIRA) <ji...@apache.org> wrote:
> >
> >
> > [ https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078
> > ]
> >
> > Upul Godage commented on SYNAPSE-126:
> > -------------------------------------
> >
> > <include /> only used for external scripts. That is when <script
> > key="..." > is used.
> > New syntax after this change,
> >
> > <script language="js" key="script/stockquoteTransform.js"
> > function="transformRequest">
> > <include key="script/testInclude.js" />
> > <include key="script/testInclude2.js" />
> > </script>
> >
> > > Including multipe script files in ScriptMediator
> > > ------------------------------------------------
> > >
> > > Key: SYNAPSE-126
> > > URL: https://issues.apache.org/jira/browse/SYNAPSE-126
> > > Project: Synapse
> > > Issue Type: Improvement
> > > Components: Extension Mediators
> > > Reporter: Upul Godage
> > > Priority: Minor
> > > Attachments: patch-SYNAPSE-126.txt
> > >
> > >
> > > Present implementation does not support including multiple script
> > files in ScriptMediator.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator
Posted by Ruwan Linton <ru...@gmail.com>.
Upul,
I have tested this, but it gave me an error saying
ERROR ScriptMediator - The Script engine returned an error executing the
external js script : stockquoteScript
com.sun.phobos.script.util.ExtendedScriptException:
org.mozilla.javascript.EcmaError: ReferenceError: "test" is not defined.
(<Unknown source>#15)in: <Unknown source>at line no: 15
but the function test is on a different file and I have included that in the
config.
Can U look in to this. I have attached the test files and the config.
No error when building but only on the runtime.
Thanks,
Ruwan
On 9/5/07, Upul Godage (JIRA) <ji...@apache.org> wrote:
>
>
> [
> https://issues.apache.org/jira/browse/SYNAPSE-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525078]
>
> Upul Godage commented on SYNAPSE-126:
> -------------------------------------
>
> <include /> only used for external scripts. That is when <script key="..."
> > is used.
> New syntax after this change,
>
> <script language="js" key="script/stockquoteTransform.js"
> function="transformRequest">
> <include key="script/testInclude.js" />
> <include key="script/testInclude2.js" />
> </script>
>
> > Including multipe script files in ScriptMediator
> > ------------------------------------------------
> >
> > Key: SYNAPSE-126
> > URL: https://issues.apache.org/jira/browse/SYNAPSE-126
> > Project: Synapse
> > Issue Type: Improvement
> > Components: Extension Mediators
> > Reporter: Upul Godage
> > Priority: Minor
> > Attachments: patch-SYNAPSE-126.txt
> >
> >
> > Present implementation does not support including multiple script files
> in ScriptMediator.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"