MS Dynamics Nav 2009 web service + PHP

LobachevEBLobachevEB Member Posts: 3
I have a web service running on MS Dynamics Nav 2009 and a PHP script to operate with the web service.

The script uses NTLM authentication and works fine from the test web-server (Apache2 + PHP7).

The problem is my script does not work from the client web-server (Apache2 + PHP5). Both web-servers are external, with the SOAP and CURL configuration are equal in both PHP.ini.

My question is: what might be wrong with the second web-server?

Answers

  • RemkoDRemkoD Member Posts: 100
    Can you elaborate on 'does not work'? Do you have any error or warning that might be a lead?
  • LobachevEBLobachevEB Member Posts: 3
    edited 2018-05-17
    RemkoD wrote: »
    Can you elaborate on 'does not work'? Do you have any error or warning that might be a lead?
    Oh, yes, of course.
    Web service get XML as input parameter and also returns XML. In the test web server this exchange works good, but in the production server I've got following exception on the code line "$result = new NTLMSoapClient($baseURL);": "Caught exception: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://my_URL' : Document is empty"

  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV Tips & Tricks' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • RemkoDRemkoD Member Posts: 100
    @LobachevEB

    Have you replaced the real production web service URL with 'my_URL' or could that be the issue?

    I think you can debug this issue outside your PHP script. You should be able to call the NAV webservice URL in an internet browser on the machine where you're running your PHP script.

    When you open the webservice URL in the browser you should see a SOAP WSDL page. Your error is literally that your script cannot find that page. So make sure the script is working with a valid URL. Test the URL you use for the test environment. I expect you would see a WSDL page. If that succeeds try the URL for the production environment. I would expect that there is something wrong with reaching that web service. You can continue debugging from there.
  • LobachevEBLobachevEB Member Posts: 3
    RemkoD wrote: »
    @LobachevEB

    Have you replaced the real production web service URL with 'my_URL' or could that be the issue?

    I think you can debug this issue outside your PHP script. You should be able to call the NAV webservice URL in an internet browser on the machine where you're running your PHP script.

    When you open the webservice URL in the browser you should see a SOAP WSDL page. Your error is literally that your script cannot find that page. So make sure the script is working with a valid URL. Test the URL you use for the test environment. I expect you would see a WSDL page. If that succeeds try the URL for the production environment. I would expect that there is something wrong with reaching that web service. You can continue debugging from there.

    Thank you for your answer.
    I use the same URL in a both environments as I do connect to the same server from two places. I think the reason might be in a clients firewall configuration that allows test env. IP and disallow the work one.
Sign In or Register to comment.