<!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><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>Uhm, I
might be getting it wrong, but it looks like you took the code I proposed
as used it as-is (almost) in your application.</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>It was
actually meant as an example.</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>More
specifically, If I read it correctly, your XMLRPC looks like
this:</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>ARRAY
=> {</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>
STRUCT => {</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2> ITINERARIO_CODIGO => XXX</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>
}</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>To
access the 'itinerario codigo' data, you need to use not <FONT
face="Courier New">arraymem($i),</FONT> but rather <FONT
face="Courier New">stuctmem('ITINERARIO_CODIGO')</FONT> on line 60, since
$sig will be an xmlrpcval of type 'struct' at that point.</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>I see
you are also trying to access 2 members of the struct (member 0 and
member 1) on line 59 and line 60, but you only have one.</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff size=2>here's
da code:</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2>...</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2>$numvals = $v->arraysize();</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2>for ($i = 0; $i < $numvals; $i++)</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2> $innerval = $v->arraymem($i); // fecth element i of
array</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2> $itinerary_code = $innerval->structmem('ITINERARIO_CODIGO'); //
retrieve member out of struct element</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT color=#0000ff size=2>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2> $itinerary_code = $itinerary_code->scalarval(); // get php
string out of element</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face="Courier New" color=#0000ff
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=052480314-03022006><FONT face=Arial color=#0000ff
size=2>etc...</FONT></SPAN></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 1:09 PM<BR><B>To:</B>
phpxmlrpc@lists.usefulinc.com<BR><B>Subject:</B> [phpxmlrpc] I'm Lost with
phpxmlrpc<BR><BR></FONT></DIV>Hello, i probed it but:<BR><BR>$signum =
$v->arraysize();<BR>
for($i = 0; $i < $signum; $i++)<BR>
{<BR>
print
$i; <BR>
$sig =
$v->arraymem($i);<BR>
$paramsnums =
$sig->arraysize()-1;<BR>
$retval =
$sig->arraymem(0);<BR>
$retval =
$sig->arraymem(1); <BR>
<BR>
print
$retval->scalarval();
// Error here ----- Line 62<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>
<BR>
}
<BR><BR>The error is: <B>Fatal error</B>: Call to a member
function on a non-object in <B>/var/www/localhost/htdocs/client.php</B> on
line <B>62</B><BR><BR>The xml-rpc incoming is: <BR><BR><?xml
version="1.0"?><BR><methodResponse><BR>
<params><BR> <param><BR><value><BR>
<array><BR> <data><BR><value><BR>
<struct><BR>
<member><BR>
<name>ITINERARIO_CODIGO</name><BR>
<value><string>311</string></value><BR>
</member><BR>
</struct><BR></value><BR><BR><value><BR>
<struct><BR>
<member><BR>
<name>ITINERARIO_CODIGO</name><BR>
<value><string>310</string></value><BR>
</member><BR> </struct><BR></value><BR><BR>
</data><BR></array><BR></value><BR><BR>
</param><BR>
</params><BR></methodResponse><BR><BR><BR>Some idea??? :S
:S<BR><BR>A lot of thanks </BLOCKQUOTE></BODY></HTML>