synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upul Godage" <upulg....@gmail.com>
Subject Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator
Date Wed, 05 Sep 2007 13:45:05 GMT
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) <jira@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
>
>

Mime
View raw message