I make services folder in my Zend project and i create new php file in that folder. My folder structure is there.
<project name>/
application/
configs/
application.ini
controllers/
IndexController.php
models/
Test.php
services/
SoapClient.php
views/
helpers/
scripts/
Bootstrap.php
docs/
library/
public/
.htaccess
index.php
tests/
I can use Test.php file using Application_Model_Test class. But I can use SoapClient.php file using Application_Service_SoapClient or Application_Services_SoapClient class name.
Always it show following message.
Fatal error: Class 'Application_Services_SoapClient' not found in /home/dinuka/workspace/testzend/application/controllers/IndexController.php on line 13
Please help me. What class should i use in SoapClient.php?
The path is correct, but the class should be named,
Application_Service_SoapClient.Service is one of the module resource classes that are mapped automatically.
To get it working, just rename the class to
Application_Service_SoapClientand update all the references to that class if any. The file name is fine.These are the default mappings as of 1.11.11: