Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Remoting

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-07-2009, 05:31 PM   #1
wvxvw
Holosuit User
 
wvxvw's Avatar
 
Join Date: Oct 2006
Location: Tel Aviv
Posts: 3,240
Send a message via ICQ to wvxvw
Default ZendAMF: Channel.Connect.Failed error NetConnection.Call.BadVersion

Need advice on using ZendAMF...
After wasting 2 days on installing Zend framework (which is extremely useless as a back-side for flash site BTW!) And finally seeing "Zend Amf Endpoint" message appearing in the browser in where I put the index file that is meant to be an end point of the AMF channel... I see this message:
"Channel.Connect.Failed error NetConnection.Call.BadVersion" when trying to access a service from flash...
The service is very simple:
the index.php file:
PHP Code:
<?php
require_once 'Zend/Amf/Server.php'
require_once 
'../include/services/SimpleResponder.php';
// Instantiate server 
$server = new Zend_Amf_Server(); 
$server->setClass('SimpleResponder'); 
// Handle request 
$server->handle();
?>
the service:
PHP Code:
<?php
require_once 'remote/Message.php';
/**
 * The SimpleResponder illustrates the basics
 * of Flash - PHP interaction.
 */
class SimpleResponder {
    public function 
__construct(){ }
    
    
/**
     * This method will bounce the argument that it receives.
     */
    
public function fetchResponse($requestText) {
        
$response = new Message();
        
$response->message $requestText;
        return 
$response;
    }
}
?>
The remote class this service includes:
PHP Code:
<?php
class Message {
    var 
$_explicitType "com.spotlessdesign.monopoly.eventmap.remote.Message";
    var 
$message;
}
?>
This service works OK under AMFPHP...
And I'm sure I'm hitting the correct endpoint when running the flash app, because the complete error looks like this:
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://localhost/zendf/public/'"]
Where, if I access http://localhost/zendf/public/ from the browser I can see "Zend Amf Endpoint" message, meaning, all the files meant to be included ware found...
What am I missing?
And another, rather rhetorical question, why do Adobe encourage to use ZendAMF implementation? what is so peculiar in it, except for Zend framework dependencies that make you bring in lots of stuff you'll never use in the flash site + making the entire process extremely non user (programmer) friendly?

EDIT: figured one thing out, there was the last slash missing in the URL... though it doesn't solve the problem... Now the service doesn't respond at all, yet no errors.

EDIT2: Nevermind, stupid me... it should be:
PHP Code:
echo $server->handle(); 
__________________
The .NET open source editor for Flash and web developers
*This would be my contribution to the project*
couchsurfing if you need it

Last edited by wvxvw; 02-07-2009 at 06:31 PM..
wvxvw is offline   Reply With Quote
Old 10-28-2009, 09:39 AM   #2
jawoll()
Registered User
 
Join Date: Jun 2008
Posts: 3
Default

Can you tell the difference between
PHP Code:
echo $server->handle(); 
and
PHP Code:
$server->handle(); 
in php-functionality?
Because I have the same problem, but I don't want an php-output.
jawoll() is offline   Reply With Quote
Old 11-05-2009, 01:50 AM   #3
Phreeky
Registered User
 
Join Date: Nov 2009
Posts: 1
Default

Greetings wvxvw,

I would extremtly recommend you 'charles' while working with ZendAMF, that way you know what messages are coming from Zend, instead of a that uselesss BadVersion echo you can see the full error

Hope this helps for next time
Phreeky is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] how to send string, array & objects to ZendAMF? lsatdown Flash Remoting 1 01-29-2009 11:19 AM


All times are GMT. The time now is 11:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.