
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)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