SOAP Internal Error

I should use SOAP to call a web server function. I declared this parameters:

$this->parametriSOAP = [
        "location" => "",
        "login" => "UWT3CBXX",
        "password" => "PBUW9EBP",
        "authentication" => SOAP_AUTHENTICATION_BASIC,
        "trace" => true,
        "exceptions" => false
    ];

That’s my SoapClient instance:

$this->parametriSOAP["location"] = $endpoint;
        $wsdl = BASE_URL . "/storage/SistemaTS/" . $wsdl;
        $client = new SoapClient($wsdl, $this->parametriSOAP);

Instead this’s the function’s call:

$result = $client->__soapCall("EsitoInvii", [
        "DatiInputRichiesta" => [
            "protocollo" => "17080120163582925",
            "pinCode" => "0Gv1vsTpzlvRD9kBd8FVLo2/441rZ8rRZVf0Zi9eO6+L7kme0KC8Vx6ZjRj/4JjA4aHPTCi3D6YW9OtmYkIpW7sfchmhqHdVORBZHPitiPHdr5iIipAhIzBhFOQIPfpYasW5cQmU//uNB4GSWSNDIkaqdMrDjTPpIkbKKeoA4dQ="
        ]
    ]);

    if (is_soap_fault($result)) {
        var_dump($result->faultcode . " " . $result->faultstring);
        return false;
    }

    var_dump($result);

I receveid the error: env:Client Internal Error

Here there are WSDL and XSD schema: https://we.tlegiEBZ0vgT


Source: stackoverflow-php

How to debug Soap in PHP?

I am trying to do a SOAP request with PHP to a server, but all I’m getting is ‘Could not connect to host” when running

$this->client->__soapCall("aMethod()", [$request_param_array]));

I think the WSDL is fine, since I can reach it in my browser and when running

$this->client->__getFunctions();

I do receive a list of available functions (as specified in this wsdl).

I do need a certificate to do SOAP calls to that server, so maybe that’s the problem? But I don’t know how I can debug what causes this “Could not connect to host” error.

Any ideas what can cause this error to occur or how I can find the problem?

My code so far:

public function __construct($url, $wsdl = null)
{
    $this->wsdl = $wsdl != null ? $wsdl : $url . '?wsdl';

    $this->client = new SoapClient($this->wsdl, array(
        "trace" => "1",
        "local_cert" => realpath(__DIR__ . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "..") . "cert.pfx",
        "passphrase" => "admin",
    ));
    Log::info(sprintf("New SoapClient created with WSDL: '%s'", $this->wsdl));
}


Source: stackoverflow-php