<slide title='method.metallopdb'>
<example title='Using method.metallopdb from the XML-RPC service' result='0'
 fontsize='1.0em'>
<![CDATA[
<?php
error_reporting(1);
require_once "XML/RPC.php";
require_once "slides/mdb/scripts/xmlrpc_util.php";
require_once "slides/mdb/scripts/mdb_tests.cfg";

$c=new XML_RPC_Client(XMLRPC_URI, MDB_SERVER_NAME, MDB_SERVER_PORT);

$metal = new XML_RPC_Value('zn');
$mode = new XML_RPC_Value('random');
$count = new XML_RPC_Value(5, $GLOBALS['XML_RPC_Int']);
$format = new XML_RPC_Value('array');
$method = 'method.metallopdb';
$fmt = "<h3>Parameters: metal='%s', mode='%s', count=%d, format='%s'</h3>";
printf($fmt, $metal->scalarval(), $mode->scalarval(), 
   $count->scalarval(), $format->scalarval());

$msg = new XML_RPC_Message($method, array($metal, $mode, $count, $format));
$r = $c->send($msg);
$v = $r->value();
if (!$r->faultCode()) {
 echo toTable2(XML_RPC_decode($v));
} else {
 echo "<pre>\n";
 echo "ERROR: ".$r->faultCode()." -- ".$r->faultString();
 echo "</pre>\n";
}
?>
]]>
</example>
<example title='Output' type='html' filename='output/xmlrpc_method_metallopdb_out.html'
 fontsize='1.5em' examplebackground='#ffffdd'/>
</slide>
