phpDocumentor default
[ class tree: default ] [ index: default ] [ all elements ]

Class: soap_server

Source Location: /lodel/scripts/nusoap.php

Class soap_server

Class Overview

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

NOTE: WSDL functionality is experimental

Located in /lodel/scripts/nusoap.php [line 2473]

nusoap_base
   |
   --soap_server
Author(s): API Tags:
Access:  public

Information Tags:
Version:  $Id: nusoap.php 3705 2006-09-14 16:06:29Z cenou $

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From nusoap_base

nusoap_base::$charencoding
nusoap_base::$debug_str
nusoap_base::$error_str
nusoap_base::$namespaces
nusoap_base::$revision
nusoap_base::$soap_defencoding
nusoap_base::$title
nusoap_base::$typemap
nusoap_base::$usedNamespaces
nusoap_base::$version
nusoap_base::$xmlEntities
nusoap_base::$XMLSchemaVersion

Inherited From nusoap_base

nusoap_base::appendDebug()
adds debug data to the instance debug string without formatting
nusoap_base::clearDebug()
clears the current debug data for this instance
nusoap_base::contractQname()
contracts a qualified name
nusoap_base::debug()
adds debug data to the instance debug string with formatting
nusoap_base::expandEntities()
expands entities, e.g. changes '<' to '&lt;'.
nusoap_base::expandQname()
expands a qualified name
nusoap_base::formatDump()
nusoap_base::getDebug()
gets the current debug data for this instance
nusoap_base::getDebugAsXMLComment()
gets the current debug data for this instance as an XML comment this may change the contents of the debug data
nusoap_base::getError()
returns error string if present
nusoap_base::getLocalPart()
returns the local part of a prefixed string returns the original string, if not prefixed
nusoap_base::getmicrotime()
returns the time in ODBC canonical form with microseconds
nusoap_base::getNamespaceFromPrefix()
pass it a prefix, it returns a namespace returns false if no namespace registered with the given prefix
nusoap_base::getPrefix()
returns the prefix part of a prefixed string returns false, if not prefixed
nusoap_base::getPrefixFromNamespace()
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace
nusoap_base::isArraySimpleOrStruct()
detect if array is a simple array or a struct (associative array)
nusoap_base::serializeEnvelope()
serialize message
nusoap_base::serialize_val()
serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.
nusoap_base::setError()
sets error string
nusoap_base::varDump()

[ Top ]
Property Summary
mixed   $debug_flag  
mixed   $document  
mixed   $externalWSDLURL  
mixed   $fault  
mixed   $headers  
mixed   $methodname  
mixed   $methodparams  
mixed   $methodreturn  
mixed   $methodreturnisliteralxml  
mixed   $methodURI  
mixed   $operations  
mixed   $outgoing_headers  
mixed   $request  
mixed   $requestHeaders  
mixed   $requestSOAP  
mixed   $response  
mixed   $responseHeaders  
mixed   $responseSOAP  
mixed   $result  
mixed   $SOAPAction  
mixed   $wsdl  
mixed   $xml_encoding  

[ Top ]
Method Summary
soap_server   soap_server()   constructor the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.
void   add_to_map()   add a method to the dispatch map
void   configureWSDL()   sets up wsdl object this acts as a flag to enable internal WSDL generation
void   fault()   create a fault. this also acts as a flag to the server that a fault has occured.
void   invoke_method()   invokes a PHP function for the requested SOAP method
void   parse_http_headers()   parses HTTP request headers.
void   parse_request()   parses a request
void   register()   register a service with the server
void   send_response()   sends an HTTP response
void   serialize_return()   serializes the return value from a PHP function into a full SOAP Envelope
void   service()   processes request and returns response
boolean   verify_method()   takes the value that was created by parsing the request and compares to the method's signature, if available.

[ Top ]
Properties
mixed   $debug_flag = false [line 2497]

[ Top ]
mixed   $document = '' [line 2477]

[ Top ]
mixed   $externalWSDLURL = false [line 2496]

[ Top ]
mixed   $fault = false [line 2491]

[ Top ]
mixed   $headers = array() [line 2474]

[ Top ]
mixed   $methodname = '' [line 2480]

[ Top ]
mixed   $methodparams = array() [line 2481]

[ Top ]
mixed   $methodreturn = false [line 2489]

[ Top ]
mixed   $methodreturnisliteralxml = false [line 2490]

[ Top ]
mixed   $methodURI = '' [line 2479]

[ Top ]
mixed   $operations = array() [line 2494]

[ Top ]
mixed   $outgoing_headers = array() [line 2485]

[ Top ]
mixed   $request = '' [line 2475]

[ Top ]
mixed   $requestHeaders = '' [line 2476]

[ Top ]
mixed   $requestSOAP = '' [line 2478]

[ Top ]
mixed   $response = '' [line 2486]

[ Top ]
mixed   $responseHeaders = '' [line 2487]

[ Top ]
mixed   $responseSOAP = '' [line 2488]

[ Top ]
mixed   $result = 'successful' [line 2492]

[ Top ]
mixed   $SOAPAction = '' [line 2483]

[ Top ]
mixed   $wsdl = false [line 2495]

[ Top ]
mixed   $xml_encoding = '' [line 2482]

[ Top ]
Methods
Constructor soap_server  [line 2506]

  soap_server soap_server( [mixed $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)

API Tags:
Access:  public


[ Top ]
add_to_map  [line 3083]

  void add_to_map( string $methodname, string $in, string $out  )

add a method to the dispatch map

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

API Tags:
Access:  public


[ Top ]
configureWSDL  [line 3155]

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

sets up wsdl object this acts as a flag to enable internal WSDL generation

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


[ Top ]
fault  [line 3140]

  void fault( string $faultcode, string $faultstring, [string $faultactor = ''], [string $faultdetail = '']  )

create a fault. this also acts as a flag to the server that a fault has occured.

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

API Tags:
Access:  public


[ Top ]
invoke_method  [line 2794]

  void 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


API Tags:
Access:  private


[ Top ]
parse_http_headers  [line 2611]

  void parse_http_headers( )

parses HTTP request headers.

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

headers request xml_encoding SOAPAction


API Tags:
Access:  private


[ Top ]
parse_request  [line 2727]

  void parse_request( [string $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

API Tags:
Access:  private


[ Top ]
register  [line 3100]

  void register( $name, [string $in = array()], [string $out = array()], [string $namespace = false], [string $soapaction = false], [string $style = false], [string $use = false], [string $documentation = ''], string $methodname  )

register a service with the server

Parameters:
string   $methodname: 
string   $in:  assoc array of input values: key = param name, value = param type
string   $out:  assoc array of output values: key = param name, value = param type
string   $namespace: 
string   $soapaction: 
string   $style:  optional (rpc|document)
string   $use:  optional (encoded|literal)
string   $documentation:  optional Description to include in WSDL
   $name: 

API Tags:
Access:  public


[ Top ]
send_response  [line 2989]

  void send_response( )

sends an HTTP response

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

outgoing_headers response


API Tags:
Access:  private


[ Top ]
serialize_return  [line 2915]

  void 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


API Tags:
Access:  private


[ Top ]
service  [line 2559]

  void service( string $data  )

processes request and returns response

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

API Tags:
Access:  public


[ Top ]
verify_method  [line 3064]

  boolean verify_method( mixed $operation, $request  )

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

Parameters:
mixed   $operation: 
   $request: 

API Tags:
Access:  private


[ Top ]

Documentation generated on Wed, 19 Sep 2007 05:07:18 +0200 by phpDocumentor 1.4.0a2