public function call($webServiceName, $inputData=null,
                              $version=null)
    {
        if (is_null($version)) {
            $version = $this->getVersion();
        }

        //Create unique token to identify the call
        $token = uniqid("CALL_");
        if ($this->isSymfony()) {
            $eventDispatcher = $this->symfonyContainer->get("event_dispatcher");
        }

        /*
         * Throw initial event before executing
         * the call, remote or local
         */
        if (($inputData instanceof BaseStore) && $this->isSymfony()) {
            $event = new WebServiceCallingEvent($token, $webServiceName, $inputData, $version,
                                                $this->_connectionTimeout, $this->_timeOut,
                                                $this->_proxy, $this->_proxyPort);
            $eventDispatcher->dispatch("puremachine.webservice.calling", $event);
        }

        //check if the service is local
        if ($this->isSymfony() && $this->symfonyContainer->has('pureMachine.sdk.webServiceManager')) {
            $WebServiceManager = $this->symfonyContainer->get('pureMachine.sdk.webServiceManager');

            if ($WebServiceManager->getSchema($webServiceName)) {
                $return = $WebServiceManager->localCall($webServiceName, $inputData, $version);

                /*
                 * Throw post event after executing
                 * the local call
                 */
                if (($return instanceof BaseStore) && $this->isSymfony()) {
                    $event = new WebServiceCalledEvent($token, $webServiceName, $return, $version, true);
                    $eventDispatcher->dispatch("puremachine.webservice.called", $event);
                }

                return $return;
            }
        }

        //We did not found the webService in local, we do it remotely.
        $return = $this->remoteCall($webServiceName, $inputData, $version);

        /*
         * Throw post event after executing
         * the local call
         */
        if (($return instanceof BaseStore) && $this->isSymfony()) {
            $event = new WebServiceCalledEvent($token, $webServiceName, $return, $version, false);
            $eventDispatcher->dispatch("puremachine.webservice.called", $event);
        }

        return $return;
    }