web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Problem with comunication between PHP socket - Navision

(0) ShareShare
ReportReport
Posted on by 70

I'm trying to send data via xml to navision system, but every time i've tryied to send data i get a diferent error.

This is my php function

public function sendDataToNavision($xml, $config) {

       $address = isset($config["address"]) ? $config["address"] : "localhost";

       $port = isset($config["port"]) ? (int) $config["port"] : 80;

       $fp = fsockopen($address, $port, $errno, $errstr, 5);

       echo "Trying to send the data, fsockopen status: " . $fp;

       if ($fp > 0) {

         fputs($fp, $xml . "\r\n\0");

         echo "Attempting to get the data\n";

         while (!feof($fp)) {

           $response .= fgets($fp);

           echo $response;

         }

         fclose($fp);

         echo $response;

       }

   }

This is the function that seems to work better

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Roberto Stefanetti Profile Picture
    12,998 on at

    hi,

    you can call NAV Web Services from PHP

    loook at these posts:

    Using XMLports With Web Services

    blogs.msdn.com/.../using-dataports-with-web-services.aspx

    MS NAV Web Services to/from PHP, receiving and sending data

    blog.artea.info/ms-nav-web-services-tofrom-php-receiving-and-sending-data

    Connecting to NAV Web Services from PHP

    blogs.msdn.com/.../connecting-to-nav-web-services-from-php.aspx

    2008-03-13 - Using SOAP PHP with NTLM Authentication

    thomas.rabaix.net/.../using-soap-php-with-ntlm-authentication

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans