soap_server Class Reference

Inherits nusoap_base, and nusoap_base.

Inherited by nusoapservermime, and ShadeSoap_NusoapServer.

Inheritance diagram for soap_server:

[legend]
Collaboration diagram for soap_server:
[legend]
List of all members.

Public Member Functions

 soap_server ($wsdl=false)
 service ($data)
 parse_http_headers ()
 parse_request ($data='')
 invoke_method ()
 serialize_return ()
 send_response ()
 verify_method ($operation, $request)
 parseRequest ($headers, $data)
 getHTTPBody ($soapmsg)
 getHTTPContentType ()
 getHTTPContentTypeCharset ()
 add_to_map ($methodname, $in, $out)
 register ($name, $in=array(), $out=array(), $namespace=false, $soapaction=false, $style=false, $use=false, $documentation='', $encodingStyle='')
 fault ($faultcode, $faultstring, $faultactor='', $faultdetail='')
 configureWSDL ($serviceName, $namespace=false, $endpoint=false, $style='rpc', $transport= 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace=false)
 soap_server ($wsdl=false)
 service ($data)
 parse_http_headers ()
 parse_request ($data='')
 invoke_method ()
 serialize_return ()
 send_response ()
 verify_method ($operation, $request)
 parseRequest ($headers, $data)
 getHTTPBody ($soapmsg)
 getHTTPContentType ()
 getHTTPContentTypeCharset ()
 add_to_map ($methodname, $in, $out)
 register ($name, $in=array(), $out=array(), $namespace=false, $soapaction=false, $style=false, $use=false, $documentation='', $encodingStyle='')
 fault ($faultcode, $faultstring, $faultactor='', $faultdetail='')
 configureWSDL ($serviceName, $namespace=false, $endpoint=false, $style='rpc', $transport= 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace=false)

Detailed Description

soap_server allows the user to create a SOAP server that is capable of receiving messages and returning responses

NOTE: WSDL functionality is experimental

Author:
Dietrich Ayala <dietrich@ganx4.com>
Version:
$Id$ public


Member Function Documentation

soap_server::soap_server ( wsdl = false  ) 

constructor the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.

Parameters:
mixed $wsdl file path or URL (string), or wsdl instance (object) public

soap_server::service ( data  ) 

processes request and returns response

Parameters:
string $data usually is the value of $HTTP_RAW_POST_DATA public

soap_server::parse_http_headers (  ) 

parses HTTP request headers.

The following fields are set by this function (when successful)

headers request xml_encoding SOAPAction

private

soap_server::parse_request ( data = ''  ) 

parses a request

The following fields are set by this function (when successful)

headers request xml_encoding SOAPAction request requestSOAP methodURI methodname methodparams requestHeaders document

This sets the fault field on error

Parameters:
string $data XML string private

soap_server::invoke_method (  ) 

invokes a PHP function for the requested SOAP method

The following fields are set by this function (when successful)

methodreturn

Note that the PHP function that is called may also set the following fields to affect the response sent to the client

responseHeaders outgoing_headers

This sets the fault field on error

private

soap_server::serialize_return (  ) 

serializes the return value from a PHP function into a full SOAP Envelope

The following fields are set by this function (when successful)

responseSOAP

This sets the fault field on error

private

soap_server::send_response (  ) 

sends an HTTP response

The following fields are set by this function (when successful)

outgoing_headers response

private

soap_server::verify_method ( operation,
request 
)

takes the value that was created by parsing the request and compares to the method's signature, if available.

Parameters:
string $operation The operation to be invoked
array $request The array of parameter values
Returns:
boolean Whether the operation was found private

soap_server::parseRequest ( headers,
data 
)

processes SOAP message received from client

Parameters:
array $headers The HTTP headers
string $data unprocessed request data from client
Returns:
mixed value of the message, decoded into a PHP type private

Reimplemented in nusoapservermime.

soap_server::getHTTPBody ( soapmsg  ) 

gets the HTTP body for the current response.

Parameters:
string $soapmsg The SOAP payload
Returns:
string The HTTP body, which includes the SOAP payload private

Reimplemented in nusoapservermime.

soap_server::getHTTPContentType (  ) 

gets the HTTP content type for the current response.

Note: getHTTPBody must be called before this.

Returns:
string the HTTP content type for the current response. private

Reimplemented in nusoapservermime.

soap_server::getHTTPContentTypeCharset (  ) 

gets the HTTP content type charset for the current response. returns false for non-text content types.

Note: getHTTPBody must be called before this.

Returns:
string the HTTP content type charset for the current response. private

Reimplemented in nusoapservermime.

soap_server::add_to_map ( methodname,
in,
out 
)

add a method to the dispatch map (this has been replaced by the register method)

Parameters:
string $methodname
string $in array of input values
string $out array of output values public
Deprecated:

soap_server::register ( name,
in = array(),
out = array(),
namespace = false,
soapaction = false,
style = false,
use = false,
documentation = '',
encodingStyle = '' 
)

register a service function with the server

Parameters:
string $name the name of the PHP function, class.method or class..method
array $in assoc array of input values: key = param name, value = param type
array $out assoc array of output values: key = param name, value = param type
mixed $namespace the element namespace for the method or false
mixed $soapaction the soapaction for the method or false
mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically
mixed $use optional (encoded|literal) or false
string $documentation optional Description to include in WSDL
string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) public

soap_server::fault ( faultcode,
faultstring,
faultactor = '',
faultdetail = '' 
)

Specify a fault to be returned to the client. This also acts as a flag to the server that a fault has occured.

Parameters:
string $faultcode
string $faultstring
string $faultactor
string $faultdetail public

soap_server::configureWSDL ( serviceName,
namespace = false,
endpoint = false,
style = 'rpc',
transport = 'http://schemas.xmlsoap.org/soap/http',
schemaTargetNamespace = false 
)

Sets up wsdl object. Acts as a flag to enable internal WSDL generation

Parameters:
string $serviceName, name of the service
mixed $namespace optional 'tns' service namespace or false
mixed $endpoint optional URL of service endpoint or false
string $style optional (rpc|document) WSDL style (also specified by operation)
string $transport optional SOAP transport
mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false

soap_server::soap_server ( wsdl = false  ) 

constructor the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.

Parameters:
mixed $wsdl file path or URL (string), or wsdl instance (object) public

soap_server::service ( data  ) 

processes request and returns response

Parameters:
string $data usually is the value of $HTTP_RAW_POST_DATA public

soap_server::parse_http_headers (  ) 

parses HTTP request headers.

The following fields are set by this function (when successful)

headers request xml_encoding SOAPAction

private

soap_server::parse_request ( data = ''  ) 

parses a request

The following fields are set by this function (when successful)

headers request xml_encoding SOAPAction request requestSOAP methodURI methodname methodparams requestHeaders document

This sets the fault field on error

Parameters:
string $data XML string private

soap_server::invoke_method (  ) 

invokes a PHP function for the requested SOAP method

The following fields are set by this function (when successful)

methodreturn

Note that the PHP function that is called may also set the following fields to affect the response sent to the client

responseHeaders outgoing_headers

This sets the fault field on error

private

soap_server::serialize_return (  ) 

serializes the return value from a PHP function into a full SOAP Envelope

The following fields are set by this function (when successful)

responseSOAP

This sets the fault field on error

private

soap_server::send_response (  ) 

sends an HTTP response

The following fields are set by this function (when successful)

outgoing_headers response

private

soap_server::verify_method ( operation,
request 
)

takes the value that was created by parsing the request and compares to the method's signature, if available.

Parameters:
string $operation The operation to be invoked
array $request The array of parameter values
Returns:
boolean Whether the operation was found private

soap_server::parseRequest ( headers,
data 
)

processes SOAP message received from client

Parameters:
array $headers The HTTP headers
string $data unprocessed request data from client
Returns:
mixed value of the message, decoded into a PHP type private

Reimplemented in nusoapservermime.

soap_server::getHTTPBody ( soapmsg  ) 

gets the HTTP body for the current response.

Parameters:
string $soapmsg The SOAP payload
Returns:
string The HTTP body, which includes the SOAP payload private

Reimplemented in nusoapservermime.

soap_server::getHTTPContentType (  ) 

gets the HTTP content type for the current response.

Note: getHTTPBody must be called before this.

Returns:
string the HTTP content type for the current response. private

Reimplemented in nusoapservermime.

soap_server::getHTTPContentTypeCharset (  ) 

gets the HTTP content type charset for the current response. returns false for non-text content types.

Note: getHTTPBody must be called before this.

Returns:
string the HTTP content type charset for the current response. private

Reimplemented in nusoapservermime.

soap_server::add_to_map ( methodname,
in,
out 
)

add a method to the dispatch map (this has been replaced by the register method)

Parameters:
string $methodname
string $in array of input values
string $out array of output values public
Deprecated:

soap_server::register ( name,
in = array(),
out = array(),
namespace = false,
soapaction = false,
style = false,
use = false,
documentation = '',
encodingStyle = '' 
)

register a service function with the server

Parameters:
string $name the name of the PHP function, class.method or class..method
array $in assoc array of input values: key = param name, value = param type
array $out assoc array of output values: key = param name, value = param type
mixed $namespace the element namespace for the method or false
mixed $soapaction the soapaction for the method or false
mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically
mixed $use optional (encoded|literal) or false
string $documentation optional Description to include in WSDL
string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) public

soap_server::fault ( faultcode,
faultstring,
faultactor = '',
faultdetail = '' 
)

Specify a fault to be returned to the client. This also acts as a flag to the server that a fault has occured.

Parameters:
string $faultcode
string $faultstring
string $faultactor
string $faultdetail public

soap_server::configureWSDL ( serviceName,
namespace = false,
endpoint = false,
style = 'rpc',
transport = 'http://schemas.xmlsoap.org/soap/http',
schemaTargetNamespace = false 
)

Sets up wsdl object. Acts as a flag to enable internal WSDL generation

Parameters:
string $serviceName, name of the service
mixed $namespace optional 'tns' service namespace or false
mixed $endpoint optional URL of service endpoint or false
string $style optional (rpc|document) WSDL style (also specified by operation)
string $transport optional SOAP transport
mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false


The documentation for this class was generated from the following files:
Generated on Thu Nov 2 00:27:17 2006 for XOOPS Cube Legacy by  doxygen 1.5.1