0 Replies Latest reply on Oct 4, 2006 3:06 AM by Giuseppe Muccioli

    XML-RPC with drupal CMS

    Giuseppe Muccioli Level 1
      I'm trying to use the xml-rpc mechanism provided by drupal.
      All works fine with the XML-RPC flash library and Actionscript 2.0 ( http://xmlrpcflash.mattism.com)
      How can I call a custom xmlrpc method from Actionscript 3?
      This it's my best result:
      REQUEST:
      var parameters:String="<methodCall><methodName>ldap.getXMLPeople</methodName><params/></metho dCall>";
      var XML_URL:String = " http://serverName/drupal/xmlrpc.php";
      var XMLURL:URLRequest = new URLRequest(XML_URL);
      XMLURL.data = new URLVariables("xml="+parameters);
      XMLURL.method=URLRequestMethod.POST;
      var loader:URLLoader = new URLLoader(XMLURL);

      RESULT FROM XML-RPC SERVER:
      <methodResponse>
      <fault>
      <value>
      <struct>
      <member>
      <name>faultCode</name>
      <value>
      <int>-32700</int>
      </value>
      </member>
      <member>
      <name>faultString</name>
      <value>
      <string>Parse error. Request not well formed.</string>
      </value>
      </member>
      </struct>
      </value>
      </fault>
      </methodResponse>

      I've also tried with HTTPService and method="POST", but sniffing with ServiceCapture program, the request it's always GET and the xmlrpc server respond with "XML-RPC server accepts POST requests only."
      Can someone please help me?
      -g