I am trying to create a POC of Flex-Drupal interaction, by retrieving only one node from Drupal and just displaying its title. I took help from tutorial "A really, really simple Services + AMFPHP example using Flex" [http://groups.drupal.org/node/2768]. I did everything exactly as defined in the tutorial but unfortunately I couldn't retrieve the node.

- Actually on click of a button I am calling: "amfService.getOperation('load').send(1);" and it is throwing Error: {--- fault: [RPC Fault faultString="Method node.load does not exist." faultCode="AMFPHP_RUNTIME_ERROR" faultDetail="C:\xampp\htdocs\drupal\sites\all\modules\amfphp\amfphp.module on line 106"] --}

-Drilling it down, I could figure out that there's no method existing called "node.load" [Administer>Site Building>Services>Node] It only shows -- node.save, node.delete and node.get. Snapshot is attached for the reference [Drupal_Services.jpg]

-I also came across that "View Service" shows [Views (missing)] in red [Administer>Site Building>Modules>Services]. Snapshot is also attached. [Drupal_Modules.jpg]

More details:
OS: Windows Vista Home Basic
S/W: XAMPP 1.7.1
Browser: Mozilla Firefox 3.0.11 & IE 8
Drupal: Version 6.12
AMFPHP: 6.x-1.0-beta1
Amfphp: 1.9.beta.20080120
Services: Ver 6.x-0.14

Any help would be greatly appreciated.

Thanks,
Siraj Khan
khan_siraj@yahoo.com

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rkn09’s picture

I had the same error when following the "A really, really simple services..." tutorial - http://groups.drupal.org/node/2768/.

I found a solution by calling the node.get method rather than node.load. Here's what I changed:


Drupal

1. Make things simple by turning off services sessid in Drupal.
Administer -> Site building -> Services.
Click the 'Settings' button, then uncheck 'Use sessid'. Click 'save configuration'.


Flex

I called the the 'node.get' method instead of 'node.load'. By doing the following:

1. Change:
<mx:Button x="250" y="157" label="nodeLoad" click="amfService.getOperation('load').send(1);"/>
To:
<mx:Button x="250" y="157" label="nodeLoad" click="amfService.getOperation('get').send(1);"/>

2. Change:
<mx:method name="load" result="resultHandler(event)" />
To:
<mx:method name="get" result="resultHandler(event)" />

mafaldone’s picture

Hi I'm trying to set up as u a DRUPLEX framework.

That's my idea step by step:

1) I have a web server.
2) I installed Drupal 6 on the server.
3) I have a Flex builder 3 Application on my desktop.
4) I found the tutorial http://groups.drupal.org/node/2768 and I had look of a lot mores...
5) I installed all the AMFPHP and Service modules on drupal
6) I think Service AMFPHP is working since if I click on Administer -> Site building -> services and then click on "AMFPHP - /services/amfphp" I get the right message:

 amfphp and this gateway are installed correctly. You may now connect to this gateway from Flash.

Note: If you're reading an old tutorial, it will tell you that you should see a download window instead of this message. This confused people so this is the new behaviour starting from amfphp 1.2.

View the amfphp documentation

Load the service browser
 

I click on Load the service browser, since, as u can see a link that in the tutorial is not present.

I get this message

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at "mysite" Port 80

where "mysite" is the link to my web of the kinde www.mysite.something

So this is the first thing to fix ;)

[just a parentesis]
In the same while i was wondering about the security issue of the flex.
So I put also some allowing domain policy code in flex environment... i will show u later that because i think the problem is not there.
[/just a parentesis] :-P

4) Then I create the project in Flex as the tutorial says and as u said substituting the node.load in node.get methods
5) I run the application from my Flex Builder in my desctop and i receive this ERROR:

fault: [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://"mysyte"/htdocs/sites/all/modules/amfphp/amfphp'"]

where "mysite" is the link to my web of the kinde www.mysite.something

This is the second problem to fix.
You think you can help me?

thanks a lot for the time

Geoffrey-2’s picture

Nice work, rkn09.

I was having the same issue as everyone and it turned out to be your Drupal suggestion above.

Once I unchecked "use ssid" I was golden.

Many thanks.

gbaudoin’s picture

Status: Active » Closed (fixed)