Thanks Kasun, I will update

Kasun Samarasinghe wrote:
Hi,

In my last mail with the same subject, by mistake i could not add the
problem encountered. Problem i came across was 
When a script source for the script mediator specifies as a inline
property, there was a problem while fetching the source from the local
entry. (class cast exception occurred). 
Problem was rectified and relevant patch is attached with this mail.

Thanks
Kasun
  

Index: modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java =================================================================== --- modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java (revision 518484) +++ modules/extensions/src/main/java/org/apache/synapse/mediators/bsf/ScriptMediator.java (working copy) @@ -154,7 +154,12 @@ } else { // load script if not already loaded if (scriptSourceCode == null) { - scriptSourceCode = ((OMElement) (synCtx.getEntry(key))).getText(); + Object o=synCtx.getEntry(key); + if (o instanceof OMElement){ + scriptSourceCode = ((OMElement) (synCtx.getEntry(key))).getText(); + }else if(o instanceof String){ + scriptSourceCode = synCtx.getEntry(key).toString(); + } } // load BSFEngine if not already loaded if (bsfEngine == null) {

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

Reply via email to