Yii Framework Forum: REAL Yii Web Services Tutorial? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

REAL Yii Web Services Tutorial? Yii Web Services Tutorial Rate Topic: -----

#1 User is offline   darry 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 01-July 12

Posted 10 July 2012 - 08:19 AM

Hello,

Is there a GOOD web services tutorial for yii? I read this one http://www.yiiframew...pics.webservice but it is really lame. It doesn't even explain how http://hostname/path...p?r=stock/quote maps to public function getPrice($symbol). Whoever wrote it, might as well have not wasted their time. I tried it and it does not work at all.

Darryl
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 10 July 2012 - 11:07 AM

When invited to a free lunch, don't complain about the quality of the caviar.
"Less noise - more signal"
0

#3 User is offline   Maurizio Domba 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,229
  • Joined: 12-October 09
  • Location:Croatia

Posted 10 July 2012 - 04:15 PM

View Postdarry, on 10 July 2012 - 08:19 AM, said:

...
It doesn't even explain how http://hostname/path...p?r=stock/quote maps to public function getPrice($symbol).

that url does not map to getPrice at all... as the doc say

Quote

If we try to access the action by URL http://hostname/path...p?r=stock/quote, we will see a lot of XML content which is actually the WSDL for the Web service we defined.

so that url should just give you the actual WSDL for the web service... if you don't get that... check if you have the PHP SOAP service installed - http://www.php.net/m...en/ref.soap.php (also mentioned on the tutorial as a NOTE)

To get to the getPrice method check the documentation under Consuming web service - http://www.yiiframew...ing-web-service

it's by calling
$client->getPrice('GOOGLE');

that the method getPrice() is accessed.

View Postdarry, on 10 July 2012 - 08:19 AM, said:

Whoever wrote it, might as well have not wasted their time. I tried it and it does not work at all.

It's not really nice of you to attack at first sight... especially considering that the one that "wasted" his time on this, made it possible for you to get that for free... so the minimum you could do is to try to understand first what all this text is about... and then if you have any idea on how to improve the tutorial suggest it to the dev. team... on the other side if you don't see how this works and can't understand it... then there is this forum where you can politely ask for a clarification or help and for sure you will get some...
Find more about me.... btw. Do you know your WAN IP?
0

#4 User is offline   darry 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 01-July 12

Posted 10 July 2012 - 04:59 PM

Thank you, I will check that.

Sorry for my comment.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users