\nusoap_server
nusoap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses
- Author: Dietrich Ayala <dietrich@ganx4.com>
Synopsis
class nusoap_server
extends nusoap_base
{
- // members
- public array $headers = ;
- public string $request = '';
- public string $requestHeaders = '';
- public $requestHeader = NULL;
- public string $document = '';
- public string $requestSOAP = '';
- public string $methodURI = '';
- public string $methodname = '';
- public array $methodparams = ;
- public string $SOAPAction = '';
- public string $xml_encoding = '';
- public boolean $decode_utf8 = true;
- public array $outgoing_headers = ;
- public string $response = '';
- public string $responseHeaders = '';
- public string $responseSOAP = '';
- public boolean $methodreturn = false;
- public boolean $methodreturnisliteralxml = false;
- public boolean $fault = false;
- public string $result = 'successful';
- public array $operations = ;
- public boolean $wsdl = false;
- public boolean $externalWSDLURL = false;
- public boolean $debug_flag = false;
- // Inherited members from nusoap_base
- public string $title;
- public string $version;
- public string $revision;
- public string $error_str;
- public string $debug_str;
- public boolean $charencoding;
- public $debugLevel;
- public string $XMLSchemaVersion;
- public string $soap_defencoding;
- public array $namespaces;
- public array $usedNamespaces;
- public array $typemap;
- public array $xmlEntities;
- // methods
- public void nusoap_server()
- public void service()
- public void parse_http_headers()
- public void parse_request()
- public void invoke_method()
- public void serialize_return()
- public void send_response()
- public boolean verify_method()
- public mixed parseRequest()
- public string getHTTPBody()
- public string getHTTPContentType()
- public string getHTTPContentTypeCharset()
- public void add_to_map()
- public void register()
- public void fault()
- public void configureWSDL()
- // Inherited methods from nusoap_base
- public void nusoap_base()
- public integer getGlobalDebugLevel()
- public void setGlobalDebugLevel()
- public int getDebugLevel()
- public void setDebugLevel()
- public void debug()
- public void appendDebug()
- public void clearDebug()
- public debug getDebug()
- public debug getDebugAsXMLComment()
- public void expandEntities()
- public mixed getError()
- public boolean setError()
- public string isArraySimpleOrStruct()
- public string serialize_val()
- public string serializeEnvelope()
- public string formatDump()
- public string contractQname()
- public string expandQname()
- public string getLocalPart()
- public mixed getPrefix()
- public mixed getNamespaceFromPrefix()
- public mixed getPrefixFromNamespace()
- public string getmicrotime()
- public string varDump()
- public string __toString()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
692 | add an option to automatically run utf8_encode on $body and $headers |
Members
public
- $SOAPAction
—
string
SOAP Action from request - $XMLSchemaVersion
—
string
set schema version - $charencoding
—
boolean
toggles automatic encoding of special characters as entities (should always be true, I think) - $debugLevel
—
integer
the debug level for this instance - $debug_flag
—
boolean
whether to append debug to response as XML comment - $debug_str
—
string
Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) - $decode_utf8
—
boolean
toggles whether the parser decodes element content w/ utf8_decode() - $document
—
string
SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) - $error_str
—
string
Current error string (manipulated by getError/setError) - $externalWSDLURL
—
mixed
URL for WSDL (if one) - $fault
—
mixed
SOAP fault for response (or false) - $headers
—
array
HTTP headers of request - $methodURI
—
string
requested method namespace URI - $methodname
—
string
name of method requested - $methodparams
—
array
method parameters from request - $methodreturn
—
mixed
method return value to place in response - $methodreturnisliteralxml
—
boolean
whether $methodreturn is a string of literal XML - $namespaces
—
array
namespaces in an array of prefix => uri - $operations
—
array
assoc array of operations => opData; operations are added by the register() method or by parsing an external WSDL definition - $outgoing_headers
—
array
HTTP headers of response - $request
—
string
HTTP request - $requestHeader
—
mixed
SOAP Headers from request (parsed) - $requestHeaders
—
string
SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) - $requestSOAP
—
string
SOAP payload for request (text) - $response
—
string
HTTP response - $responseHeaders
—
mixed
SOAP headers for response (text or array of soapval or associative array) - $responseSOAP
—
string
SOAP payload for response (text) - $result
—
string
text indication of result (for debugging) - $revision
—
string
CVS revision for HTTP headers. - $soap_defencoding
—
string
charset encoding for outgoing messages - $title
—
string
Identification for HTTP headers. - $typemap
—
array
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
namespaces used in the current context, e.g. during serialization - $version
—
string
Version for HTTP headers. - $wsdl
—
mixed
wsdl instance (if one) - $xmlEntities
—
array
XML entities to convert - $xml_encoding
—
string
character set encoding of incoming (request) messages
Methods
public
- add_to_map() — add a method to the dispatch map (this has been replaced by the register method)
- configureWSDL() — Sets up wsdl object.
- fault() — Specify a fault to be returned to the client.
- getHTTPBody() — gets the HTTP body for the current response.
- getHTTPContentType() — gets the HTTP content type for the current response.
- getHTTPContentTypeCharset() — gets the HTTP content type charset for the current response.
- invoke_method() — invokes a PHP function for the requested SOAP method
- nusoap_server() — constructor the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.
- parseRequest() — processes SOAP message received from client
- parse_http_headers() — parses HTTP request headers.
- parse_request() — parses a request
- register() — register a service function with the server
- send_response() — sends an HTTP response
- serialize_return() — serializes the return value from a PHP function into a full SOAP Envelope
- service() — processes request and returns response
- verify_method() — takes the value that was created by parsing the request and compares to the method's signature, if available.
Inherited from nusoap_base
public
- __toString() — represents the object as a string
- appendDebug() — adds debug data to the instance debug string without formatting
- clearDebug() — clears the current debug data for this instance
- contractQname() — contracts (changes namespace to prefix) a qualified name
- debug() — adds debug data to the instance debug string with formatting
- expandEntities() — expands entities, e.g. changes '<' to '<'.
- expandQname() — expands (changes prefix to namespace) a qualified name
- formatDump() — formats a string to be inserted into an HTML stream
- getDebug() — gets the current debug data for this instance
- getDebugAsXMLComment() — gets the current debug data for this instance as an XML comment this may change the contents of the debug data
- getDebugLevel() — gets the debug level for this instance
- getError() — returns error string if present
- getGlobalDebugLevel() — gets the global debug level, which applies to future instances
- getLocalPart() — returns the local part of a prefixed string returns the original string, if not prefixed
- getNamespaceFromPrefix() — pass it a prefix, it returns a namespace
- getPrefix() — returns the prefix part of a prefixed string returns false, if not prefixed
- getPrefixFromNamespace() — returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace
- getmicrotime() — returns the time in ODBC canonical form with microseconds
- isArraySimpleOrStruct() — detect if array is a simple array or a struct (associative array)
- nusoap_base() — constructor
- serializeEnvelope() — serializes a message
- serialize_val() — serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.
- setDebugLevel() — sets the debug level for this instance
- setError() — sets error string
- setGlobalDebugLevel() — sets the global debug level, which applies to future instances
- varDump() — Returns a string with the output of var_dump