PHP/Network/SOAP Client

Материал из Web эксперт
Перейти к: навигация, поиск

A SOAP Client for the getGuid() Method

 
<?php
  ini_set("soap.wsdl_cache_enabled", "Off");
  $soap = new SoapClient("guid.wsdl");
  echo $soap->getGuid("PHP_");
?>



A SOAP Client with Error Handling

 
<?php
  ini_set("soap.wsdl_cache_enabled", "Off");
  $soap = new SoapClient("guid.wsdl");
  try {
    echo $soap->getGuid("PHP_");
  } catch (SoapFault $ex) {
    echo $ex->faultstring;
  }
?>