Call Webservices Yii

Respected,

I am new to YII.I have just started to work with YII.I have already developed YII API code.I am good enough to deal with MVC.I already work with CI and CakePHP.

Now my Dir is like below.I am totally blind how to call web services.

-Root

–protected

—modules

----api

-----controllers

-----view

-----ApiModule.php

How to run this WebServices API . Please guide me…

Hi ureshpatel and welcome to YII! :)

check the below links

http://www.yiiframework.com/doc/guide/1.1/en/topics.webservice

http://www.yiiframework.com/wiki/175/how-to-create-a-rest-api

http://www.yiiframework.com/wiki/155/the-directory-structure-of-the-yii-project-site

http://<yourmachine>/<yourapp>/api/<youraction>

Hey ,

Thank you…

I install the RESTClient plugin in FireFox.

But please let me know by review my above file paths.

How i call the WS.

in My given Doc "kahootz.co/api/v2/user"

path to work on

Hi again

what exactly you mean web service (SOAP, WSDL etc) ?

Do you want to achieve a request on url like ‘kahootz.co/api/v2/user’ with above services?

Please give us more details

I am using this tool…How to use this with YII

Hi,

I have attached the dir files along with this

I have attached the files for "modules" DIR.

-Root

–protected

—[color="#800080"]modules[/color]

----api

-----controllers

-----view

-----ApiModule.php

I just request to

https://kahootz.co/?r=Ajax/User/Activate

and the response was


{"status":0,"data":"","code":"400","message":"Invalid request"}

Although the message has negative meaning, at least works! :)

Can you explain me how this API and USER dir Used ?????

I haven’t your entire web application to know how it exactly works

I can tell you tha a module is a mini(part) web application that can be independed from another one. (but May it could cooperate with another components)

see also

http://www.yiiframework.com/doc/guide/1.1/en/basics.module