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
Comments
Comment #1
rkn09 CreditAttribution: rkn09 commentedI 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)" />
Comment #2
mafaldone CreditAttribution: mafaldone commentedHi 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:
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
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:
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
Comment #3
Geoffrey-2 CreditAttribution: Geoffrey-2 commentedNice 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.
Comment #4
gbaudoin CreditAttribution: gbaudoin commented