-/*echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';*/
-echo '<?xml version="1.0" ?>';
-?>
-<response>
- <status>ERROR</status>
- <result_code><?php echo $error_code; ?></result_code>
- <result_text><?php echo $error_text; ?></result_text>
-</response>
+echo '<?xml version="1.0" ?>'; ?>
+<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sm="http://squirrelmail.org/rpc" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:soap-enc="http://www.w3.org/2003/05/soap-encoding" soap:encodingstyle="http://www.w3.org/2003/05/soap-encoding">
+ <soap:header>
+ <sm:result_code><?php echo $error_code; ?></sm:result_code>
+ <sm:result_text><?php echo $error_text; ?></sm:result_text>
+ </soap:header>
+ <soap:body>
+ <soap:fault>
+ <faultcode>soap:<?php echo ucfirst(strtolower($guilty_party)); ?></faultcode>
+ <faultstring><?php echo $error_text; ?></faultstring>
+ <detail>
+ <sm:result_code><?php echo $error_code; ?></sm:result_code>
+ <sm:result_text><?php echo $error_text; ?></sm:result_text>
+ </detail>
+ </soap:fault>
+ </soap:body>
+</soap:envelope>