Source for file Fault.php
Documentation is available at Fault.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
// +----------------------------------------------------------------------+
// $Id: Fault.php,v 1.13 2003/04/13 21:38:58 shane Exp $
require_once('PEAR.php');
* PEAR::Error wrapper used to match SOAP Faults to PEAR Errors
* @author Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more
* @author Dietrich Ayala <dietrich@ganx4.com> Original Author
* @version $Id: Fault.php,v 1.13 2003/04/13 21:38:58 shane Exp $
* @param string message string for fault
* @param mixed the faultcode
* @param mixed see PEAR::ERROR
* @param mixed see PEAR::ERROR
* @param array the userinfo array is used to pass in the
* SOAP actor and detail for the fault
function SOAP_Fault($faultstring = 'unknown error', $faultcode = 'Client', $faultactor=NULL , $detail=NULL , $mode = null , $options = null )
parent ::PEAR_Error ($faultstring, $faultcode, $mode, $options, $detail);
if ($faultactor) $this->error_message_prefix = $faultactor;
* returns a SOAP_Message class that can be sent as a server response
$params[] = & new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:'. $this->code);
$params[] = & new SOAP_Value('faultstring', 'string', $this->message);
$params[] = & new SOAP_Value('faultactor', 'anyURI', $this->error_message_prefix);
if (isset ($this->backtrace)) {
$params[] = & new SOAP_Value('detail', 'string', $this->backtrace);
$params[] = & new SOAP_Value('detail', 'string', $this->userinfo);
return $msg->_makeEnvelope ($methodValue, $headers);
* returns a simple native php array containing the fault data
global $SOAP_OBJECT_STRUCT;
if ($SOAP_OBJECT_STRUCT) {
$fault = & new stdClass ();
$fault->faultcode = $this->code;
$fault->faultstring = $this->message;
$fault->faultactor = $this->error_message_prefix;
$fault->detail = $this->userinfo;
'faultcode' => $this->code,
'faultstring' => $this->message,
'faultactor' => $this->error_message_prefix,
'detail' => $this->userinfo
* returns the SOAP actor for the fault
return $this->error_message_prefix;
* returns the fault detail
Documentation generated on Mon, 11 Mar 2019 13:59:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|