synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r589065 - /webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
Date Sat, 27 Oct 2007 09:25:23 GMT
Author: antelder
Date: Sat Oct 27 02:25:22 2007
New Revision: 589065

URL: http://svn.apache.org/viewvc?rev=589065&view=rev
Log:
Update ScriptMediator to work with the latest BSF snapshot release (note, its still compatible
with the BSF beta1 release)

Modified:
    webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java

Modified: webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java?rev=589065&r1=589064&r2=589065&view=diff
==============================================================================
--- webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
(original)
+++ webservices/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java
Sat Oct 27 02:25:22 2007
@@ -204,6 +204,12 @@
                 (key != null? " : " + key : "") +
                 (function != null ? " function " + function : ""), e, synCtx);
             returnValue = false;
+        } catch (NoSuchMethodException e) {
+            handleException("The script engine returned a NoSuchMethodException executing
the " +
+                (key == null ? "inlined " : "external ") + language + " script" +
+                (key != null? " : " + key : "") +
+                (function != null ? " function " + function : ""), e, synCtx);
+            returnValue = false;
         }
         return returnValue;
     }
@@ -215,7 +221,7 @@
      * @return script result
      * @throws ScriptException
      */
-    protected Object mediateWithExternalScript(MessageContext synCtx) throws ScriptException
{
+    protected Object mediateWithExternalScript(MessageContext synCtx) throws ScriptException,
NoSuchMethodException {
         prepareExternalScript(synCtx);
         ScriptMessageContext scriptMC = new ScriptMessageContext(synCtx, xmlHelper);
         return invocableScript.invokeFunction(function, new Object[]{scriptMC});



---------------------------------------------------------------------
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