1
votes

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.

3
Wich is your NAV version? - pungggi
Hi @Ronn0 I'm developing a new service to do NTLM authentication nafiux.com/wasp if I can help you please let me know - Ignacio Ocampo
Hi @IgnacioOcampo. Its working now. - Ronn0

3 Answers

4
votes

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.

0
votes

There should be Company Name between WS/ and /Codeunit

0
votes

Maybe you need A NTLM. Here is an example : click