Hiya !
I’ve been using Yii for some time now, and I think that I’m starting getting it, so thanks for all the good work.
Now to my question :
As mentionned in this tutorial about Web Service, I followed the instructions, and ended up with the so famous "[Client] DTD are not supported by SOAP" error. Searching the internet, this error seems to have various reasons, but, for this particular case (the tutorial) the error looks like you can not invoke methods through the WSDL generated, because when it tries to reach "back" to the functions through the WSDL file, the client will end up with something which is NOT XML, as expected.
Indeed, and after some headbanging against my desktop (and yes, that hurts), I just found out why :
In the WSDL generated, if you look at the property :<soap:address>, you’ll find this:
<soap:address location="http://localhost/testapi/index.php?r=stock/quote&ws=1"/>
So, for some reason, the wsdl generation added the parameter "&ws=1" which messes up the whole thing, since trying to reach this URL will prompt a PHP error (while using the URL without the &ws=1 gets me the wsdl), therefore, each call to the methods via soap will get this error as a response, hence not being able to consume the service.
I think that the problem is definetly there, so if someone could come with a way to prevent the WSDL generation from adding that extra parameter, or to try to modify the file post-generation, I would be grateful.
NB : Methods like getfunctiolist and such do work, it’s when you want to consume the services you made that it gets tricky.
OS : Win XP SP2
WAMP : WAMP SERVER
Soap activated
Things I’ve done :
-
Followed the tutorial step-by-step
-
Disabled the cache for wsdl file
-
Got the error
-
Searched for it
-
Found many possible causes
-
Found the issue
-
Scratched my head in confusion
-
Posted here.