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) <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"
<!--
  ~  Licensed to the Apache Software Foundation (ASF) under one
  ~  or more contributor license agreements.  See the NOTICE file
  ~  distributed with this work for additional information
  ~  regarding copyright ownership.  The ASF 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.
  -->
<!-- Introduction to the script mediator -->
<definitions xmlns="http://ws.apache.org/ns/synapse";>
    <localEntry key="stockquoteScript" src="file:repository/conf/sample/resources/script/stockquoteTransform.js"/>
    <localEntry key="testScript" src="file:repository/conf/sample/resources/script/test.js"/>

    <in>
        <!-- transform the custom quote request into a standard quote request expected by the service -->
        <script language="js" key="stockquoteScript" function="transformRequest">
          <include key="testScript"/>
        </script>
        <send>
            <endpoint>
                <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
            </endpoint>
        </send>
    </in>
    <out>
        <!-- transform the standard response back into the custom format the client expects -->
        <script language="js" key="stockquoteScript" function="transformResponse"/>
        <send/>
    </out>
</definitions>

Attachment: stockquoteTransform.js
Description: JavaScript source

Attachment: test.js
Description: JavaScript source

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to