client times out

2008-06-09
2013-06-06
  • Oleg Kleyman
    Oleg Kleyman
    2008-06-09

    Hi I was able to successfully create a web service using nusoap, however I cannot get the client to work. Everytime I try to load the client's URL it just sits there and eventually displays nothing. The apache error log stated it timed out after 30 seconds, and now it doesn't even mention that anymore. The service however works with .NET specifically a C# windows forms project, however not with PHP, which ironically is the language it was created in.

     
    • Oleg Kleyman
      Oleg Kleyman
      2008-06-09

      I'm sorry I forgot to put the code.

      the client code is:

      <?php
      require_once('lib/nusoap.php');
      $client = new nusoap_client('http://localhost/nug.php?wsdl', true);
      echo $client->call('addNums' ,array(2, 3));
      ?>

      the server code is:

      <?php
      function addNums($n1, $n2){
      return $n1 + $n2;
      }

      function multiply($n1, $n2){
      return $n1 * $n2;
      }

      require('lib/nusoap.php');

      $server = new soap_server();

      $server->configureWSDL('mathServer', 'urn:math');

      $server->register("addNums", array('n1' => 'xsd:integer', 'n2' => 'xsd:integer'),
              array('sum' => 'xsd:integer'), 'urn:math', 'urn:math#addNums');

      $server->register("multiply", array('n1' => 'xsd:float', 'n2' => 'xsd:integer'),
              array('product' => 'xsd:float'), 'urn:math', 'urn:math#multiply');

      $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';

      $server->service($HTTP_RAW_POST_DATA);

      ?>