<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>The
doc and examples are quite clear (in my humble opinion) indicating
that:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>- the
client->send() method returns an xmlrpcresp object</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>- the
resp->value() method returns an xmlrpcval object (of course you should check
for the error code first, to see if there was a communication
error)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>-
xmlrpcval objects have some methods that can be used depending on their
type. For structs and arrays, in particular:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>
+ for xmlrpcval of type array: val->arraysize(),
val->arraymem()</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>
+ for xmlrpcval of type struct: val->structsize(), val->structmem(),
val->structeach(), val->structreset(),
val->structmemexixts(),</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>-
there is also a second method to access the data of an xmlrpcval object,
decoding it all-at-once into plain php values: $php_values =
php_xmlrpc_decode($xmlrpcval);</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006>here's a code snippet to get you
running:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN
class=891364209-03022006> $f = new xmlrpcmsg('system.methodSignature',
array(new xmlrpcval(system.methodHelp));<BR> $c = new
xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);<BR> $r =
$c->send($f);<BR> if(!$r->faultCode())<BR> {<BR> $v =
php_xmlrpc_decode($r->value());</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN
class=891364209-03022006> var_dump($v); // this will echo a standard
php array. You can access it as you prefer</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN
class=891364209-03022006> $v = $r->value();<BR> $signum =
$v->arraysize();<BR> for($i = 0; $i < $signum; $i++)<BR>
{<BR> $sig = $v->arraymem($i);<BR> $paramsnums =
$sig->arraysize()-1;<BR> $retval =
$sig->arraymem(0);<BR> echo "Found a signature\n Return
type is: ".$retval->scalarval()."\n";<BR> for ($j = 1; $j <=
$paramsnums; $j++)<BR> {<BR> $param =
$sig->arraymem($j);<BR> echo " Param number $j
must be of type: ".$param->scalarval()."\n";<BR> }<BR>
}</SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2><SPAN
class=891364209-03022006><BR> }</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>PS: I
think you might have a problem due to the linguistic barrier: what is your
native language? I can answer in italian or french if you
prefer...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=891364209-03022006>Hope
it helps</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006>Gaetano</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=891364209-03022006></SPAN></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
phpxmlrpc-bounces@lists.usefulinc.com
[mailto:phpxmlrpc-bounces@lists.usefulinc.com]<B>On Behalf Of </B>Overpeer
---<BR><B>Sent:</B> Friday, February 03, 2006 10:32 AM<BR><B>To:</B>
phpxmlrpc@lists.usefulinc.com<BR><B>Subject:</B> [phpxmlrpc] I'm Lost with
phpxmlrpc<BR><BR></FONT></DIV>Hello all in my first message to the
list.<BR><BR>I'm trying implement a simple webservice with xml-rpc, I´m make
the client with phpxmlrpc on Apache2 on GNU/Linux.<BR><BR>The servers, is
makes in Delphi and works OK, it send mi things like this:<BR><PRE><CODE><methodResponse><BR><params><BR><param><BR><value><array><BR><data><BR><value><struct><BR><member><name>ITI</name><BR><value><string>311</string></value>
<BR></member><BR></struct></value><BR><value><struct><BR><member><name>ITI</name><BR><value><string>310</string></value><BR></member><BR></struct></value>
<BR><value><struct><BR><member><name>ITI</name><BR><value><string>312</string></value><BR></member><BR></struct></value><BR></data><BR></array></value>
<BR></param><BR></params><BR></methodResponse></CODE></PRE>Whats
could be the logic structure to access the structures and arrays for procesing
the data?? I has read the documentation but i can't find examples with clients
and structures, and de commads explain don't be clear for me :|<BR><BR>A lot
of thanks ;)<BR></BLOCKQUOTE></BODY></HTML>