Download & Extend

"Method Amf3Broker.handleMessage does not exist" error

Project:AMFPHP
Version:6.x-1.0-beta1
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I'm encountering this error in Recent log entries page:

Method Amf3Broker.handleMessage does not exist.

The setup is this:

I created a profile_service module and exposed a function named profile.save. This is the code:

array(
'#method'           => 'profile.save',
'#callback'         => 'profile_service_save',
'#args'             => array(
array(
'#name'           => 'user',
'#type'           => 'struct',
'#description'    => t('The object that contains the profile data.'))),
'#help'             => t('Saves a profile data.')),

Here is the callback function:

function profile_service_save($data) {
print_r($temp);
}

Now, I'm planning to create a Flex application that would use that. AMFPHP is already installed too. Here's an excerpt of the Flex code:

...
...
                       public function submitUpdate():void {
var data:Object = new Object();
data.uid = userID;
data.profile_fname = txtFirstname.text;
data.profile_lname = txtLastname.text;
profileAPI.save(data);
}
...
...
...

        <mx:RemoteObject endpoint="http://localhost/services/amfphp" showBusyCursor="true"
destination="amfphp" source="profile" id="profileAPI">
<mx:method name="save" result="profileSave(event)" fault="onFault(event)"/>
<mx:method name="get" result="userGet(event)" fault="onFault(event)"/>
<mx:method name="uid" result="profileUid(event)" fault="onFault(event)"/>
</mx:RemoteObject>

After doing some several tests and experimentation, I'm still receiving this message "Channel disconnected before an acknowledgement was received". And it seems that for the backend error, this is the message: Method Amf3Broker.handleMessage does not exist.

But note that when I remove the argument in profile_service_save, the error is gone.

Kindly tell me what part or what could be missing that causes that error. Thanks a lot in advance.

Comments

#1

Hi,
We are stucked on the same issue...
Did you get a workaround ?

Thanks for helping.

#2

I had this issue as well and it was caused by my passing a scalar value instead of an array for my CCK fields. The field I was using only needed a single value but passing that single value inside an array fixed the problem. Might be a good spot to double check if anybody else runs into this.

#3

Posted too soon. That prevented the error but the values still weren't getting through. Looking at the output from node.get in the Services module you can see that you actually need a second array in there with one key named "value". Using Flex, I was able to get it work by doing this:


var graphML:String = ...;

var node:Object = new Object();
node.type = 'page';

var graphMLValue:Array = new Array();
graphMLValue['value'] = graphML;
node.field_graphml = [graphMLValue];

To explain a bit, I have a CCK field called "graphml" so I need to create the "field_graphml" property on my node object. The value of this property is an array whose only element is an array. That value has a single key, "value," whose value is (finally) the value you want to drop in the field.

Hope this helps somebody!

#4

i had an problem when i was loading modules and each module had different instances of a RemoteObject. the first module would load and call amfphp fine, but the second would give me your error.

Following error am getting from Flex.

Channel.Ping.Failed error Method Amf3Broker.handleMessage does not exist

Please help me get this resolved.