There is some code

<?php echo '<pre>'; $client = new SoapClient("http://ip/ws/ws2.1cws?wsdl", array( "login" => "login", "password" => "pass", "cache_wsdl" => WSDL_CACHE_NONE, "trace" => 1, "exceptions" => 0, )); $json = $client->TovarToSite(); var_dump($json); ?> 

If I just create a file on the server, insert this code and open it through a browser - everything works. If I write the same code in the controller, it gives an error that there is no such function. What could be the problem?

  • No what function? - fedornabilkin
  • There is a function, I wrote that if I called without Yii2, everything is ok, if in Yii2 I say that I don’t have it - Diefair
  • So I ask, says that there is nothing? What function? For full understanding, you need a controller code and an error. - fedornabilkin
  • says no function I want to call through SOAP - Diefair
  • What function do you want to call? If about TovarToSite (), then this is the method. What error occurs? Is the $ client object being created? - fedornabilkin

0