You are in a different namespace, and SoapClient is in the root namespace, so use \SoapClient :
$client = new \SoapClient('web_url');
Also, next to the namespace declaration, create a use statement:
namespace App\Controller use SoapClient;
Note. This is not a special CakePHP problem, it is a common namespace problem.
source share