public function clientAction() { $client = new Zend_Soap_Client('http://navsrv:7049/myNavDB/WS/SystemService'); $result = $client->Companies(); $companies = $result->return_value; echo "Companies:<br>"; if (is_array($companies)) { foreach($companies as $company) { echo "$company<br>"; } $cur = $companies[0]; } else { echo "$companies<br>"; $cur = $companies; } }
An error occurred
Application error
Exception information:
Message: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://navsrv:7049/myNavDB/WS/SystemService' : failed to load external entity "http://navsrv:7049/myNavDB/WS/SystemService"
Stack trace:
#0 C:\inetpub\zf1root\library\Zend\Soap\Client\Common.php(51): SoapClient->SoapClient('http://navsrv:7...', Array)
#1 C:\inetpub\zf1root\library\Zend\Soap\Client.php(1032): Zend_Soap_Client_Common->__construct(Array, 'http://navsrv:7...', Array)
#2 C:\inetpub\zf1root\library\Zend\Soap\Client.php(1188): Zend_Soap_Client->_initSoapClientObject()
#3 C:\inetpub\zf1root\library\Zend\Soap\Client.php(1112): Zend_Soap_Client->getSoapClient()
#4 C:\inetpub\zf1root\application\controllers\SoapController.php(53): Zend_Soap_Client->__call('Companies', Array)
#5 C:\inetpub\zf1root\application\controllers\SoapController.php(53): Zend_Soap_Client->Companies()
#6 C:\inetpub\zf1root\library\Zend\Controller\Action.php(516): SoapController->clientAction()
#7 C:\inetpub\zf1root\library\Zend\Controller\Dispatcher\Standard.php(295): Zend_Controller_Action->dispatch('clientAction')
#8 C:\inetpub\zf1root\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 C:\inetpub\zf1root\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#10 C:\inetpub\zf1root\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#11 C:\inetpub\zf1root\public\index.php(26): Zend_Application->run()
#12 {main} Request Parameters:
array (
'controller' => 'soap',
'action' => 'client',
'module' => 'default',
)
Comments
http://blogs.msdn.com/b/freddyk/archive ... m-php.aspx
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
thanks for reply. I didn't follow this block since Nav 2009 R2 RTC does not have any problem with NTLM Authentication.
As I understand I can use 'normal' php classes from Zend framework to access NAV webservices.
(correct me if I am wrong).
I tested the return value of Zend_SOAP_Client against null, it returned something different from null, that means calling
seems to work correctly. The problem occurs in following line:
Does anybody know what I am doing wrongly?
Thanks again for help!