<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
text="#000000">
I downloaded and installed xmlrpc.inc, and looked at the example in
the node below. It wasn't evident how to handle multiple method
parameters and a type other than int on a parameter, or why the url
was broken into two parts. So I read the class docs (surprise!) and
assembled the code below. There are a couple different forms given
in the docs for each call, so I used the simpler version for a
couple.<br>
<br>
When I hit the service url from the browser, I get 'xml-rpc accepts
POST request only' as I should, the point being that it responds.
When I execute the code below, it ends up timing out with the error
being KO. Error: Connect error: A connection attempt failed because
the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed
to respond. (10060)<br>
<br>
<?php<br>
// Load the XML-RPC for PHP library from wherever you've put it<br>
// File path relative to the Drupal root<br>
require_once("./www/sites/all/libraries/xmlrpc/xmlrpc.inc");<br>
<br>
// Create an XMLRPC message<br>
$m = new xmlrpcmsg('video.transcribe',<br>
array(<br>
new xmlrpcval("12345", "int"), <br>
new xmlrpcval("hello world", "string")<br>
)<br>
);<br>
// Create a connection to the remote server<br>
$c = new xmlrpc_client('<a class="moz-txt-link-freetext" href="http://localhost/www/services/xmlrpc">http://localhost/www/services/xmlrpc</a>');<br>
$c->return_type = 'phpvals';<br>
// Send the message to the remote server and get the response<br>
$r = $c->send($m);<br>
<br>
if ($r->faultCode()) echo 'KO. Error: '.$r->faultString();
else print '<pre>' . print_r($r->value(),1) .
'</pre>';<br>
?> <br>
<p style="margin-bottom: 0cm; margin-top: 0pt;"><br>
</p>
<blockquote cite="mid:4D7500A2.3080909@ayendesigns.com" type="cite">
<p style="margin-bottom: 0cm; margin-top: 0pt;">On 03/05/2011
10:37 AM, Victor Kane wrote: </p>
<blockquote><small>The code can easily be adapted to not using the
app key, the difference in the parameter signature is clear in
the services test page.<br>
<br>
Doesn't this Drupal handbook page (<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://drupal.org/node/816934">http://drupal.org/node/816934</a>)
help?</small><br>
</blockquote>
<p style="margin-bottom: 0cm; margin-top: 0pt;">On 03/05/2011
09:49 AM, Blake Senftner wrote:<br>
</p>
<blockquote
cite="mid:F117874E-6C8A-489C-8F3A-591E943A4AE4@earthlink.net"
type="cite">
<pre wrap="">Jeff,
Take a look at this d.o page:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drupal.org/node/816934">http://drupal.org/node/816934</a>
It shows example XMLRPC code for Services 6.x-2.0 (which predates the 6.x-2.2 rewrite) using both with and without API keys. (The example code showing logic with API key authentication is a comment at the bottom.) Perhaps this will provide the comparison info you seek to learn how your parameters need to be handled without authentication.
</pre>
</blockquote>
</blockquote>
</body>
</html>