Webservice 'Failed to load external entity'

mr.burns
Member Posts: 39
Hi,
I have a Windows 7 Professional 32 Bit, IIS 7.5, PHP 5.3.13, Zend Framework 1.11 and Nav 2009 R2 RTC.
To start learning webservices and Navison I wanted to read the Nav companies using the standard webservice called SystemService.
The WSDL I can acces through a browser (http://navsrv:7049/myNavDB/WS/SystemService).
Then I have follwing PHP code isnide a SoapController.php to read the companies:
But if I start the client-Action in a browser I get following error:
I tried with google, but no success, any Idea what 'failed to load external entity' means and how to solve?
Thanks a lot!
I have a Windows 7 Professional 32 Bit, IIS 7.5, PHP 5.3.13, Zend Framework 1.11 and Nav 2009 R2 RTC.
To start learning webservices and Navison I wanted to read the Nav companies using the standard webservice called SystemService.
The WSDL I can acces through a browser (http://navsrv:7049/myNavDB/WS/SystemService).
Then I have follwing PHP code isnide a SoapController.php to read the companies:
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; } }
But if I start the client-Action in a browser I get following error:
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',
)
I tried with google, but no success, any Idea what 'failed to load external entity' means and how to solve?
Thanks a lot!
0
Comments
-
0
-
Hi Rahsed,
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$client = new Zend_Soap_Client('http://navsrv:7049/myNavDB/WS/SystemService');
seems to work correctly. The problem occurs in following line:$result = $client->Companies();
Does anybody know what I am doing wrongly?
Thanks again for help!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions