The second answer from @gtrujillos worked for me but with some changes, because the json string needs more formatting code in my case and the xPath needs to be in this way "//S:Body". This is the code that finally solve my problem. I toke the same SOAP Response example and the code for getting and returning a Soap response I found it here:
PHP convertion
//getting the Soap Response
header("Content-Type: text/xml\r\n");
ob_start();
$capturedData = fopen('php://input', 'rb');
$content = fread($capturedData, 5000);
fclose($capturedData);
ob_end_clean();
//getting the SimpleXMLElement object
$xml = new SimpleXMLElement($content);
$body = $xml->xpath('//S:Body')[0];
//transform to json
$json = json_encode((array)$body);
//Formatting the JSON
$json = str_replace(array("\n","\r","?"),"",$Json);
$json = preg_replace('/([{,]+)(\s*)([^"]+?)\s*:/','$1"$3":',$json);
$Json = preg_replace('/(,)\s*}$/','}',$json);
//Getting the array
$array=json_decode($Json,true);
//whatever yo need to do with the array ...
//Return a Soap Response
$returnedMsg=true;//this will depend of what do you need to return
print '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<notifications xmlns="http://soap.sforce.com/2005/09/outbound">
<Ack>' . $returnedMsg . '</Ack>
</notifications>
</soapenv:Body>
</soapenv:Envelope>';