Andrew,

Thank you, that did it. I was thinking I had to change something on the server, 
I now realize the 'on the wire' format is always the same, right? It's the 
client that has to be instructed on how to deserialize.

But does it mean that If I have the EO Model also on the client it will 
instantiate the right classes? I get this now :

ERROR er.extensions.eof.ERXEntityClassDescription  - Entity Obra not found in 
the default model group!

Also if I'm also using wonder, what's your advice? Better to subclass ERXApp 
and only implement the bits need for JSONRPC?

Thank you again for sharing your work and answering questions.

Best regards,

Henrique

On Jan 7, 2010, at 12:04 AM, Andrew Lindesay wrote:

> Hi Henrique;
> 
> Thanks for the email.
> 
> Because the JSON-RPC system intentionally transports "model chunks" and not 
> complete parts of the model, the concept of de-serialising to an EO on the 
> client-side makes less sense.  This is a conscious design decision.
> 
> For WebObjects applications which are consumers of JSON-RPC web services, the 
> client in the WebObjects application is intended to produce instances of...
> 
>       nz.co.lindesay.common.webobjects.eo.proxy.LEEOEnterpriseObjectProxy
> 
> ...instead of...
> 
>       nz.co.lindesay.common.eo.proxy.LEEOEnterpriseObjectProxy
> 
> This class conforms to NSKeyValueCoding and should do what you want.  This 
> behaviour will automatically happen if you add this to your application 
> constructor in the client;
> 
>       static
>       {
>               
> LEJSONFormatFactory.singleton().setFormatClass(LEWOJSONFormat.class);
>       }
> 
> (If you are subclassing from LEWOApplication then this happens by default.)
> 
> Hope this helps and let me know how you get on.
> 
> cheers
> 
> 
>> I am starting with your JSON RPC precisely on a WO->Wo scenario. Looking at 
>> the pdf, the examples and some mails I've been able to have the 'server' WOA 
>> respond to login request and send simple answers like strings. When I try to 
>> return EO's ( an NSArray of them) the client gets an ArrayList of 
>> nz.co.lindesay.common.eo.proxy.LEEOEnterpriseObjectProxy which do not have 
>> KVC. 
>> How do I convince the server (or is it the client? to send an *NSArray*  of 
>> nz.co.lindesay.common.WEBOBJECTS.eo.proxy.LEEOEnterpriseObjectProxy ??
> ...
>> Thanks in advance for any tips.
> 
> ___
> Andrew Lindesay
> www.lindesay.co.nz
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to