Soap Client __soapCall - silent error
<p>I'm trying to connect to Royal Mail Shipping API and I can't figure it out why on $soapClient->__soapCall($method, $params) the script stops executing. No errors shows on the screen or in logs.</p>

<p>WSDL is pulled from local file and the __getFunctions() returns methods available so I'm assuming this is fine.</p>

<p>Creating soapClient object:</p>

<pre><code>    $soapClientOptions = array(
        'cache_wsdl' =&gt; 'WSDL_CACHE_NONE',
        'local_cert' =&gt; NULL,
        //'ssl_method' =&gt; 'SOAP_SSL_METHOD_SSLv3',
        'location' =&gt; $this-&gt;apiLocation,
        'stream_context' =&gt; stream_context_create($this-&gt;getAuthenticationHeaders()),
        'soap_version' =&gt; SOAP_1_1,
        'trace' =&gt; true,
        'exceptions' =&gt; true
    );

    try {
        $soapClient = new SoapClient($this-&gt;getStaticEndPoint(), $soapClientOptions);
    } catch(\SoapFault $fault){
        $error      =   "SOAP Fault: (faultcode: {$fault-&gt;faultcode}\n" ."faultstring: {$fault-&gt;faultstring})"; 
        echo $error;
    }catch(\Exception $exception){
        echo "&lt;BR&gt;".$exception;
    }
    $headerObject = new SoapVar($this-&gt;getWsseSecurityHeaders(), XSD_ANYXML);
    $header = new SoapHeader($this-&gt;moduleRoot.'/reference/oasis-200401-wss-wssecurity-utility-1.0.xsd', 'Security', $headerObject);
    $soapClient-&gt;__setSoapHeaders($header);
</code></pre>

<p>Below is the code for __soapCall</p>

<pre><code>    while (true) {
        try {
            $response = $soapClient-&gt;__soapCall('createShipment', array());
        } catch (\SoapFault $fault) {
            trigger_error("SOAP Fault: (faultcode: {$fault-&gt;faultcode}, faultstring: {$fault-&gt;faultstring})", E_USER_ERROR);
        } catch (\Exception $e) {
            echo $e-&gt;getCode().': '.$e-&gt;getMessage();
        }
    }
</code></pre>

<p>SoapClient object:</p>

<pre><code>object(SoapClient)#1641 (6) {
  ["location"]=&gt;
  string(37) "https://api.royalmail.net/shipping/v2"
  ["trace"]=&gt;
  int(1)
  ["_stream_context"]=&gt;
  resource(4652) of type (stream-context)
  ["_soap_version"]=&gt;
  int(1)
  ["sdl"]=&gt;
  resource(4653) of type (Unknown)
  ["__default_headers"]=&gt;
  array(1) {
    [0]=&gt;
    object(SoapHeader)#1640 (4) {
      ["namespace"]=&gt;
      string(136) "/RoyalMailShipping/reference/oasis-200401-wss-wssecurity-utility-1.0.xsd"
      ["name"]=&gt;
      string(8) "Security"
      ["data"]=&gt;
      object(SoapVar)#1649 (2) {
        ["enc_type"]=&gt;
        int(147)
        ["enc_value"]=&gt;
        string(820) "

                user@domain.comAPI
                4d+PCTIxEWdlZA2Zr/OkvOXlTv4=
                MTAzMzg5Njc5NA==
                2016-12-13T10:20:46Z

        "
  }
  ["mustUnderstand"]=&gt;
  bool(false)
}
</code></pre>

<p>}
}</p>

<p>I'm not sure how to debug this as I'm not getting any errors, I have increased php memory_limit but that didn't helped either. I'm using PHP version 5.6.27</p>