Author: keith
Date: Thu Apr 3 23:58:47 2008
New Revision: 15546
Log:
Fixing the deployer to accept annonymous functions on init and destroy. e.g
this.init= function (){};
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
==============================================================================
---
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
(original)
+++
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java
Thu Apr 3 23:58:47 2008
@@ -597,6 +597,17 @@
displayed in the WSDL. Hence we need to do something special here to
get that to work.
*/
String funcName = (String) scriptable.get("name", scriptable);
+ // In this case init or destroy is an annonymous function.
+ // Hence we dont need to create an axisoperation for that.
+ // e.g this.init= function (){};
+ if ("".equals(funcName) && ("init".equals(method) ||
"destroy".equals(method))) {
+ return;
+ }
+ Scriptable parent = function.getParentScope();
+ if (!method.equals(funcName) &&
+ parent.get(method, parent).equals(parent.get(funcName,
parent))) {
+ return;
+ }
String oriMethodName = method;
if (funcName != null && !method.equals(funcName)) {
method = funcName;
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev