I do this except that I pass strings and use NSPropertyListSerialization. WebObjects creates ASCII plists when you invoke toString() and Cocoa figures out the format. WebObjects' NSPropertyListSerialization handles XML and ASCII plists.

NSData *data = [propertyListXML dataUsingEncoding: NSUTF8StringEncoding];
NSString *errorString = nil;
NSPropertyListFormat format; // will contain the format
id propertyList = [NSPropertyListSerialization propertyListFromData:data
                        
mutabilityOption:NSPropertyListMutableContainersAndLeaves
                                  format:&format
                errorDescription:&errorString];

In WebObjects, it's a little easier
Object plist = NSPropertyListSerialization.propertyListFromString (plistString);

I like this because I stick with a standard built-in WebSerices type (String) and both frameworks already have serialization and deserialization built-in so I just use what's there. Don't fight the frameworks ;).

Marc

On May 24, 2006, at 11:41 AM, Frank Herzog wrote:

Hi all,

I'm trying to build a WO web services application with a Cocoa client. I pass the data from the server to the client as an NSArray of NSDictionaries, which works fine. The same approach fails from the client to the server because, as I guess, the NSArray and NSDictionary classes do not have deserializers registered. Is there a workaround for this? Could I somehow create the deserializers by myself?

Thanks for any help!

Frank
_______________________________________________
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/marcrespass% 40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
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 archive@mail-archive.com

Reply via email to