Hi,
I am trying to setup a link between a non-drupal site and a drupal 6.14. I am using xmlrpc to post pages to drupal. This is working fine for items such as title,body etc. but I need to also select taxonomy. The code is php and based on http://groups.drupal.org/node/27482 and all the taxonomy items are already setup on the site, I just need to link them into the node.save call. I have tried all the various possibilities of array, structs by name or by tid and none of them seem to work. I have searched for any examples but have come up blank. Could someone point me in the right direction.
The taxonomy is of the multipleselect but not tags variety and the services version is 6.x-2.x-dev if that makes any difference.
Thanks
James
Comments
the structure of the taxonomy
the structure of the taxonomy array in a node is kind of the following :
$node['taxonomy'][$vid][]=$tid;
You will have to xmlrpcval all of your values, which is something where I can't help you.
For a similar project i used Zend-Framework to do the data transfer to webservice, which is much handier than putting the XMLRPC code together by hand
Hope that helps a bit.
how would it look?
How would the code look if all the values have the xmlrpcval? I'm not able to get it figured out.
subscribe
james-
I am on the same page.
How to update taxonomy tag name in node, using xmlrpc-services
If you know any solutions suggest me...
-SVN
I'm not familiar with xmlrpc
I'm not familiar with xmlrpc implementation, but as far as taxonomy terms, you need to know that the structure returned from node.get is not what node.save expects as input (because it calls drupal_execute() to save the node. See http://drupal.org/node/275045 for a bit more info, especially comments by heyrocker, the maintainer.
Here are some comments from a function I use to convert a node's taxonomy array (as returned from noad_load()) into what node.save expects. The function is in Flash, so won't help much, but the comment is useful, I hope:
Thanks for you comments
I will check and reply back
multi dimensional array using xmlrpc
Hi,
Hi,
Finally I created my own set of method using node services to solve the problem!
Any one suggest a better way for handling multi dimensional array using xmlrpc via services module.
using node.save, I could not save the node with taxonomy tags !
So I written my own method to catch the node object and taxonomy terms and joined as needed for node_save.
But this is not the correct way I think ...
I want to pass a array(array) using xmlrpc and need to get and access in hook_services() ?
Thanks in Advance,
SVN
solution
serialized the array and pass to the hook_services().
hook_services() catch the serialized array and perform unserialize.
-SVN