title: Drupal 8 cannot find SoapClient class
body: <p>I'm trying to consume a remote webservice but it doesnt work and I'm new to drupal.
  below is my code:</p>
  
  <pre><code>namespace Drupal\mymodule\mymoduleAPI;
  class RemoteConnection {
  
    public function create() {
  
      $default = array( 
              // We shall only enable TRACING &amp; EXCEPTION for dev 
              'trace' =&gt; 1, 
              'exceptions' =&gt; true, 
              'cache_wsdl' =&gt; WSDL_CACHE_NONE, 
              'features' =&gt; SOAP_SINGLE_ELEMENT_ARRAYS,
          );
  
  
      $myServerEndPointUrl = "wsdl server address";
      return new SoapClient($myServerEndPointUrl , $default);     
    }
  }
  </code></pre>
  
  <p>This gives me the following error</p>
  
  <blockquote>
    <p>Fatal error: Class 'Drupal\mymodule\mymoduleapi\SoapClient' not found
    in C:\wamp\www\drupalnew\modules\</p>
  </blockquote>
  
  <p>So am I doing something wrong? I already checked the Soap extension and tested it outside drupal and found it to work fine.</p>
  
  <p>Thanks</p>