## nusoap_base

Description

nusoap_base

- access: public
- version: $Id: nusoap_base.html,v 1.2 2010/04/26 20:25:21 snichol Exp $
- author: Dietrich Ayala <dietrich@ganx4.com>
- author: Scott Nichol <snichol@users.sourceforge.net>

Located in /nusoap.php (line 85)

Direct descendents

Class | Description
--- | ---
nusoap_fault | Contains information for a SOAP fault.
nusoap_xmlschema | parses an XML Schema, allows access to it's data, other utility methods.
soapval | For creating serializable abstractions of native PHP types. This class
soap_transport_http | transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support
nusoap_server | nusoap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses
wsdl | parses a WSDL file, allows access to it's data, other utility methods.
nusoap_parser | nusoap_parser class parses SOAP XML messages into native PHP values
nusoap_client | [nu]soapclient higher level class for easy usage.

Variable Summary
boolean $charencoding
integer $debugLevel
string $debug_str
string $error_str
array $namespaces
string $revision
string $soap_defencoding
string $title
array $typemap
array $usedNamespaces
string $version
array $xmlEntities
string $XMLSchemaVersion
Method Summary
nusoap_base nusoap_base ()
void appendDebug (string $string)
void clearDebug ()
string contractQname (string $qname)
void debug (string $string)
void expandEntities (string $val)
string expandQname (string $qname)
string formatDump (string $str)
debug &getDebug ()
debug &getDebugAsXMLComment ()
int getDebugLevel ()
mixed getError ()
integer getGlobalDebugLevel ()
string getLocalPart (string $str)
string getmicrotime ()
mixed getNamespaceFromPrefix (string $prefix)
mixed getPrefix (string $str)
mixed getPrefixFromNamespace (string $ns)
string isArraySimpleOrStruct (mixed $val)
string serializeEnvelope (string $body, [mixed $headers = false], [array $namespaces = array()], [string $style = 'rpc'], [string $use = 'encoded'], [string $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'])
string serialize_val (mixed $val, [string $name = false], [string $type = false], [string $name_ns = false], [string $type_ns = false], [array $attributes = false], [string $use = 'encoded'], [boolean $soapval = false])
void setDebugLevel (int $level)
boolean setError (mixed $str)
void setGlobalDebugLevel (int $level)
string varDump (mixed $data)
string __toString ()
Variables
boolean $charencoding = true (line 128)

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

- access: private

integer $debugLevel (line 135)

the debug level for this instance

- access: private

string $debug_str = '' (line 120)

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

- access: private

string $error_str = '' (line 113)

Current error string (manipulated by getError/setError)

- access: private

array $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/'
) (line 162)

namespaces in an array of prefix => uri

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

- access: public

Redefined in descendants as:

- nusoap_parser::$namespaces

string $revision = '$Revision: 1.2 $' (line 106)

CVS revision for HTTP headers.

- access: private

string $soap_defencoding = 'ISO-8859-1' (line 151)

charset encoding for outgoing messages

- access: public

string $title = 'NuSOAP' (line 92)

Identification for HTTP headers.

- access: private

array $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')) (line 184)

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.

- access: public

array $usedNamespaces = array() (line 175)

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

- access: private

string $version = '0.9.5' (line 99)

Version for HTTP headers.

- access: private

array $xmlEntities = array('quot' => '"','amp' => '&',
'lt' => '<','gt' => '>','apos' => "'") (line 217)

XML entities to convert

- see: nusoap_base::expandEntities()
- deprecated:
- access: public

string $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema' (line 143)

set schema version

- access: public

Methods
Constructor nusoap_base (line 225)

constructor

- access: public

nusoap_base nusoap_base ()
appendDebug (line 287)

adds debug data to the instance debug string without formatting

- access: public

void appendDebug (string $string)

- string $string: debug data

clearDebug (line 300)

clears the current debug data for this instance

- access: public

void clearDebug ()
contractQname (line 740)

contracts (changes namespace to prefix) a qualified name

- return: contracted qname
- access: private

string contractQname (string $qname)

- string $qname: qname

debug (line 275)

adds debug data to the instance debug string with formatting

- access: private

void debug (string $string)

- string $string: debug data

expandEntities (line 341)

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

- access: private

void expandEntities (string $val)

- string $val: The string in which to expand entities.

expandQname (line 765)

expands (changes prefix to namespace) a qualified name

- return: expanded qname
- access: private

string expandQname (string $qname)

- string $qname: qname

formatDump (line 728)

formats a string to be inserted into an HTML stream

- return: The formatted string
- deprecated:
- access: public

string formatDump (string $str)

- string $str: The string to format

getDebug (line 312)

gets the current debug data for this instance

- return: data
- access: public

debug &getDebug ()
getDebugAsXMLComment (line 325)

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

- return: data as an XML comment
- access: public

debug &getDebugAsXMLComment ()
getDebugLevel (line 255)

gets the debug level for this instance

- return: Debug level 0-9, where 0 turns off
- access: public

int getDebugLevel ()
getError (line 358)

returns error string if present

- return: error string or false
- access: public

mixed getError ()
getGlobalDebugLevel (line 235)

gets the global debug level, which applies to future instances

- return: Debug level 0-9, where 0 turns off
- access: public

integer getGlobalDebugLevel ()
getLocalPart (line 790)

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

- return: The local part
- access: public

string getLocalPart (string $str)

- string $str: The prefixed string

getmicrotime (line 854)

returns the time in ODBC canonical form with microseconds

- return: The time in ODBC canonical form with microseconds
- access: public

string getmicrotime ()
getNamespaceFromPrefix (line 822)

pass it a prefix, it returns a namespace

- return: The namespace, false if no namespace has the specified prefix
- access: public

mixed getNamespaceFromPrefix (string $prefix)

- string $prefix: The prefix

getPrefix (line 807)

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

- return: The prefix or false if there is no prefix
- access: public

mixed getPrefix (string $str)

- string $str: The prefixed string

getPrefixFromNamespace (line 838)

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

- return: The prefix, false if the namespace has no prefixes
- access: public

mixed getPrefixFromNamespace (string $ns)

- string $ns: The namespace

isArraySimpleOrStruct (line 382)

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

- return: (arraySimple|arrayStruct)
- access: private

string isArraySimpleOrStruct (mixed $val)

- mixed $val: The PHP array

serializeEnvelope (line 673)

serializes a message

- return: the message
- access: public

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

- string $body: the XML of the SOAP body
- mixed $headers: optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array
- array $namespaces: optional the namespaces used in generating the body and headers
- string $style: optional (rpc|document)
- string $use: optional (encoded|literal)
- string $encodingStyle: optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)

serialize_val (line 407)

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

- return: The serialized element, possibly with child elements
- access: public

string serialize_val (mixed $val, [string $name = false], [string $type = false], [string $name_ns = false], [string $type_ns = false], [array $attributes = false], [string $use = 'encoded'], [boolean $soapval = false])

- mixed $val: The value to serialize
- string $name: The name (local part) of the XML element
- string $type: The XML schema type (local part) for the element
- string $name_ns: The namespace for the name of the XML element
- string $type_ns: The namespace for the type of the element
- array $attributes: The attributes to serialize as name=>value pairs
- string $use: The WSDL "use" (encoded|literal)
- boolean $soapval: Whether this is called from soapval.

setDebugLevel (line 265)

sets the debug level for this instance

- access: public

void setDebugLevel (int $level)

- int $level: Debug level 0-9, where 0 turns off

setError (line 371)

sets error string

- return: error string
- access: private

boolean setError (mixed $str)
setGlobalDebugLevel (line 245)

sets the global debug level, which applies to future instances

- access: public

void setGlobalDebugLevel (int $level)

- int $level: Debug level 0-9, where 0 turns off

varDump (line 873)

Returns a string with the output of var_dump

- return: The output of var_dump
- access: public

string varDump (mixed $data)

- mixed $data: The variable to var_dump

__toString (line 887)

represents the object as a string

- access: public

string __toString ()

Documentation generated on Mon, 26 Apr 2010 16:17:01 -0400 by phpDocumentor 1.3.0RC3