views:

54

answers:

0

This may not be an appropriate question, but I'm not sure how else to research this.

We have a client who uses PHP to connect to our .NET web service on a third party web host. They have been complaining about intermittent connection issues.

On our end we have tested the service and it works, no problems. It's an extremely simple service...one method immediately returns an int to say it's alive, and another validates a code against a database. Nothing crazy and only hit a few times day.

We don't know PHP, so we can't judge his code or really debug it. We have a snippet to look at, that uses the PEAR SOAP libraries.

Can anyone tell me if there are obvious or known issues/gotchas that can occur consuming a .NET web service from PHP?

Thanks in advance for any and all help.

Here is the relevant parts of his code:

    function verify_from_web_service() { 
     $wsdl = new SOAP_WSDL(WEB_SERVICE);
     $soapclient = $wsdl->getProxy();

     if (!method_exists($soapclient,'TestService')) {
      $this->error('Web Service did not have method "TestService".  Maybe, could not contact the web service?');
      return;
     }

     $ret = $soapclient->TestService();

     if ($ret == 'OK') {
      $ret = $soapclient->method1(WS_USERNAME, WS_PASSWORD, $this->short_num, $this->checksum);

      if (is_object($ret))
       $this->error('Web Service Response Time Out at method1('.$this->short_num.', '.$this->checksum.')');
      elseif ($ret == '1')
       $this->set_result('VALID');
      elseif ($ret == '0')
       $this->set_result('INVALID');
      elseif ($ret == '-1')
       $this->set_result('INVALID_CHECKSUM');
      else
       $this->error('Web Service Response to method1('.$this->short_num.', '.$this->checksum.'): '.$ret);
     }
     else {
      if (is_object($ret))
       $this->error('Web Service Response Time Out at TestService()');
      else
       $this->error('Web Service Response to TestService():'.$ret);
     }
    }