[OGo-XML-RPC] Which ID for person.getById

Adam Tauno Williams xmlrpc@opengroupware.org
Tue, 02 May 2006 08:44:06 -0400


--=-nu6u8TaB0s+5zYdbqHv/
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> I have a question regarding the person.getById:
> First, I got a list of alle persons via PHP with=20
> The List shows like=20
> object(XML_RPC_Value)#4 (2) { ["me"]=3D>  array(1) { ["string"]=3D> =20
> string(42) "skyrix://bueckemeyer/bueckemeyer-ogo/10000" }=20
> ["mytype"]=3D>  int(1) } object(XML_RPC_Value)#5 (2) { ["me"]=3D> =20
> array(1) { ["string"]=3D>  string(42) "skyrix://bueckemeyer/bueckemeyer-
> ogo/10120" } ["mytype"]=3D>  int(1) } object(XML_RPC_Value)#6 (2) {=20
> ["me"]=3D>  array(1) { ["string"]=3D>  string(42)=20
> "skyrix://bueckemeyer/bueckemeyer-ogo/10570" } ["mytype"]=3D>  int(1) }=20
> When i then try to geht a person document from the User with the id=20
> 10570 with=20
>  $msg =3D new XML_RPC_Message("person.getById", new=20
> XML_RPC_Message('10570'));
> the result is NULL.
> Do I need another ID? Does someone know whats's wrong?

In POGI we do a (roughly) -
$this->client   =3D new XML_RPC_Client($this->uri, $this->hostname,
$this->port);
$params =3D array(new XML_RPC_Value($id, "int"));
$message =3D new XML_RPC_Message('person.getById', $params);
$response  =3D $this->client->send($message);

You can view the POGI source code here -
http://svn.opengroupware.org/viewcvs/pogi/?root=3DOGoProjects - I have
just about everything working.

BTW, some versions of the PEAR XML-RPC module think ISO8601 date strings
in the response payload are base64 encoded.  This is incorrect (probably
some moron thinking their wacky BLOG API is some kind of reference
standard),  so if dates look completely thrashed you need to comment out
the line -
$XML_RPC_xh[$parser]['value'] =3D
base64_decode($XML_RPC_xh[$parser]['ac']); - in the "case
'DATETIME.ISO8601':" clause of "XML_RPC_ee" in RPC.php   It took me ages
to figure this out, why it worked on one box and not on another.
Grrrr....


--=-nu6u8TaB0s+5zYdbqHv/
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEV1QWLRePpNle04MRArmNAJ9vVLQ86fm97e5u57NxAuzBeoPArQCbB/qw
1XhYSr49cpxoxUNKl/aKrNA=
=SLsY
-----END PGP SIGNATURE-----

--=-nu6u8TaB0s+5zYdbqHv/--