The following is my ASSUMPTION
When your non-cake app request XML info from your cake app, it is
basically requesting a page with XML. In your posts controller, you
would run your find all query and then pass it to the view. In the
view you would construct your XML. When your requesting app went to
(example) yourapp.com/posts/returnMyXML, the view would render the XML
and the requesting app would now have what it asked for.
Read up on the XML services regarding the view path and using the XML
requestHandler.
Hope that helps.
On May 1, 9:34 am, PST <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to use CakePHP to create some basic webservices. I have an
> application that I would like to request data from a CakePHP
> webservice. For example, a basic findAll() performed on the posts
> table from the CakePHP tutorial, would need to pass back the records
> in XML format to the requesting app.
>
> How would this be done? Do I need to create a view?
>
> The code from the tutorial is as follows:
> <?php
> class PostsController extends AppController {
>
> var $name = 'Posts';
>
> function index() {
> $this->set('posts', $this->Post->findAll());
> }}
>
> ?>
>
> How do I store the results of the $this->Post->findAll() without
> sending it to the view?
>
> Cheers, Phil.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---