<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> </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
“lastname”, “geheniau” and not “lastname => “geheniau” ;)<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> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It’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> </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> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><o:p> </o:p></span></p>
<div>
<p class=MsoNormal>On Fri, Dec 5, 2008 at 12:27 AM, <<a
href="mailto:didier.geheniau@feas.net">didier.geheniau@feas.net</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>Hi all,<br>
<br>
<br>
I have the following simple code:<br>
<br>
<?<br>
include ("lib/xmlrpc.inc");<br>
include ("lib/xmlrpcs.inc");<br>
include ("lib/xmlrpc_wrappers.inc");<br>
<br>
$userInfo = new xmlrpcval ( array(<br>
"dgeheniau",
new xmlrpcval (<br>
array(<br>
"lastname", new xmlrpcval
("Geheniau",<br>
"string"),<br>
"firstname", new xmlrpcval
("Didier",<br>
"string"),<br>
"email", new xmlrpcval ("<a
href="mailto:email@address.com">email@address.com</a>",<br>
"string")<br>
),<br>
"struct")<br>
), "struct");<br>
<br>
$getUserInfo_sig = array(array($xmlrpcStruct, $xmlrpcString));<br>
$getUserInfo_doc = "This function will return all know user info!";<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>
global $userInfo;<br>
return new xmlrpcresp(new<br>
xmlrpcval($userInfo->structmem("$userName"), "struct"));<br>
<br>
}<br>
<br>
#$o=new xmlrpc_server_methods_container;<br>
$a=array(<br>
"user.getUserInfo" => array(<br>
"function"
=> "getUserInfo",<br>
"signature"
=> $getUserInfo_sig,<br>
"docstring"
=> $getUserInfo_doc<br>
)<br>
);<br>
<br>
$s=new xmlrpc_server($a, false);<br>
$s->setdebug(3);<br>
$s->compress_response = true;<br>
$s->service();<br>
?><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> </o:p></p>
</div>
</div>
</body>
</html>