• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: LEWOStuff (the stuff with JSON-RPC!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LEWOStuff (the stuff with JSON-RPC!)


  • Subject: Re: LEWOStuff (the stuff with JSON-RPC!)
  • From: Andrew Lindesay <email@hidden>
  • Date: Thu, 7 Jan 2010 13:04:59 +1300

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: LEWOStuff (the stuff with JSON-RPC!)
      • From: Henrique Gomes <email@hidden>
References: 
 >Re: LEWOStuff (the stuff with JSON-RPC!) (From: Henrique Gomes <email@hidden>)

  • Prev by Date: Running validation manually
  • Next by Date: Re: MySql plugin / driver bug
  • Previous by thread: Re: LEWOStuff (the stuff with JSON-RPC!)
  • Next by thread: Re: LEWOStuff (the stuff with JSON-RPC!)
  • Index(es):
    • Date
    • Thread