XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
nusoap_server Class Reference
Inheritance diagram for nusoap_server:
nusoap_base soap_server

Public Member Functions

 __construct ($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=[], $out=[], $namespace=false, $soapaction=false, $style=false, $use=false, $documentation='', $encodingStyle='')
 
 fault ($faultcode, $faultstring, $faultactor='', $faultdetail='')
 
 configureWSDL ($serviceName, $namespace=false, $endpoint=false, $style='rpc', $transport='https://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace=false)
 
- Public Member Functions inherited from nusoap_base
 __construct ()
 
 getGlobalDebugLevel ()
 
 setGlobalDebugLevel ($level)
 
 getDebugLevel ()
 
 setDebugLevel ($level)
 
 debug ($string)
 
 appendDebug ($string)
 
 clearDebug ()
 
getDebug ()
 
getDebugAsXMLComment ()
 
 expandEntities ($val)
 
 getError ()
 
 setError ($str)
 
 isArraySimpleOrStruct ($val)
 
 serialize_val ($val, $name=false, $type=false, $name_ns=false, $type_ns=false, $attributes=false, $use='encoded', $soapval=false)
 
 serializeEnvelope ($body, $headers=false, $namespaces=[], $style='rpc', $use='encoded', $encodingStyle='https://schemas.xmlsoap.org/soap/encoding/')
 
 formatDump ($str)
 
 contractQname ($qname)
 
 expandQname ($qname)
 
 getLocalPart ($str)
 
 getPrefix ($str)
 
 getNamespaceFromPrefix ($prefix)
 
 getPrefixFromNamespace ($ns)
 
 getmicrotime ()
 
 varDump ($data)
 
 __toString ()
 

Data Fields

 $headers = []
 
 $request = ''
 
 $requestHeaders = ''
 
 $requestHeader = null
 
 $document = ''
 
 $requestSOAP = ''
 
 $methodURI = ''
 
 $methodname = ''
 
 $methodparams = []
 
 $SOAPAction = ''
 
 $xml_encoding = ''
 
 $decode_utf8 = true
 
 $outgoing_headers = []
 
 $response = ''
 
 $responseHeaders = ''
 
 $responseSOAP = ''
 
 $methodreturn = false
 
 $methodreturnisliteralxml = false
 
 $fault = false
 
 $result = 'successful'
 
 $operations = []
 
 $wsdl = false
 
 $externalWSDLURL = false
 
 $debug_flag = false
 
- Data Fields inherited from nusoap_base
 $title = 'NuSOAP'
 
 $version = '0.9.5'
 
 $revision = '$Revision: 1.123 $'
 
 $error_str = ''
 
 $debug_str = ''
 
 $charencoding = true
 
 $debugLevel
 
 $XMLSchemaVersion = 'https://www.w3.org/2001/XMLSchema'
 
 $soap_defencoding = 'UTF-8'
 
 $namespaces
 
 $usedNamespaces = []
 
 $typemap
 
 $xmlEntities
 

Detailed Description

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

Author
Dietrich Ayala dietr.nosp@m.ich@.nosp@m.ganx4.nosp@m..com
Scott Nichol snich.nosp@m.ol@u.nosp@m.sers..nosp@m.sour.nosp@m.cefor.nosp@m.ge.n.nosp@m.et
Version
Id
nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp

@access public

Definition at line 3567 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $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$wsdlfile path or URL (string), or wsdl instance (object) @access public

Definition at line 3725 of file nusoap.php.

Member Function Documentation

◆ add_to_map()

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$inarray of input values
string$outarray of output values @access public
Deprecated

Definition at line 4509 of file nusoap.php.

◆ configureWSDL()

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

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

Parameters
string$serviceName,nameof the service
mixed$namespaceoptional 'tns' service namespace or false
mixed$endpointoptional URL of service endpoint or false
string$styleoptional (rpc|document) WSDL style (also specified by operation)
string$transportoptional SOAP transport
mixed$schemaTargetNamespaceoptional 'types' targetNamespace for service schema or false

Definition at line 4620 of file nusoap.php.

◆ fault()

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@access public

Definition at line 4600 of file nusoap.php.

◆ getHTTPBody()

getHTTPBody ( $soapmsg)

gets the HTTP body for the current response.

Parameters
string$soapmsgThe SOAP payload
Returns
string The HTTP body, which includes the SOAP payload @access private

Definition at line 4468 of file nusoap.php.

◆ getHTTPContentType()

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. @access private

Definition at line 4481 of file nusoap.php.

◆ getHTTPContentTypeCharset()

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. @access private

Definition at line 4495 of file nusoap.php.

◆ invoke_method()

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

@access private

Definition at line 4051 of file nusoap.php.

◆ parse_http_headers()

parse_http_headers ( )

parses HTTP request headers.

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

headers request xml_encoding SOAPAction

@access private

Definition at line 3874 of file nusoap.php.

◆ parse_request()

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$dataXML string @access private

Definition at line 4003 of file nusoap.php.

◆ parseRequest()

parseRequest ( $headers,
$data )

processes SOAP message received from client

Parameters
array$headersThe HTTP headers
string$dataunprocessed request data from client
Returns
mixed value of the message, decoded into a PHP type @access private

Definition at line 4411 of file nusoap.php.

◆ register()

register ( $name,
$in = [],
$out = [],
$namespace = false,
$soapaction = false,
$style = false,
$use = false,
$documentation = '',
$encodingStyle = '' )

register a service function with the server

Parameters
string$namethe name of the PHP function, class.method or class..method
array$inassoc array of input values: key = param name, value = param type
array$outassoc array of output values: key = param name, value = param type
mixed$namespacethe element namespace for the method or false
mixed$soapactionthe soapaction for the method or false
mixed$styleoptional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically
mixed$useoptional (encoded|literal) or false
string$documentationoptional Description to include in WSDL
string$encodingStyleoptional (usually 'https://schemas.xmlsoap.org/soap/encoding/' for encoded) @access public
Returns
bool

Definition at line 4529 of file nusoap.php.

◆ send_response()

send_response ( )

sends an HTTP response

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

outgoing_headers response

@access private

Definition at line 4311 of file nusoap.php.

◆ serialize_return()

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

@access private

Definition at line 4209 of file nusoap.php.

◆ service()

service ( $data)

processes request and returns response

Parameters
string$datausually is the value of $HTTP_RAW_POST_DATA @access public

Definition at line 3789 of file nusoap.php.

◆ verify_method()

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$operationThe operation to be invoked
array$requestThe array of parameter values
Returns
bool Whether the operation was found @access private

Definition at line 4391 of file nusoap.php.

Field Documentation

◆ $debug_flag

$debug_flag = false

Definition at line 3715 of file nusoap.php.

◆ $decode_utf8

$decode_utf8 = true

Definition at line 3640 of file nusoap.php.

◆ $document

$document = ''

Definition at line 3598 of file nusoap.php.

◆ $externalWSDLURL

$externalWSDLURL = false

Definition at line 3709 of file nusoap.php.

◆ $fault

$fault = false

Definition at line 3683 of file nusoap.php.

◆ $headers

$headers = []

Definition at line 3574 of file nusoap.php.

◆ $methodname

$methodname = ''

Definition at line 3616 of file nusoap.php.

◆ $methodparams

$methodparams = []

Definition at line 3622 of file nusoap.php.

◆ $methodreturn

$methodreturn = false

Definition at line 3671 of file nusoap.php.

◆ $methodreturnisliteralxml

$methodreturnisliteralxml = false

Definition at line 3677 of file nusoap.php.

◆ $methodURI

$methodURI = ''

Definition at line 3610 of file nusoap.php.

◆ $operations

$operations = []

Definition at line 3697 of file nusoap.php.

◆ $outgoing_headers

$outgoing_headers = []

Definition at line 3647 of file nusoap.php.

◆ $request

$request = ''

Definition at line 3580 of file nusoap.php.

◆ $requestHeader

$requestHeader = null

Definition at line 3592 of file nusoap.php.

◆ $requestHeaders

$requestHeaders = ''

Definition at line 3586 of file nusoap.php.

◆ $requestSOAP

$requestSOAP = ''

Definition at line 3604 of file nusoap.php.

◆ $response

$response = ''

Definition at line 3653 of file nusoap.php.

◆ $responseHeaders

$responseHeaders = ''

Definition at line 3659 of file nusoap.php.

◆ $responseSOAP

$responseSOAP = ''

Definition at line 3665 of file nusoap.php.

◆ $result

$result = 'successful'

Definition at line 3689 of file nusoap.php.

◆ $SOAPAction

$SOAPAction = ''

Definition at line 3628 of file nusoap.php.

◆ $wsdl

$wsdl = false

Definition at line 3703 of file nusoap.php.

◆ $xml_encoding

$xml_encoding = ''

Definition at line 3634 of file nusoap.php.


The documentation for this class was generated from the following file: