/**
  * Execute the request
  *
  * @param string $request  Request to execute
  * @param string $location Webservice URL
  * @param string $action   Action
  * @param int    $version  SOAP version
  * @param int    $one_way  One way
  *
  * @see parent::__doRequest
  *
  * @return null|string
  * @throws CMbException
  */
 public function __doRequest($request, $location, $action, $version, $one_way = 0)
 {
     $ca_file = $this->ca_info;
     if ($this->use_tunnel) {
         $tunnel_exist = false;
         $tunnel_pass = CAppUI::conf("eai tunnel_pass");
         $tunnel_object = new CHTTPTunnelObject();
         $tunnels = $tunnel_object->loadActiveTunnel();
         foreach ($tunnels as $_tunnel) {
             if ($_tunnel->checkStatus()) {
                 $location = preg_replace("#[^/]*//[^/]*#", $_tunnel->address, $location);
                 $ca_file = $_tunnel->ca_file;
                 $tunnel_exist = true;
                 break;
             }
         }
         if (!$tunnel_exist && $tunnel_pass === "0") {
             throw new CMbException("Pas de tunnel actif");
         }
     }
     $response = null;
     if ($this->return_mode == "file") {
         $this->doRequestToFile($request, $location, $action, $ca_file);
         return "";
     } elseif ($this->xop_mode) {
         $response = $this->doRequestXOP($request, $location, $action, $ca_file);
     } else {
         $response = parent::__doRequest($request, $location, $action, $version, $one_way);
     }
     if ($this->return_mode == "normal") {
         return $response;
     }
     if (!$response) {
         return null;
     }
     $document = new CMbXMLDocument();
     $document->loadXMLSafe($response, null, true);
     $xpath = new CMbXPath($document);
     $documentElement = $document->documentElement;
     $xpath->registerNamespace($documentElement->prefix, $documentElement->namespaceURI);
     $body = $xpath->queryUniqueNode("/{$documentElement->prefix}:Envelope/{$documentElement->prefix}:Body");
     $new_document = new CMbXMLDocument("UTF-8");
     $new_document->appendChild($new_document->importNode($body->firstChild, true));
     $this->response_body = $new_document->saveXML();
     return $response;
 }