Re: CakePHP Built-in Webservices?
I'm interested in this component, are you able to put it on cakeforge or send it through perhaps? I'm after some ideas, as eventually i wish to offer authenticated RSS feeds through cake --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: CakePHP Built-in Webservices?
> Let me see if I understand this correctly, the built-in webservices is > an advanced routing feature that will translate an address of > http://example.com/xml/controller/action/ to a particular controller, > and action of controller::xml_action(). For the most part, yeah, the current web services stuff is just routing enhancements. > For this example, I would then have to create the xml by using DOM and > then output that xml to the client. For each function that I would want > to turn into a web service, I would create a new function in its > controller, and implement the web service by hand. If you want to do it the long way, I guess. What I usually do is not use the routes at all, but something more like: function beforeFilter( ) { if ($this->RequestHandler->accepts('rss')) { $this->viewPath .= '/rss'; } } Then, just create an rss folder within your view templates folder, so if I have a controller called EventsController, the full view path would be /app/views/events/rss. Then, just create one new template for each action. If you code your views efficiently, you shouldn't have to add or change any controller code other than the above. Also, I've never understood this thing with server-side DOM for XML output. Why not just write a template the same as you would for an HTML page? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: CakePHP Built-in Webservices?
Thanks everyone for your replies. Let me see if I understand this correctly, the built-in webservices is an advanced routing feature that will translate an address of http://example.com/xml/controller/action/ to a particular controller, and action of controller::xml_action(). For this example, I would then have to create the xml by using DOM and then output that xml to the client. For each function that I would want to turn into a web service, I would create a new function in its controller, and implement the web service by hand. Is this correct? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
RE: CakePHP Built-in Webservices?
> [mailto:[EMAIL PROTECTED] On Behalf Of Mika > Actually I'm quite interested in this too. Could you maybe please give > a proper working example with using soap? As I understand it, this is just a convenience for pretty URLs. So for instance, http://example.com/rss/events calls events_controller::rss_index() And http://example.com/rss/events/tokyo Calls events_controller::rss_tokyo() You could then select which content to put into the rss feed based on the called function I have made a simple RssComponent (using RSSWriter as a vendor), if you are interested in the code. -- Regards, Ryan Ginstrom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: CakePHP Built-in Webservices?
Actually I'm quite interested in this too. Could you maybe please give a proper working example with using soap? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: CakePHP Built-in Webservices?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gwoo, What do you mean by "a way to manage the code"? Could you elaborate a bit. Specifically in terms of SOAP. Darian gwoo wrote: > Webservices are currently setup to give you a way to manage the code. > Basically, it is an advanced routing system > > So, using our favorite blog example: > > http://example.com/rss/posts/view > would look for the rss_view() method in the PostsController > the view would be located in /posts/rss/view.thtml > > http://example.com/xml/posts/read > would look for the xml_read() method in the PostsController > the view would be located in /posts/xml/read.thtml > > available webservices: > rss > xml > rest > soap > xmlrpc > > Datasources are the works for 1.2. This will provide native support > for webservices CRUD. For now, using NuSoap as suggested along with > the routes would be a good solution. > > > > - -- Darian Anthony Patrick <[EMAIL PROTECTED]> -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEqX2xKpzEXPWA4IcRAvaPAJ4/ulG0TqprFbouJ27xgW3hdgQq/wCgipZ+ ZASauggHhUqknT9p5Ujnz4w= =DzjR -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: CakePHP Built-in Webservices?
Webservices are currently setup to give you a way to manage the code. Basically, it is an advanced routing system So, using our favorite blog example: http://example.com/rss/posts/view would look for the rss_view() method in the PostsController the view would be located in /posts/rss/view.thtml http://example.com/xml/posts/read would look for the xml_read() method in the PostsController the view would be located in /posts/xml/read.thtml available webservices: rss xml rest soap xmlrpc Datasources are the works for 1.2. This will provide native support for webservices CRUD. For now, using NuSoap as suggested along with the routes would be a good solution. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---