Extension interoperability not working in server AS
Posted: 18 Dec 2010, 19:52
Hi,
I tried any way to communicate with another extension in server side AS, but I always get the same error:
----------------------------------------------------------
[MainExt.as]: extension found? it.gotoandplay.smartfoxserver.extensions.Javascri
ptExtension@1e85adf
22:31:42.945 - [ INFO ] > { DATA OUT } : <msg t='xt'><body action='xtRes' r='-1'
><![CDATA[<dataObj><var n='r' t='x' /><var n='m' t='s'>[MainExt.as]: Does it hav
e a method? function handleInternalRequest() {/*
java.lang.Object handleInternalRequest(java.lang.Object)
*/}
</var><var n='_cmd' t='s'>trace</var><var n='z' t='s'>CardGamesZone</var></dataO
bj>]]></body></msg>
[MainExt.as]: Does it have a method? function handleInternalRequest() {/*
java.lang.Object handleInternalRequest(java.lang.Object)
*/}
org.mozilla.javascript.EvaluatorException: Can't find method it.gotoandplay.smar
tfoxserver.extensions.JavascriptExtension.handleInternalRequest(). (MainExt.as#1
627)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultError
Reporter.java:109)
-------------------------------------
As you can see from the first line, I can successfully locate the other extension, and it gets traced. Also, I try to trace the method, and it successfully locates it. BUT whenever I try to call the same method (that just traced successfully) it never works.
thanks
Filippo
I tried any way to communicate with another extension in server side AS, but I always get the same error:
----------------------------------------------------------
[MainExt.as]: extension found? it.gotoandplay.smartfoxserver.extensions.Javascri
ptExtension@1e85adf
22:31:42.945 - [ INFO ] > { DATA OUT } : <msg t='xt'><body action='xtRes' r='-1'
><![CDATA[<dataObj><var n='r' t='x' /><var n='m' t='s'>[MainExt.as]: Does it hav
e a method? function handleInternalRequest() {/*
java.lang.Object handleInternalRequest(java.lang.Object)
*/}
</var><var n='_cmd' t='s'>trace</var><var n='z' t='s'>CardGamesZone</var></dataO
bj>]]></body></msg>
[MainExt.as]: Does it have a method? function handleInternalRequest() {/*
java.lang.Object handleInternalRequest(java.lang.Object)
*/}
org.mozilla.javascript.EvaluatorException: Can't find method it.gotoandplay.smar
tfoxserver.extensions.JavascriptExtension.handleInternalRequest(). (MainExt.as#1
627)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultError
Reporter.java:109)
-------------------------------------
As you can see from the first line, I can successfully locate the other extension, and it gets traced. Also, I try to trace the method, and it successfully locates it. BUT whenever I try to call the same method (that just traced successfully) it never works.
thanks
Filippo