Help on Channel disconnected error

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by firnnauriel on April 28, 2009 at 4:21am

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".

But note that when I remove the arguments, the error is gone.

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

Comments

Found this error in Recent

Posted by firnnauriel on April 29, 2009 at 12:41am

Found this error in Recent Log Entries:

Method Amf3Broker.handleMessage does not exist.

I checked the AMFPHP documentation but unfortunately, there's no sample for Flex 2 (http://www.amfphp.org/docs2/first_service.html). Please help me on how to debug it or better the best practice on how to see what's happening between Flex and AMFPHP/Service

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /