Class nusoap_base

Description

nusoap_base

  • access: public
  • version: $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $
  • author: Dietrich Ayala <dietrich@ganx4.com>

Located in /nusoap.php (line 65)


	
			
Direct descendents
Class Description
 class soap_fault Contains information for a SOAP fault.
 class XMLSchema parses an XML Schema, allows access to it's data, other utility methods no validation... yet.
 class soapval For creating serializable abstractions of native PHP types. This class
 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
 class soap_server soap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses
 class wsdl parses a WSDL file, allows access to it's data, other utility methods
 class soap_parser soap_parser class parses SOAP XML messages into native PHP values
 class soapclient soapclient higher level class for easy usage.
Variable Summary
 boolean $charencoding
 integer $debugLevel
 string $debug_str
 string $error_str
 array $namespaces
 string $revision
 string $title
 array $typemap
 string $version
 array $xmlEntities
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 (mixed $qname, string $string)
 string formatDump (string $str)
 debug &getDebug ()
 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'])
 void setDebugLevel (int $level)
 boolean setError (mixed $str)
 void setGlobalDebugLevel (int $level)
 string varDump (mixed $data)
Variables
boolean $charencoding = true (line 108)

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

  • access: private
integer $debugLevel (line 115)

the debug level for this instance

  • access: private
string $debug_str = '' (line 100)

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

  • access: private
string $error_str = '' (line 93)

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 142)

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:
string $revision = '$Revision: 1.94 $' (line 86)

CVS revision for HTTP headers.

  • access: private
string $soap_defencoding = 'ISO-8859-1' (line 131)

charset encoding for outgoing messages

  • access: public
string $title = 'NuSOAP' (line 72)

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 164)

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

  • access: public
array $usedNamespaces = array() (line 155)

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

  • access: private
string $version = '0.7.2' (line 79)

Version for HTTP headers.

  • access: private
array $xmlEntities = array('quot' => '"','amp' => '&',
'lt' => '<','gt' => '>','apos' => "'")
(line 197)

XML entities to convert

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

set schema version

  • access: public
Methods
Constructor nusoap_base (line 205)

constructor

  • access: public
nusoap_base nusoap_base ()
appendDebug (line 267)

adds debug data to the instance debug string without formatting

  • access: public
void appendDebug (string $string)
  • string $string: debug data
clearDebug (line 280)

clears the current debug data for this instance

  • access: public
void clearDebug ()
contractQname (line 674)

contracts (changes namespace to prefix) a qualified name

  • return: contracted qname
  • access: private
string contractQname (string $qname)
  • string $qname: qname
debug (line 255)

adds debug data to the instance debug string with formatting

  • access: private
void debug (string $string)
  • string $string: debug data
expandEntities (line 320)

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

  • access: private
void expandEntities (string $val)
  • string $val: The string in which to expand entities.
expandQname (line 699)

expands (changes prefix to namespace) a qualified name

  • return: expanded qname
  • access: private
string expandQname (mixed $qname, string $string)
  • string $string: qname
formatDump (line 662)

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 292)

gets the current debug data for this instance

  • return: data
  • access: public
debug &getDebug ()
getDebugAsXMLComment (line 305)

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 235)

gets the debug level for this instance

  • return: Debug level 0-9, where 0 turns off
  • access: public
int getDebugLevel ()
getError (line 337)

returns error string if present

  • return: error string or false
  • access: public
mixed getError ()
getGlobalDebugLevel (line 215)

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 724)

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 788)

returns the time in ODBC canonical form with microseconds

  • return: The time in ODBC canonical form with microseconds
  • access: public
string getmicrotime ()
getNamespaceFromPrefix (line 756)

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 741)

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 772)

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 361)

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 611)

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
  • 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 385)

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'])
  • 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)
setDebugLevel (line 245)

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 350)

sets error string

  • return: error string
  • access: private
boolean setError (mixed $str)
setGlobalDebugLevel (line 225)

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 807)

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

Documentation generated on Wed, 3 Aug 2005 21:29:35 -0400 by phpDocumentor 1.3.0RC3