Hi, thanks for the link - I did find it myself also but it could not solve my problem ... however I looked into the RequestHandler code and realized that Content-type that the Googles RESTClient 2.1 (Wiztools.org) is sending when posting XML content is "application/ xml; charset=UTF-8" and this is not understood by the Cake RequestHandler as an xml type, it should be either text/xml or application/xml, but not with the charset=UTF-8 addition. This can be added/replaced in RequestHandler by using controller's beforeFilter, for example.
Now I got it to work and parse POSTed XML data into $this->data. The second problem arises when you have a hierarchy of data in XML that you are trying to save, for example Recipe hasMany Author or something like that and you want to save the Recipe plus every posted author. When trying to access $this->data['Recipe']['Author'] it throws an error that you cannot access XmlObject like an array. Next I will try to use model's before/afterSave methods to see if I could get around this. I will post information about my experiments here, if somebody would ever bump into this kind of stuff. ;) On Jul 1, 7:15 pm, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > http://c7y.phparch.com/c/entry/1/art,cakephp-rest > > jimbo wrote: > > I am trying to implement a RESTful web service in Cake 1.2 (RC2) that > > could receive XML content through HTTP POST and basically add that > > content as a new row to a db (through a basic simple model) or > > updating an existing one (HTTP PUT). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---