php soapClent hakkında soru

1 Cevap php

Ben, bir sorum var ben bir web sayfası geliştirme ve ben SOAP üzerinden bir sunucu ile iletişim kurarlar. Benim kod php olduğunu.

$client = new SoapClient(null, array("location" => "$serverpath",
                                 "uri"      => "$namespace",
                                 "style"    => SOAP_RPC,
                                 "use"      => SOAP_ENCODED ));
try
{
 $returnedValue = $client->getInfo($user);

} catch (SoapException $exception)
{

 $returnedIDValue = "Caught Soap Exception: $exception\n";

}

SOAP hizmetleri aşağı olduğunda sorun şu, ben herhangi bir istisna alamadım, program sadece durur.

Herhangi bir öneri? Ben nazikçe bu davayı ele almak istiyorum.

Thanks in advantage Alejandra

1 Cevap

Belki yerine SoapException bir SoapFault yakalamak gerekiyor?

Although it's strange, because if I don't catch the SoapFault with your code I get a fatal error: Fatal error: Uncaught SoapFault exception: [HTTP] Unable to parse URL in... Stack trace: #0 [internal function]: SoapClient->__doRequest('

SoapFault ile SoapException değiştirilmesi bu hatayı giderir.

Eğer hata almazsanız, PHP yapılandırmasında E_ALL de error_reporting olmadığını kontrol edin.