Well, If I call *http://localhost/webservice/produtos/index.xml, this
appears, but...*


On Fri, Feb 11, 2011 at 10:00 AM, Poliane Brito <[email protected]>wrote:

> Hello ppl!
>
> I'm trying to do a webservice using ReST, but when I request *
> http://localhost/webservice/produtos/ *I'm getting an error message:
> Not Found
>
> *Error: * The requested address *'/produtos'* was not found on this
> server.
> ---------------------------------
>
> *core.php*
> Configure::write('debug', 0);
>
> routes.php
> Router::mapResources('produtos');
> Router::parseExtensions('xml');
>
> */views/produtos/xml/index.ctp*
> <produtos>
>     <?php echo $xml->serialize($produtos); ?>
> </produtos>
>
> */controllers/produtos_controller.php*
> <?php
> class ProdutosController extends AppController {
>
>     var $name = 'Produtos';
>     var $helpers = array('Html', 'Form', 'Xml');
>     var $components = array('RequestHandler');
>     var $uses = array("Produto", "Dolar");
>
>     function index() {
>          $this->Produto->recursive = 0;
>          $produtos = $this->Produto->find();
>         $this->set("produtos", $produtos);
>     }
> }
> ?>
>
> I'm getting crazy!
> Thanks in advance..
> Poli
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to