Is not reusing created SOAP client object <p>Can anyone tell me why the SOAP client is not being re-used? It keeps getting initialized where it should have been reused from the last call.</p> <p>When I print out the SOAP client object after it was initialized it is there but it is forgotten at the next call.</p> <p>So the php script keeps initializing the connection.</p> <p>My code:</p> <pre><code>class EcoAPI { private $client; public function getClient() { if (empty($this-&gt;client)) { echo "&lt;br&gt;initializing..."; $this-&gt;initClient(); } return $this-&gt;client; } private function initClient() { $settingsOld = Settings::GetOld(); $this-&gt;client = new SoapClient("https://api.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL", array("trace" =&gt; 1, "exceptions" =&gt; 1)); $this-&gt;client-&gt;ConnectWithToken(array('token' =&gt; $settingsOld-&gt;economic_token_secret, 'appToken' =&gt; $settingsOld-&gt;economic_token_app)); } } </code></pre> <p>I connect by:</p> <pre><code>$ecoApi = new EcoAPI(); $result = $ecoApi-&gt;getClient()-&gt;Account_GetVatAccount(array('accountHandle' =&gt; (object) array('Number' =&gt; (string) $VatAccount))); </code></pre>