Return-Path: Delivered-To: apmail-ws-synapse-dev-archive@www.apache.org Received: (qmail 46696 invoked from network); 5 Sep 2007 13:45:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 13:45:38 -0000 Received: (qmail 70492 invoked by uid 500); 5 Sep 2007 13:45:32 -0000 Delivered-To: apmail-ws-synapse-dev-archive@ws.apache.org Received: (qmail 70454 invoked by uid 500); 5 Sep 2007 13:45:32 -0000 Mailing-List: contact synapse-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: synapse-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list synapse-dev@ws.apache.org Received: (qmail 70443 invoked by uid 99); 5 Sep 2007 13:45:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 06:45:32 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of upulg.dev@gmail.com designates 209.85.128.190 as permitted sender) Received: from [209.85.128.190] (HELO fk-out-0910.google.com) (209.85.128.190) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 13:45:28 +0000 Received: by fk-out-0910.google.com with SMTP id f40so2101123fka for ; Wed, 05 Sep 2007 06:45:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=htm+TovTBkVlDjg8/AAP2Ad3VCfcKusj9AcWsRbjRrfzTaFW1wAq00iJueb4XB+eAJ2BhlAqoA8YFc4EmuZ+fKsm2vZsxARU4FC++B1Kl3a9XRXaL3ukTXB5LAWO/bIPC4nDovK5fiYYeU69Kq2gNVMQFTaQTa49fS2gD9K19jo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=NbReNq/Sm2utHwHbsPU5awnKn+48WLasqAFBNO7WbxtNxrtVA+aswDg19xIjip7Vu0Egw9dNCUm1aeuvl8V74dN+NAjL1co6K4ANnQzlkG29C3YvfgeCef6pxmxJ0/bpC5O1sActSvfoeGsPqHvjLi3OOPOK4aL3BqbMLgEnpWQ= Received: by 10.82.158.12 with SMTP id g12mr5873790bue.1188999905718; Wed, 05 Sep 2007 06:45:05 -0700 (PDT) Received: by 10.67.15.14 with HTTP; Wed, 5 Sep 2007 06:45:05 -0700 (PDT) Message-ID: <51e581cd0709050645u29eb5b4fkc066eb657d1dae2b@mail.gmail.com> Date: Wed, 5 Sep 2007 19:15:05 +0530 From: "Upul Godage" To: synapse-dev@ws.apache.org Subject: Re: [jira] Commented: (SYNAPSE-126) Including multipe script files in ScriptMediator In-Reply-To: <672a01200709050624w105ee2f3o70a87953a1770bd2@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_39980_15086720.1188999905658" References: <3996967.1188989312822.JavaMail.root@brutus> <8527736.1188997413583.JavaMail.root@brutus> <672a01200709050624w105ee2f3o70a87953a1770bd2@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_39980_15086720.1188999905658 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Ruwan, I looks like the test.js is included in the request side in synapse_sample_500.xml. 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, Hope that was the case. Upul On 9/5/07, Ruwan Linton 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. > (#15)in: 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) 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: > > ------------------------------------- > > > > only used for external scripts. That is when > > > > > 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 > > ------=_Part_39980_15086720.1188999905658 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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


------=_Part_39980_15086720.1188999905658--