<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=NL link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>That was one problem and de second one i found out: my array was
&#8220;lastname&#8221;, &#8220;geheniau&#8221; and not &#8220;lastname =&gt; &#8220;geheniau&#8221; ;)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It&#8217;s working now<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<div>

<p class=MsoNormal>On Fri, Dec 5, 2008 at 12:27 AM, &lt;<a
href="mailto:didier.geheniau@feas.net">didier.geheniau@feas.net</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>Hi all,<br>
<br>
<br>
I have the following simple code:<br>
<br>
&lt;?<br>
include (&quot;lib/xmlrpc.inc&quot;);<br>
include (&quot;lib/xmlrpcs.inc&quot;);<br>
include (&quot;lib/xmlrpc_wrappers.inc&quot;);<br>
<br>
$userInfo = new xmlrpcval ( array(<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;dgeheniau&quot;,
new xmlrpcval (<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;array(<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;lastname&quot;, new xmlrpcval
(&quot;Geheniau&quot;,<br>
&quot;string&quot;),<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;firstname&quot;, new xmlrpcval
(&quot;Didier&quot;,<br>
&quot;string&quot;),<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;email&quot;, new xmlrpcval (&quot;<a
href="mailto:email@address.com">email@address.com</a>&quot;,<br>
&quot;string&quot;)<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;),<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;&quot;struct&quot;)<br>
&nbsp; &nbsp; &nbsp; &nbsp;), &quot;struct&quot;);<br>
<br>
$getUserInfo_sig = array(array($xmlrpcStruct, $xmlrpcString));<br>
$getUserInfo_doc = &quot;This function will return all know user info!&quot;;<br>
<br>
function getUserInfo ($userName){<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
Here $userName will not be a string but an object.<br>
You will need to extract the 1st param received from this object, and its then
its string value.<br>
Btw, if you are doing all the encoding/decoding from php values to xmlrpc
values by hand you do not need to include xmlrpc_wrappers.inc - that lib is used
when you want to automatically turn plain php functions (ie functions that do
not deal with xmlrpcvals) into server methods.<br>
<br>
Bye<br>
Gaetano<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>

<p class=MsoNormal><br>
&nbsp; &nbsp; &nbsp; &nbsp;global $userInfo;<br>
&nbsp; &nbsp; &nbsp; &nbsp;return new xmlrpcresp(new<br>
xmlrpcval($userInfo-&gt;structmem(&quot;$userName&quot;), &quot;struct&quot;));<br>
<br>
}<br>
<br>
#$o=new xmlrpc_server_methods_container;<br>
$a=array(<br>
&nbsp; &nbsp; &nbsp; &nbsp;&quot;user.getUserInfo&quot; =&gt; array(<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;function&quot;
=&gt; &quot;getUserInfo&quot;,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;signature&quot;
=&gt; $getUserInfo_sig,<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;docstring&quot;
=&gt; $getUserInfo_doc<br>
&nbsp; &nbsp; &nbsp; &nbsp;)<br>
);<br>
<br>
$s=new xmlrpc_server($a, false);<br>
$s-&gt;setdebug(3);<br>
$s-&gt;compress_response = true;<br>
$s-&gt;service();<br>
?&gt;<br>
<br>
In the client I get:<br>
<br>
+++PROCESSING ERRORS AND WARNINGS+++<br>
Object of class xmlrpcmsg could not be converted to string<br>
Undefined index:<br>
+++END+++<br>
<br>
What am I doing wrong?<br>
<br>
Regards,<br>
<br>
Didier<o:p></o:p></p>

</blockquote>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>