PHP with Dynamics NAV webservices

dynamics-navPHPsoapweb services

For a new project of myself I need to combine the Microsoft Dynamics NAV with the PHP webshop. When i try to login I get the same error time after time:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from
'http://xxx.xxx.xx.xxx:7048/DynamicsNAV2/WS/Codeunit/xxxx' : failed to
load external entity
"http://xxx.xxx.xx.xxx:7048/DynamicsNAV2/WS/Codeunit/xxxx" in
xxxxx\test.php:7 Stack trace: #0 xxx\test.php(7):
SoapClient->SoapClient('http://xxx.xxx.x…', Array) #1 {main} thrown
in xxxx\test.php on line 7

However it IS the right url, when i browse it in my browser it will popup. It uses an authentication:

domain\user
password

How can i connect to a microsoft Dynamics NAV webservice by PHP? I can't figure it out.

Best Answer

Most likely, it is about authentication failure.

There is a good post explaining how to connect to NAV Web Services via PHP:

http://blogs.msdn.com/b/freddyk/archive/2010/01/19/connecting-to-nav-web-services-from-php.aspx

Please note, that if you implement example from the post, you will have to enable NTLM authentication for your web service. For NAV 2009 you can do it by modifying parameter WebServicesUseNTLMAuthentication in your CustomSettings.config file. For NAV 2013 you can use Administration tool to set this parameter.

Related Topic