4

Hi i'm working on consuming ws from a server and in my pc it works fine, but when I test the code con the server's networks it throws this error:

http error couldn't open socket connection to server nusoap error 13

I tried to test a ws with less parameters, and I recieve the same answer...

error_reporting(E_ALL & ~E_NOTICE);
ini_set("display_errors", 1);

require_once('libraries/nusoap/nusoap.php');

$resultado = array();

$client = new soapclient2("http://server's_ip:port/wsdl/ITSOAPWebServiceConta?wsdl", true);

$error = $client->getError();

$result = "";
if ($client) {
    $result = $client->call("WSOpreation", array("WSParameter" => "RES"));
}

if ($client->fault) {
    $resultado["error"] = true;
    $resultado["resultado"] = $result;
} else {
    $error = $client->getError();
    if ($error) {
        $resultado["error"] = true;
        $resultado["resultado"] = $error;
    } else {
        $resultado = $result;
    }
}

Someone may have an idea why i'm getting this error?

Connecting to the host by putty I ping server's ip and everythings looks fine... making a wget to http://server's_ip:port/wsdl/ITSOAPWebServiceConta?wsdl also works fine...

Ps: The server runs on windows

Manolo
  • 125
  • 2
  • 10

3 Answers3

1

I had the same issue with nusoap+httpd on centos7 with disabled selinux. this command solved the problem for me

setsebool -P httpd_can_network_connect 1
cortex
  • 56
  • 5
0

Ping command is not significantly.

  1. Check if your PHP PEAR packages works corretly.
  2. Verify that your Internet Information Server works with the same PHP version of your local instance.
crmeye
  • 34
  • 3
0

If you use a port other than 80 you must disable selinux on your server then reboot and check again

Hamid
  • 378
  • 3
  • 8