Re: Attempt failing.

Dirk Bartley <[email protected]> Sat, 05 Sep 2009 08:50:20 -0400
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <1252155020.3840.0.camel@workfast>
Yup, that did it.

Dirk

-----Original Message-----
From: Adam Tauno Williams <[email protected]>
Reply-to: [email protected]
To: [email protected]
Subject: Re: [OGo-XML-RPC] Attempt failing.
Date: Fri, 04 Sep 2009 15:57:33 -0400

This is the same  instance where Consonance is working?

> Looking for an example of how to format a query in php.
> <?php
> #include "zogi+memcache.php";
> require_once("zogi.php");
> $hostname = "mta1";
> $username = "dbartley";
> $password = "xx";
> $ogo = new OpenGroupwareServer($hostname, $username, $password);
> print $ogo->getLoginAccountId();
> #query = [ { 'conjunction' : 'AND', 'key' : 'name', 'value' : last,
> 'expression' : 'EQUALS' } ]
> $entityName = 'Contact';
> $criteria = array();
> $criteria['key'] = 'name';
> $criteria['value'] = 'Conrad';
> $criteria['expression'] = 'EQUALS';
> #print_r($criteria);
> $flags = array();
> $detail = 0;
> $result = $ogo->searchForObjects($entityName, $criteria, $detail = 1,
> $flags);
> print_r($result);
> ?>
> yeilds the following results.  I imagine I'm just composing the criteria
> incorrectly.
> 10220Array ( [faultCode] => 0 [faultString] => ObjcRuntimeException:
> NSConcreteSmallDictionary (instance) does not recognize objectAtIndex:
> { methodName = "zogi.searchForObjects"; methodParameters = ( Contact,
> { expression = EQUALS; key = name; value = Conrad; }, 1, {} ); } )

Try -
searchForObjects($entityName, array($criteria), $detail = 1, $flags);

I believe criteria has to be an array of criteria.


-- 
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc