I'm having problems with saving cck fields via as2 and the xmlrpc service

Events happening in the community are now at Drupal community events on www.drupal.org.
timosea's picture

Hi there, I'm still having fun with services, as2 and node.save, I moved on from initial experiment with swx to using the xmlrpc service, which initially seemed really easy due to some great posts including this one by d0ublej0's http://drupal.org/node/82114#comment-263405 . Everything is working nicely until I try and add content to a CCK field, i think this post http://drupal.org/node/256074 describes correct structure, but i'm unsure on how to create this structure using the mattism as2 xmlrpc classes. Can anyone nudge me in the right direct, I'm using as2, drupal 5.7, cck-5.x-1.7 and services-5.x-0.92?

import com.mattism.http.xmlrpc.Connection;
import com.mattism.http.xmlrpc.ConnectionImpl;
function createNode ( sTitle , sBody ) {
       var co:Connection = new ConnectionImpl();
  co.setUrl(url);
    co.onLoad = onCreateNode;
  //var node:Object = {type:"mytype",status:"1",title:sTitle ,body:sBody, name:userName};
    //co.addParam( api_key, "string" );
  var node = new Object()
    node.type="mytype"
   node.status="1"
  node.title=sTitle
  node.body=sBody
    node.name=userName
//node.field_filelocation = new Array({value:"http://www.myfilelocation.com/id1.swf"})
   node.field_filelocation ="<value><array><data><value><member><name>value</name><value><string>somewhere.jpg</string></value></member></value></data></array></value>"
    co.addParam(sessid, "string" );
  co.addParam(node,XMLRPCDataTypes.STRUCT);
  co.call('node.save');
    updateStatus("creating node...");
}

the related method call for node.field_filelocation is

<member><name>field_filelocation</name><value>&lt;value&gt;&lt;array&gt;&lt;data&gt;&lt;value&gt;&lt;member&gt;&lt;name&gt;value&lt;/name&gt;&lt;value&gt;&lt;string&gt;somewhere.jpg&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;&lt;/value&gt;&lt;/data&gt;&lt;/array&gt;&lt;/value&gt;</value></member>

Services

Group organizers

Group categories

Group notifications

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