Services

Events happening in the community are now at Drupal community events on www.drupal.org.

This is a discussion and working group for anyone interested in the Services module and related modules. This module was created out of a need for a standardized solution of integrating external applications with Drupal, specifically Flash and Flex applications. Visit the issues page for all bug reports. Also visit the Services Handbook for information and examples.

ilovedrupal-gdo's picture

Drupal Authorization

Hello. I am trying to get services using authorization to work but I am running into an issue. I have services 6.x-1.x-dev installed, key authentication, json server and xmlrpc server. I have the node,search,system,user and views service turned on and I am running the latest stable drupal 6. I am trying to use the python script below to connect and return a node from services (I have also tried with a view and also using php but run into similar problems). If I go to site building -> services -> settings and remove the use keys and use sessid (and don't send the auth.

Read more
ZDavid's picture

"Token has been used previously for a request"

Thanks for the help everyone. I finally got the c# program logged in and reading nodes correctly with an API key.

Now the exception being thrown when I try to save a new node is "Token has been used previously for a request"

Why does this come up?

Read more
ZDavid's picture

XML-RPC methods/struct to create new node question

I'm trying to create a simple c# app that logs into my drupal site and creates a node, doesn't need to be secure or fancy.


[XmlRpcMissingMapping(MappingAction.Ignore)]
public struct DrupalUser
{
// Fields
public string name;
public string email;
}

    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public struct Drupal
    {

        public string sessionid;
        public DrupalUser user;

    }

    public struct DrupalNode
    {
Read more
bstoppel's picture

No permission for views_service module

I encountered another problem that I am assuming has to do with the lack of permissions for views_service.

First, my setup is completely up-to-date.

The problem is that from Flash on my desktop Services doesn't return any results from Views, ie the returned object is blank. When I change to a get a node, it works. The returned object contains all the pertinent information.

Read more
ilovedrupal-gdo's picture

Simple use of Services with JSON

I am trying a simple test with Drupal 6, Services, JSON Server but am running into the following error. To make things as simple as possible, I tried this with the curl command line program (although I have also tried it in python and php). I have services and json server installed and can go to services at mysite.com/admin/build/services/browse/service.name and successfully browse a view I made using views.get. I also did this with node.get However (all on the same machine) when I try:

curl --data method=views.get --data view_name="myview" http://mysite/services/json

or

Read more
timmillwood's picture

node.save with JSON Server

I am using the services module along with JSON server to create an Adobe Air app.

function send_post(){
    obj = new Object;
  obj.type = "story";
  obj.title = $('#new_post').val();
    obj.changed = new Date().getTime();
    obj.body = "test";
   obj.uid = uid;
obj.nid = "0"
   
   console.log(obj);
  $.getJSON(service + "?jsoncallback=?", {method: "node.save", sessid: sessid, node: obj}, function(data){
       console.log(data);
         listposts();   
      
   });
}
Read more
cstachris's picture

system.service - take down for maintenance, unload module, load module

Hi - I was wondering if there was a set/get maintenance mode through the services module. Also, the ability to disable and enable modules?

Read more
cmcintosh's picture

Moving Servers, old flash app now throwing badVersion error

ok, i have 6.10 on the new server, I am running Services 6.x-0.13, AMFPHP 6.x-1.x-dev. My flash apps cannot connect to the new host(now a goDaddy server). I am able to connect to the old host with no issues. I am getting the following error:
unhandled NetStatusEvent: NetConnection.Call.BadVersion. If you have any idea what may be causing this let me know.

I am hoping maybe its a permissions error i have set incorrectly somewhere.

Thanks,
Chris

Read more
bstoppel's picture

views.get returns an empty array

My Setup
Drupal 6.10
Services 6.x-1.x-dev
AMFPHP 6.x-1.0-beta1
XMLRPC Server 6.x-1.x-dev
Views Service 6.x-1.x-dev
Views 6.x-2.5

The problem
I set up a view to pull a certain content type out with relevant info. It works great in Views. All of the information is visible when I preview it inside of views. When I try views.get within Services, the result is an empty array. There aren't any error messages. Just an empty array - Array().

What am I doing wrong?

Read more
toursheet's picture

Geo June - Participate!

Help move Drupal a crucial step closer to being a true Geospatial CMS!

The Drupal community and the Twin Cities Drupal Group invites us all for Geo June, a month-long series of events and collaborative projects. There will be coding, documenting and demonstrating solutions for data collection and mapping.

You can join in the fun by helping the issue queue for Geo and related modules, or by participating in other ways:

Read more
Chris Charlton's picture

LA Drupal videos galore (DrupalCampLA + Meetings)

For over a year LA Drupal has been recording our meetings and many of our events. View the videos online... http://ladrupal.blip.tv

Subscribe to our video podcast... http://ladrupal.blip.tv/rss (available directly on iTunes too)

We provide these videos for free for people to learn Drupal of course. Over the next handful of weeks you will see us release videos from our meetings and DrupalCampLA '08. Learn the basics of Drupal, theme design, module development, advanced views, Services module (Flash + Drupal), and many, many more topics all relating to Drupal.

Follow us on twitter... https://twitter.com/ladrupal

Read more
mrconnerton's picture

Flex: Save binary bytearray data from actionscript 3 to drupal with amfphp

I have been looking for a way to upload a file in flex and save the bytearray directly to drupal via amf. This was written on Drupal 5 however it can easily be added to Drupal 6. Just note there is already a file_services module in D6 and not d5. Here's what I have come up with that works great:

Read more
jkasdorf's picture

Saving Node with Tagged Taxonomy Values Vocabulary

Hi,

Been looking around a lot of different locations for a possible solution to this. Looked at the solution on this page http://hybridhacking.com/node/27 and have not been able to get this working.

As of right now I am using a CCK Content type with two int fields and 2 taxonomy vocabularies, one named "Sector". Each of these vocabularies is a tagged type of term.

I'm using Flex to create this and when I save the node from Flex, it says that it's successful but there is no change to the terms being displayed.

Read more
wouter99999's picture

user.login with persistent login module

Hi, is it possible to do a persistent login from a remote application with user.login combined with the persistent login module?

Read more
tseven's picture

Views.get is not returning file path from a file field defined in a view.

What I'm using:
Drupal 6.11

Plugin version combos I've tried:
Services 6.x-0.13
Views 6.x-2.5

and

Services 6.x-1.x-dev
Views 6.x-2.x-dev

I've created a node type named Emoticon with a File field type of Image.

Inside the emoticon view, I specified a field which returns the "Path to file" of the emoticon.

When previewing the view inside the View editor the path field is displayed properly.

When calling this view from the Views.get form inside Services I get:

[node_data_field_chat_emoticon_field_chat_emoticon_fid] => 79

Read more
Chris Charlton's picture

Are you using Flex, Flash, or Adobe AIR in your Drupal sites?

Yes, Flex
16% (9 votes)
Yes, Flash
33% (18 votes)
Yes, AIR
0% (0 votes)
Yes, more than one actionscript based technology
20% (11 votes)
No, not yet
18% (10 votes)
No, I don't plan to
13% (7 votes)
Total votes: 55
firnnauriel's picture

Help on Channel disconnected error

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);
}
Read more
firnnauriel's picture

Accessing functions of other modules

I am creating a sample module that will create a wrapper function of another module. For example, I have a profile_service module (that extends Service module) and would like to exposed an API named profile.get(). Within this function, it will call the user.get() of user_service. I have tried this in code:

function profile_service_get($uid) {
print_r("Calling the function of another module..");
include("../../services/services/user_service.inc");

   return user_service_get($uid);
}

I'm getting this error:

Read more
nhchau's picture

How to fix "XML-RPC server accepts POST requests only." error?

I tried Services and it methods work, except XML-RPC. Testing XML-RPC with Drupal 6.10 (and 5.16) by click into http://mysite.com/services/xmlrpc I got the following message: "XML-RPC server accepts POST requests only."
How to fix this?

Read more
thompcha's picture

PHP Script for XML-RPC calls from outside Drupal

Here is a set of PHP functions I put together for calling Drupal's core XML-RPC methods without using the Services API:


<?php
function assemble_request($method, $args = array(), $dump_request = FALSE){
$request = xmlrpc_encode_request($method,$args);
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml",
'content' => $request
)));
if($dump_request){
echo '

<

pre>';
echo htmlentities($request);

Read more
Subscribe with RSS Syndicate content

Services

Group organizers

Group categories

Group notifications

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