[swx] Remote methods work in the explorer but not when called form custom application

ben ben_da_dog at yahoo.co.uk
Wed Apr 2 04:11:43 PST 2008


Hi Pete...

Just a thought... in php "Echo: " + $n1 would not concatenate the 
values. I think it tries to convert them to number first then add them.. 
which could explain why you get undefined as a result..

"Echo: " . $n1 would concatenate instead..

Does that help??

Ben

Pete Hotchkiss wrote:
> Hi the guys and girls of the list.
>  
> I have an interesting/frustrating issue calling custom methods on a 
> SWX application currently in development. I hoping that a kind person 
> on this list can shed some light on my problem. I've been using SWX 
> for a while now, but this one has me a bit stumped. The application in 
> question works perfectly locally (within the MAMP environment) 
> however once deployed to the site we're experiencing strange 
> problems.  In short the /result/ property of the returned event 
> object is always undefined - unless the remote method simply returns 
> the passed argument.
>  
> So for example if our remote PHP class is
>  
>  
> class CompatibilityTest
> {
>     function test1($n1)
>     {
>         return $n1;
>     }
>   
>     function test2($n1)
>     {
>         return "Echo: " + $n1;
>     }
>
> }
>  
> If I call the test1 method I get my argument strait back, if I call 
> test2 I get /undefined/.
>  
> What's odd is this only happens when making the calls from my Flash 
> app - the methods execute perfectly from the service explorer. 
> Furthermore, any functionality to store passed arguments in a database 
> etc execute perfectly - its just trying to return anything more 
> complicated than the passed method argument seems to throw out the 
> gateway.
>  
> I've tried running the test scripts (in the tests folder) on the host 
> and I get the following
>  
> From /all_tests.php/
> Fail: SwxAssemblerTest.php -> swxassemblertest -> testdatatobytecode 
> -> Equal expectation fails at character 11 with [0068656C6C6F00] and 
> [0068656C6C600] at 
> [/content/html/compatibilitytest/php/tests/SwxAssemblerTest.php line 64]
> Fail: SwxAssemblerTest.php -> swxassemblertest -> teststringtobytecode 
> -> Equal expectation fails at character 11 with [0068656C6C6F00] and 
> [0068656C6C600] at 
> [/content/html/compatibilitytest/php/tests/SwxAssemblerTest.php line 87]
> Fail: SwxAssemblerTest.php -> swxassemblertest -> teststrhex -> Equal 
> expectation fails at character 9 with [68656c6c6f] and [68656c6c6] at 
> [/content/html/compatibilitytest/php/tests/SwxAssemblerTest.php line 199]
> *SWX PHP Assembler Error! *1 of 1 test case complete: *15* passes, *3* 
> fails and *0* exceptions.
>  
>  
> From /SwxAssemblerTest.php/
> *Fatal error*: Class swxassemblertest: Cannot inherit from undefined 
> class unittestcase in 
> */content/html/compatibilitytest/php/tests/SwxAssemblerTest.php* on 
> line *6*
> ** 
>  
> In the past I've had problems with certain hosting environments 
> causing issues when /open_basedir /and /safe_mode arent switched 
> off. /I believe are off for this host, but I cant tell fully as 
> phpinfo() is disabled on the host for security reasons. I'm waiting to 
> hear from them on the exact configuration they have set up for this app.
>  
> Does anybody have any light to shed on this one - its a puzzler :-)
>  
> Thanks in advance folks
>  
> Pete
>  
> P.S - Aral - I've sent this to your personal mail without realising 
> there was this list - so apologies for the duplicated post in your 
> inbox :-)
>  
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080402/924c58f5/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 9500 bytes
Desc: http://www.substance001.com/
Url : http://osflash.org/pipermail/swx_osflash.org/attachments/20080402/924c58f5/attachment-0001.gif 


More information about the swx mailing list