The difference between setting up Drupal Services for a Flex 3 project and for an Air project is a few slight modifications. Using my tutorial for connecting a Flex project with Services and making the changes below will get Air connected with Drupal Services.
- You will need to create an Air project instead of a Flex project in the initial setup in Flex Builder (WindowedApplication vs. Application)
- If you did not give the services-config.xml a full path to Drupal Services for the endpoint uri you will need to do that (http://www.mydomain.com/services/amfphp)
That’s it, 2 steps. Air is up and working.






August 6th, 2009 - 2:45 am
hi, i have one doubt abt to create air application for drupal. i am abel to create web application o access drupal data(edit and create new node).but when i create air application, it shows “send failed ” error. not even retrieving data from drupal database.
i change the uri valu in service-config.xml file as “http://localhost/drupal/services/amfphp
August 6th, 2009 - 10:56 pm
vanitha,
did you also change your service domain when you moved from a web app to an air app? This is in the service module setup.
August 13th, 2009 - 5:53 am
I have all my services in localhost(“www” folder)… should i need to change that for desktop application(air application).
Now i am using drupal service module and amfphp module. i can manage the drupal db(add, edit) through web application, but for desktop application, it shows “send failed”.
i created the following example…
visit this pls…
http://drupal.org/node/178085
Here, they are adding node to drupal from web application, i tried with desktop but it shows error “sending failed”
Ple help me
August 13th, 2009 - 5:54 am
Thanks for ur reply Erik,
I have all my services in localhost(“www” folder)… should i need to change that for desktop application(air application).
Now i am using drupal service module and amfphp module. i can manage the drupal db(add, edit) through web application, but for desktop application, it shows “send failed”.
i created the following example…
visit this pls…
http://drupal.org/node/178085
Here, they are adding node to drupal from web application, i tried with desktop but it shows error “sending failed”
Ple help me
August 21st, 2009 - 12:37 am
hi, thanks for ur example..
I tried Ur example, its is working for me(in both web apps and desktop apps)
But one problem arises when i save node…
When i click submit, it will save into drupal database but it shows one error as follows
“[RPC Fault faultString=”Method views.get does not exist.” faultCode=”AMFPHP_RUNTIME_ERROR”"
i dont know wat it means…
One more thing,
i am NOT ABLE TO Register new user
In datagrid, it doesnt show any data from drupal database
Can u help me by giving some suggessions,…………..
Thank U!!!!!!
August 21st, 2009 - 10:19 am
vanitha,
When you go to the services module in drupal does the view.get method appear in the list of options? If not you may need to activate this option in the modules list. This should populate the datagrid as well because the datagrid is tied to the views return. Not sure about the new user creation. Do you have any information on what is happening with send and return info? Inserting trace statements may help to track down some info.
August 24th, 2009 - 2:10 am
thank u erik,
sry for late reply, i just went out…
view.get method is enabled in my website.It shows the view details when i give a view name. But in application it does not show in the database.
I just explain how the entire program works for me here…
initially when i register some user, it creates new user in the db without user name, pwd and mailid. after tat i just edit tat user details directly in the database. then i can save the node from the application. the node which is saved thru application is having the uid which was created by the application only.
Can u just explain me the “register button” functionality in the application.
whether it will save the new user details or it will login for node saving?
Clear me pls!!!
thank u!!!!!
August 25th, 2009 - 12:42 am
hi erik,
In ur example, when i click register button, it creates one new user.Then, when i save a node, it has the uid which was created by the application itself.
i want only to login with some username password which was already in database and want to upload data. i dont want to create new user.
Is there any way to do tat? I am in urgent need of that…
So pls help me as early as possible…
Thank u
August 25th, 2009 - 9:47 am
vanitha,
The user login is started when the user register results are returned. You would just need to move the login out of the result handler and execute when you would need it (probably on a form submission), it is looking for a user name and password
August 27th, 2009 - 2:43 am
erik,
i used the following code in the node saving function
var hashedArray:Array = hashKey(“user.login”);
user.login(hashedArray[0],hashedArray[1],hashedArray[2],hashedArray[3],sessionID,usernameInput.text,passwordInput.text);
i put the above code in the node saving function but when i save node it, it is saved with the “uid = 0″. It is also not visible in the website.
What might be the reason?
thank u
September 4th, 2009 - 5:41 am
Hi erik ,
i need one more help.
when i add a node to drupal database from flex application, i want to add the details of taxonomy. For eg, i want to create a node which should come under some category, i should select the category. To do that i am in need to get the tid(termid) and vid(vocaulary id). can u help me how could i retrieve both the ids for a selected terms.
thank u!!!