Documentation

soap_fault extends nusoap_fault
in package

Backward compatibility

Table of Contents

$charencoding  : bool
toggles automatic encoding of special characters as entities (should always be true, I think)
$debug_str  : string
Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)
$debugLevel  : int
the debug level for this instance
$error_str  : string
Current error string (manipulated by getError/setError)
$faultactor  : string
The fault actor
$faultcode  : string
The fault code (client|server)
$faultdetail  : mixed
The fault detail, typically a string or array of string
$faultstring  : string
The fault string, a description of the fault
$namespaces  : array<string|int, mixed>
namespaces in an array of prefix => uri
$revision  : string
CVS revision for HTTP headers.
$soap_defencoding  : string
charset encoding for outgoing messages
$title  : string
Identification for HTTP headers.
$typemap  : array<string|int, mixed>
XML Schema types in an array of uri => (array of xml type => php type) is this legacy yet? no, this is used by the nusoap_xmlschema class to verify type => namespace mappings.
$usedNamespaces  : array<string|int, mixed>
namespaces used in the current context, e.g. during serialization
$version  : string
Version for HTTP headers.
$xmlEntities  : array<string|int, mixed>
XML entities to convert
$XMLSchemaVersion  : string
set schema version
__construct()  : mixed
constructor
__toString()  : string
represents the object as a string
appendDebug()  : mixed
adds debug data to the instance debug string without formatting
clearDebug()  : mixed
clears the current debug data for this instance
contractQname()  : string
contracts (changes namespace to prefix) a qualified name
debug()  : mixed
adds debug data to the instance debug string with formatting
expandEntities()  : mixed
expands entities, e.g. changes '<' to '&lt;'.
expandQname()  : string
expands (changes prefix to namespace) a qualified name
formatDump()  : string
formats a string to be inserted into an HTML stream
getDebug()  : debug
gets the current debug data for this instance
getDebugAsXMLComment()  : debug
gets the current debug data for this instance as an XML comment this may change the contents of the debug data
getDebugLevel()  : int
gets the debug level for this instance
getError()  : mixed
returns error string if present
getGlobalDebugLevel()  : int
gets the global debug level, which applies to future instances
getLocalPart()  : string
returns the local part of a prefixed string returns the original string, if not prefixed
getmicrotime()  : string
returns the time in ODBC canonical form with microseconds
getNamespaceFromPrefix()  : mixed
pass it a prefix, it returns a namespace
getPrefix()  : mixed
returns the prefix part of a prefixed string returns false, if not prefixed
getPrefixFromNamespace()  : mixed
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace
isArraySimpleOrStruct()  : string
detect if array is a simple array or a struct (associative array)
serialize()  : string
serialize a fault
serialize_val()  : string
serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.
serializeEnvelope()  : string
serializes a message
setDebugLevel()  : mixed
sets the debug level for this instance
setError()  : bool
sets error string
setGlobalDebugLevel()  : mixed
sets the global debug level, which applies to future instances
varDump()  : string
Returns a string with the output of var_dump

Properties

$charencoding

toggles automatic encoding of special characters as entities (should always be true, I think)

public bool $charencoding = rue
Tags
access

private

$debug_str

Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)

public string $debug_str = ''
Tags
access

private

$debugLevel

the debug level for this instance

public int $debugLevel
Tags
access

private

$error_str

Current error string (manipulated by getError/setError)

public string $error_str = ''
Tags
access

private

$faultactor

The fault actor

public string $faultactor
Tags
access

private

$faultcode

The fault code (client|server)

public string $faultcode
Tags
access

private

$faultdetail

The fault detail, typically a string or array of string

public mixed $faultdetail
Tags
access

private

$faultstring

The fault string, a description of the fault

public string $faultstring
Tags
access

private

$namespaces

namespaces in an array of prefix => uri

public array<string|int, mixed> $namespaces = array('SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xsd' => 'http://www.w3.org/2001/XMLSchema', 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/')

this is "seeded" by a set of constants, but it may be altered by code

Tags
access

public

$revision

CVS revision for HTTP headers.

public string $revision = '$Revision: 1.123 $'
Tags
access

private

$soap_defencoding

charset encoding for outgoing messages

public string $soap_defencoding = 'ISO-8859-1'
Tags
access

public

$title

Identification for HTTP headers.

public string $title = 'NuSOAP'
Tags
access

private

$typemap

XML Schema types in an array of uri => (array of xml type => php type) is this legacy yet? no, this is used by the nusoap_xmlschema class to verify type => namespace mappings.

public array<string|int, mixed> $typemap = array('http://www.w3.org/2001/XMLSchema' => array( 'string' => 'string', 'boolean' => 'boolean', 'float' => 'double', 'double' => 'double', 'decimal' => 'double', 'duration' => '', 'dateTime' => 'string', 'time' => 'string', 'date' => 'string', 'gYearMonth' => '', 'gYear' => '', 'gMonthDay' => '', 'gDay' => '', 'gMonth' => '', 'hexBinary' => 'string', 'base64Binary' => 'string', // abstract "any" types 'anyType' => 'string', 'anySimpleType' => 'string', // derived datatypes 'normalizedString' => 'string', 'token' => 'string', 'language' => '', 'NMTOKEN' => '', 'NMTOKENS' => '', 'Name' => '', 'NCName' => '', 'ID' => '', 'IDREF' => '', 'IDREFS' => '', 'ENTITY' => '', 'ENTITIES' => '', 'integer' => 'integer', 'nonPositiveInteger' => 'integer', 'negativeInteger' => 'integer', 'long' => 'integer', 'int' => 'integer', 'short' => 'integer', 'byte' => 'integer', 'nonNegativeInteger' => 'integer', 'unsignedLong' => '', 'unsignedInt' => '', 'unsignedShort' => '', 'unsignedByte' => '', 'positiveInteger' => '', ), 'http://www.w3.org/2000/10/XMLSchema' => array('i4' => '', 'int' => 'integer', 'boolean' => 'boolean', 'string' => 'string', 'double' => 'double', 'float' => 'double', 'dateTime' => 'string', 'timeInstant' => 'string', 'base64Binary' => 'string', 'base64' => 'string', 'ur-type' => 'array'), 'http://www.w3.org/1999/XMLSchema' => array('i4' => '', 'int' => 'integer', 'boolean' => 'boolean', 'string' => 'string', 'double' => 'double', 'float' => 'double', 'dateTime' => 'string', 'timeInstant' => 'string', 'base64Binary' => 'string', 'base64' => 'string', 'ur-type' => 'array'), 'http://soapinterop.org/xsd' => array('SOAPStruct' => 'struct'), 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64' => 'string', 'array' => 'array', 'Array' => 'array'), 'http://xml.apache.org/xml-soap' => array('Map'))
Tags
access

public

$usedNamespaces

namespaces used in the current context, e.g. during serialization

public array<string|int, mixed> $usedNamespaces = array()
Tags
access

private

$version

Version for HTTP headers.

public string $version = '0.9.5'
Tags
access

private

$xmlEntities

XML entities to convert

public array<string|int, mixed> $xmlEntities = array('quot' => '"', 'amp' => '&', 'lt' => '<', 'gt' => '>', 'apos' => "'")
Tags
access

public

deprecated
see
expandEntities

$XMLSchemaVersion

set schema version

public string $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'
Tags
access

public

Methods

__construct()

constructor

public __construct() : mixed
Tags
access

public

Return values
mixed

__toString()

represents the object as a string

public __toString() : string
Tags
access

public

Return values
string

appendDebug()

adds debug data to the instance debug string without formatting

public appendDebug(string $string) : mixed
Parameters
$string : string

debug data

Tags
access

public

Return values
mixed

clearDebug()

clears the current debug data for this instance

public clearDebug() : mixed
Tags
access

public

Return values
mixed

contractQname()

contracts (changes namespace to prefix) a qualified name

public contractQname(string $qname) : string
Parameters
$qname : string

qname

Tags
access

private

Return values
string

contracted qname

debug()

adds debug data to the instance debug string with formatting

public debug(string $string) : mixed
Parameters
$string : string

debug data

Tags
access

private

Return values
mixed

expandEntities()

expands entities, e.g. changes '<' to '&lt;'.

public expandEntities(string $val) : mixed
Parameters
$val : string

The string in which to expand entities.

Tags
access

private

Return values
mixed

expandQname()

expands (changes prefix to namespace) a qualified name

public expandQname(string $qname) : string
Parameters
$qname : string

qname

Tags
access

private

Return values
string

expanded qname

formatDump()

formats a string to be inserted into an HTML stream

public formatDump(string $str) : string
Parameters
$str : string

The string to format

Tags
access

public

deprecated
Return values
string

The formatted string

getDebug()

gets the current debug data for this instance

public getDebug() : debug
Tags
access

public

Return values
debug

data

getDebugAsXMLComment()

gets the current debug data for this instance as an XML comment this may change the contents of the debug data

public getDebugAsXMLComment() : debug
Tags
access

public

Return values
debug

data as an XML comment

getDebugLevel()

gets the debug level for this instance

public getDebugLevel() : int
Tags
access

public

Return values
int

Debug level 0-9, where 0 turns off

getError()

returns error string if present

public getError() : mixed
Tags
access

public

Return values
mixed

error string or false

getGlobalDebugLevel()

gets the global debug level, which applies to future instances

public getGlobalDebugLevel() : int
Tags
access

public

Return values
int

Debug level 0-9, where 0 turns off

getLocalPart()

returns the local part of a prefixed string returns the original string, if not prefixed

public getLocalPart(string $str) : string
Parameters
$str : string

The prefixed string

Tags
access

public

Return values
string

The local part

getmicrotime()

returns the time in ODBC canonical form with microseconds

public getmicrotime() : string
Tags
access

public

Return values
string

The time in ODBC canonical form with microseconds

getNamespaceFromPrefix()

pass it a prefix, it returns a namespace

public getNamespaceFromPrefix(string $prefix) : mixed
Parameters
$prefix : string

The prefix

Tags
access

public

Return values
mixed

The namespace, false if no namespace has the specified prefix

getPrefix()

returns the prefix part of a prefixed string returns false, if not prefixed

public getPrefix(string $str) : mixed
Parameters
$str : string

The prefixed string

Tags
access

public

Return values
mixed

The prefix or false if there is no prefix

getPrefixFromNamespace()

returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace

public getPrefixFromNamespace(string $ns) : mixed
Parameters
$ns : string

The namespace

Tags
access

public

Return values
mixed

The prefix, false if the namespace has no prefixes

isArraySimpleOrStruct()

detect if array is a simple array or a struct (associative array)

public isArraySimpleOrStruct(mixed $val) : string
Parameters
$val : mixed

The PHP array

Tags
access

private

Return values
string

(arraySimple|arrayStruct)

serialize()

serialize a fault

public serialize() : string
Tags
access

public

Return values
string

The serialization of the fault instance.

serialize_val()

serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.

public serialize_val(mixed $val[, string $name = false ][, string $type = false ][, string $name_ns = false ][, string $type_ns = false ][, array<string|int, mixed> $attributes = false ][, string $use = 'encoded' ][, bool $soapval = false ]) : string
Parameters
$val : mixed

The value to serialize

$name : string = false

The name (local part) of the XML element

$type : string = false

The XML schema type (local part) for the element

$name_ns : string = false

The namespace for the name of the XML element

$type_ns : string = false

The namespace for the type of the element

$attributes : array<string|int, mixed> = false

The attributes to serialize as name=>value pairs

$use : string = 'encoded'

The WSDL "use" (encoded|literal)

$soapval : bool = false

Whether this is called from soapval.

Tags
access

public

Return values
string

The serialized element, possibly with child elements

serializeEnvelope()

serializes a message

public serializeEnvelope(string $body[, mixed $headers = false ][, array<string|int, mixed> $namespaces = array() ][, string $style = 'rpc' ][, string $use = 'encoded' ][, string $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/' ]) : string
Parameters
$body : string

the XML of the SOAP body

$headers : mixed = false

optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array

$namespaces : array<string|int, mixed> = array()

optional the namespaces used in generating the body and headers

$style : string = 'rpc'

optional (rpc|document)

$use : string = 'encoded'

optional (encoded|literal)

$encodingStyle : string = 'http://schemas.xmlsoap.org/soap/encoding/'

optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)

Tags
access

public

Return values
string

the message

setDebugLevel()

sets the debug level for this instance

public setDebugLevel(int $level) : mixed
Parameters
$level : int

Debug level 0-9, where 0 turns off

Tags
access

public

Return values
mixed

setError()

sets error string

public setError(mixed $str) : bool
Parameters
$str : mixed
Tags
access

private

Return values
bool

$string error string

setGlobalDebugLevel()

sets the global debug level, which applies to future instances

public setGlobalDebugLevel(int $level) : mixed
Parameters
$level : int

Debug level 0-9, where 0 turns off

Tags
access

public

Return values
mixed

varDump()

Returns a string with the output of var_dump

public varDump(mixed $data) : string
Parameters
$data : mixed

The variable to var_dump

Tags
access

public

Return values
string

The output of var_dump

Search results