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