[ PHPXref.com ] [ Generated: Sun Jul 20 21:02:40 2008 ] [ Web Form Factory 0.1.2 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/services/ -> nusoap.php (summary)

(no description)

File Size: 7259 lines (255 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 classes

nusoap_base:: (28 methods):
  nusoap_base()
  getGlobalDebugLevel()
  setGlobalDebugLevel()
  getDebugLevel()
  setDebugLevel()
  debug()
  appendDebug()
  clearDebug()
  getDebug()
  getDebugAsXMLComment()
  expandEntities()
  getError()
  setError()
  isArraySimpleOrStruct()
  serialize_val()
  serializeEnvelope()
  formatDump()
  contractQname()
  expandQname()
  getLocalPart()
  getPrefix()
  getNamespaceFromPrefix()
  getPrefixFromNamespace()
  getmicrotime()
  varDump()
  timestamp_to_iso8601()
  iso8601_to_timestamp()
  usleepWindows()

soap_fault:: (2 methods):
  soap_fault()
  serialize()

XMLSchema:: (15 methods):
  XMLSchema()
  parseFile()
  parseString()
  schemaStartElement()
  schemaEndElement()
  schemaCharacterData()
  serializeSchema()
  xdebug()
  getPHPType()
  getTypeDef()
  serializeTypeDef()
  typeToForm()
  addComplexType()
  addSimpleType()
  addElement()

soapval:: (3 methods):
  soapval()
  serialize()
  decode()

soap_transport_http:: (17 methods):
  soap_transport_http()
  setURL()
  connect()
  send()
  sendHTTPS()
  setCredentials()
  setSOAPAction()
  setEncoding()
  setProxy()
  decodeChunked()
  buildPayload()
  sendRequest()
  getResponse()
  setContentType()
  usePersistentConnection()
  parseCookie()
  getCookiesForRequest()

soap_server:: (16 methods):
  soap_server()
  service()
  parse_http_headers()
  parse_request()
  invoke_method()
  serialize_return()
  send_response()
  verify_method()
  parseRequest()
  getHTTPBody()
  getHTTPContentType()
  getHTTPContentTypeCharset()
  add_to_map()
  register()
  fault()
  configureWSDL()

wsdl:: (26 methods):
  wsdl()
  parseWSDL()
  start_element()
  end_element()
  character_data()
  getBindingData()
  getOperations()
  getOperationData()
  getOperationDataForSoapAction()
  getTypeDef()
  webDescription()
  lib_bwcheck()
  makeObj()
  b_writeIt()
  popup()
  popout()
  serialize()
  serializeRPCParameters()
  serializeParameters()
  serializeType()
  serializeComplexTypeAttributes()
  serializeComplexTypeElements()
  addComplexType()
  addSimpleType()
  addElement()
  addOperation()

soap_parser:: (8 methods):
  soap_parser()
  start_element()
  end_element()
  character_data()
  get_response()
  getHeaders()
  decodeSimple()
  buildVal()

soapclient:: (25 methods):
  soapclient()
  call()
  getOperationData()
  send()
  parseResponse()
  setEndpoint()
  setHeaders()
  getHeaders()
  setHTTPProxy()
  setCredentials()
  setHTTPEncoding()
  useHTTPPersistentConnection()
  getDefaultRpcParams()
  setDefaultRpcParams()
  getProxy()
  _getProxyClassCode()
  getProxyClassCode()
  getHTTPBody()
  getHTTPContentType()
  getHTTPContentTypeCharset()
  decodeUTF8()
  setCookie()
  getCookies()
  checkCookies()
  UpdateCookies()


Class: nusoap_base  - X-Ref

nusoap_base

nusoap_base()   X-Ref
constructor


getGlobalDebugLevel()   X-Ref
gets the global debug level, which applies to future instances

return: integer    Debug level 0-9, where 0 turns off

setGlobalDebugLevel($level)   X-Ref
sets the global debug level, which applies to future instances

param: int    $level    Debug level 0-9, where 0 turns off

getDebugLevel()   X-Ref
gets the debug level for this instance

return: int    Debug level 0-9, where 0 turns off

setDebugLevel($level)   X-Ref
sets the debug level for this instance

param: int    $level    Debug level 0-9, where 0 turns off

debug($string)   X-Ref
adds debug data to the instance debug string with formatting

param: string $string debug data

appendDebug($string)   X-Ref
adds debug data to the instance debug string without formatting

param: string $string debug data

clearDebug()   X-Ref
clears the current debug data for this instance


getDebug()   X-Ref
gets the current debug data for this instance

return: debug data

getDebugAsXMLComment()   X-Ref
gets the current debug data for this instance as an XML comment
this may change the contents of the debug data

return: debug data as an XML comment

expandEntities($val)   X-Ref
expands entities, e.g. changes '<' to '&lt;'.

param: string    $val    The string in which to expand entities.

getError()   X-Ref
returns error string if present

return: mixed error string or false

setError($str)   X-Ref
sets error string

return: boolean $string error string

isArraySimpleOrStruct($val)   X-Ref
detect if array is a simple array or a struct (associative array)

param: mixed    $val    The PHP array
return: string    (arraySimple|arrayStruct)

serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded')   X-Ref
serializes PHP values in accordance w/ section 5. Type information is
not serialized if $use == 'literal'.

param: mixed    $val    The value to serialize
param: string    $name    The name (local part) of the XML element
param: string    $type    The XML schema type (local part) for the element
param: string    $name_ns    The namespace for the name of the XML element
param: string    $type_ns    The namespace for the type of the element
param: array    $attributes    The attributes to serialize as name=>value pairs
param: string    $use    The WSDL "use" (encoded|literal)
return: string    The serialized element, possibly with child elements

serializeEnvelope($body,$headers=false,$namespaces=array()   X-Ref
serializes a message

param: string $body the XML of the SOAP body
param: mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers
param: array $namespaces optional the namespaces used in generating the body and headers
param: string $style optional (rpc|document)
param: string $use optional (encoded|literal)
param: string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
return: string the message

formatDump($str)   X-Ref
formats a string to be inserted into an HTML stream

param: string $str The string to format
return: string The formatted string

contractQname($qname)   X-Ref
contracts (changes namespace to prefix) a qualified name

param: string $qname qname
return: string contracted qname

expandQname($qname)   X-Ref
expands (changes prefix to namespace) a qualified name

param: string $string qname
return: string expanded qname

getLocalPart($str)   X-Ref
returns the local part of a prefixed string
returns the original string, if not prefixed

param: string $str The prefixed string
return: string The local part

getPrefix($str)   X-Ref
returns the prefix part of a prefixed string
returns false, if not prefixed

param: string $str The prefixed string
return: mixed The prefix or false if there is no prefix

getNamespaceFromPrefix($prefix)   X-Ref
pass it a prefix, it returns a namespace

param: string $prefix The prefix
return: mixed The namespace, false if no namespace has the specified prefix

getPrefixFromNamespace($ns)   X-Ref
returns the prefix for a given namespace (or prefix)
or false if no prefixes registered for the given namespace

param: string $ns The namespace
return: mixed The prefix, false if the namespace has no prefixes

getmicrotime()   X-Ref
returns the time in ODBC canonical form with microseconds

return: string The time in ODBC canonical form with microseconds

varDump($data)   X-Ref
Returns a string with the output of var_dump

param: mixed $data The variable to var_dump
return: string The output of var_dump

timestamp_to_iso8601($timestamp,$utc=true)   X-Ref
convert unix timestamp to ISO 8601 compliant date string

param: string $timestamp Unix time stamp

iso8601_to_timestamp($datestr)   X-Ref
convert ISO 8601 compliant date string to unix timestamp

param: string $datestr ISO 8601 compliant date string

usleepWindows($usec)   X-Ref
sleeps some number of microseconds

param: string $usec the number of microseconds to sleep

Class: soap_fault  - X-Ref

Contains information for a SOAP fault.
Mainly used for returning faults from deployed functions
in a server instance.

soap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail='')   X-Ref
constructor

param: string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server)
param: string $faultactor only used when msg routed between multiple actors
param: string $faultstring human readable error message
param: mixed $faultdetail detail, typically a string or array of string

serialize()   X-Ref
serialize a fault

return: string    The serialization of the fault instance.

Class: XMLSchema  - X-Ref

parses an XML Schema, allows access to it's data, other utility methods
no validation... yet.
very experimental and limited. As is discussed on XML-DEV, I'm one of the people
that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty
tutorials I refer to :)

XMLSchema($schema='',$xml='',$namespaces=array()   X-Ref
constructor

param: string $schema schema document URI
param: string $xml xml document URI
param: string $namespaces namespaces defined in enclosing XML

parseFile($xml,$type)   X-Ref
parse an XML file

param: string $xml, path/URL to XML file
param: string $type, (schema | xml)
return: boolean

parseString($xml,$type)   X-Ref
parse an XML string

param: string $xml path or URL
param: string $type, (schema|xml)

schemaStartElement($parser, $name, $attrs)   X-Ref
start-element handler

param: string $parser XML parser object
param: string $name element name
param: string $attrs associative array of attributes

schemaEndElement($parser, $name)   X-Ref
end-element handler

param: string $parser XML parser object
param: string $name element name

schemaCharacterData($parser, $data)   X-Ref
element content handler

param: string $parser XML parser object
param: string $data element content

serializeSchema()   X-Ref
serialize the schema


xdebug($string)   X-Ref
adds debug data to the clas level debug string

param: string $string debug data

getPHPType($type,$ns)   X-Ref
get the PHP type of a user defined type in the schema
PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays
returns false if no type exists, or not w/ the given namespace
else returns a string that is either a native php type, or 'struct'

param: string $type, name of defined type
param: string $ns, namespace of type
return: mixed

getTypeDef($type)   X-Ref
returns an associative array of information about a given type
returns false if no type exists by the given name

For a complexType typeDef = array(
'restrictionBase' => '',
'phpType' => '',
'compositor' => '(sequence|all)',
'elements' => array(), // refs to elements array
'attrs' => array() // refs to attributes array
... and so on (see addComplexType)
)

For simpleType or element, the array has different keys.

param: string
return: mixed

serializeTypeDef($type)   X-Ref
returns a sample serialization of a given type, or false if no type by the given name

param: string $type, name of type
return: mixed

typeToForm($name,$type)   X-Ref
returns HTML form elements that allow a user
to enter values for creating an instance of the given type.

param: string $name, name for type instance
param: string $type, name of type
return: string

addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array()   X-Ref
adds a complex type to the schema

example: array

addType(
'ArrayOfstring',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'),
'xsd:string'
);

example: PHP associative array ( SOAP Struct )

addType(
'SOAPStruct',
'complexType',
'struct',
'all',
array('myVar'=> array('name'=>'myVar','type'=>'string')
);

param: name
param: typeClass (complexType|simpleType|attribute)
param: phpType: currently supported are array and struct (php assoc array)
param: compositor (all|sequence|choice)
param: restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
param: elements = array ( name = array(name=>'',type=>'') )
param: attrs = array(
param: arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string)

addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()   X-Ref
adds a simple type to the schema

param: string $name
param: string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
param: string $typeClass (should always be simpleType)
param: string $phpType (should always be scalar)
param: array $enumeration array of values

addElement($attrs)   X-Ref
adds an element to the schema

param: array $attrs attributes that must include name and type

Class: soapval  - X-Ref

For creating serializable abstractions of native PHP types.  This class
allows element name/namespace, XSD type, and XML attributes to be
associated with a value.  This is extremely useful when WSDL is not
used, but is also useful when WSDL is used with polymorphic types, including
xsd:anyType and user-defined types.

soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false)   X-Ref
constructor

param: string $name optional name
param: mixed $type optional type name
param: mixed $value optional value
param: mixed $element_ns optional namespace of value
param: mixed $type_ns optional namespace of type
param: mixed $attributes associative array of attributes to add to element serialization

serialize($use='encoded')   X-Ref
return serialized value

param: string $use The WSDL use value (encoded|literal)
return: string XML data

decode()   X-Ref
decodes a soapval object into a PHP native type

return: mixed

Class: soap_transport_http  - X-Ref

transport class for sending/receiving data via HTTP and HTTPS
NOTE: PHP must be compiled with the CURL extension for HTTPS support

soap_transport_http($url)   X-Ref
constructor


setURL($url)   X-Ref
No description

connect($connection_timeout=0,$response_timeout=30)   X-Ref
No description

send($data, $timeout=0, $response_timeout=30, $cookies=NULL)   X-Ref
send the SOAP message via HTTP

param: string $data message data
param: integer $timeout set connection timeout in seconds
param: integer $response_timeout set response timeout in seconds
param: array $cookies cookies to send
return: string data

sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies)   X-Ref
send the SOAP message via HTTPS 1.0 using CURL

param: string $msg message data
param: integer $timeout set connection timeout in seconds
param: integer $response_timeout set response timeout in seconds
param: array $cookies cookies to send
return: string data

setCredentials($username, $password, $authtype = 'basic', $digestRequest = array()   X-Ref
if authenticating, set user credentials here

param: string $username
param: string $password
param: string $authtype (basic, digest, certificate)
param: array $digestRequest (keys must be nonce, nc, realm, qop)
param: array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)

setSOAPAction($soapaction)   X-Ref
set the soapaction value

param: string $soapaction

setEncoding($enc='gzip, deflate')   X-Ref
use http encoding

param: string $enc encoding style. supported values: gzip, deflate, or both

setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '')   X-Ref
set proxy info here

param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword

decodeChunked($buffer, $lb)   X-Ref
decode a string that is encoded w/ "chunked' transfer encoding
as defined in RFC2068 19.4.6

returns: string
param: string $buffer
param: string $lb

buildPayload($data, $cookie_str = '')   X-Ref
No description

sendRequest($data, $cookies = NULL)   X-Ref
No description

getResponse()   X-Ref
No description

setContentType($type, $charset = false)   X-Ref
No description

usePersistentConnection()   X-Ref
No description

parseCookie($cookie_str)   X-Ref
No description

getCookiesForRequest($cookies, $secure=false)   X-Ref
sort out cookies for the current request

param: array $cookies array with all cookies
param: boolean $secure is the send-content secure or not?
return: string for Cookie-HTTP-Header

Class: soap_server  - X-Ref

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

NOTE: WSDL functionality is experimental

soap_server($wsdl=false)   X-Ref
constructor
the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.

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

service($data)   X-Ref
processes request and returns response

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

parse_http_headers()   X-Ref
parses HTTP request headers.

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

headers
request
xml_encoding
SOAPAction


parse_request($data='')   X-Ref
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

param: string $data XML string

invoke_method()   X-Ref
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


serialize_return()   X-Ref
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


send_response()   X-Ref
sends an HTTP response

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

outgoing_headers
response


verify_method($operation,$request)   X-Ref
takes the value that was created by parsing the request
and compares to the method's signature, if available.

param: string    $operation    The operation to be invoked
param: array    $request    The array of parameter values
return: boolean    Whether the operation was found

parseRequest($headers, $data)   X-Ref
processes SOAP message received from client

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

getHTTPBody($soapmsg)   X-Ref
gets the HTTP body for the current response.

param: string $soapmsg The SOAP payload
return: string The HTTP body, which includes the SOAP payload

getHTTPContentType()   X-Ref
gets the HTTP content type for the current response.

Note: getHTTPBody must be called before this.

return: string the HTTP content type for the current response.

getHTTPContentTypeCharset()   X-Ref
gets the HTTP content type charset for the current response.
returns false for non-text content types.

Note: getHTTPBody must be called before this.

return: string the HTTP content type charset for the current response.

add_to_map($methodname,$in,$out)   X-Ref
add a method to the dispatch map (this has been replaced by the register method)

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

register($name,$in=array()   X-Ref
register a service function with the server

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

fault($faultcode,$faultstring,$faultactor='',$faultdetail='')   X-Ref
Specify a fault to be returned to the client.
This also acts as a flag to the server that a fault has occured.

param: string $faultcode
param: string $faultstring
param: string $faultactor
param: string $faultdetail

configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http:)   X-Ref
Sets up wsdl object.
Acts as a flag to enable internal WSDL generation

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

Class: wsdl  - X-Ref

parses a WSDL file, allows access to it's data, other utility methods

wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30)   X-Ref
constructor

param: string $wsdl WSDL document URL
param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword
param: integer $timeout set the connection timeout
param: integer $response_timeout set the response timeout

parseWSDL($wsdl = '')   X-Ref
parses the wsdl document

param: string $wsdl path or URL

start_element($parser, $name, $attrs)   X-Ref
start-element handler

param: string $parser XML parser object
param: string $name element name
param: string $attrs associative array of attributes

end_element($parser, $name)   X-Ref
end-element handler

param: string $parser XML parser object
param: string $name element name

character_data($parser, $data)   X-Ref
element content handler

param: string $parser XML parser object
param: string $data element content

getBindingData($binding)   X-Ref
No description

getOperations($bindingType = 'soap')   X-Ref
returns an assoc array of operation names => operation data

param: string $bindingType eg: soap, smtp, dime (only soap is currently supported)
return: array

getOperationData($operation, $bindingType = 'soap')   X-Ref
returns an associative array of data necessary for calling an operation

param: string $operation , name of operation
param: string $bindingType , type of binding eg: soap
return: array

getOperationDataForSoapAction($soapAction, $bindingType = 'soap')   X-Ref
returns an associative array of data necessary for calling an operation

param: string $soapAction soapAction for operation
param: string $bindingType type of binding eg: soap
return: array

getTypeDef($type, $ns)   X-Ref
returns an array of information about a given type
returns false if no type exists by the given name

typeDef = array(
'elements' => array(), // refs to elements array
'restrictionBase' => '',
'phpType' => '',
'order' => '(sequence|all)',
'attrs' => array() // refs to attributes array
)

param: $type string the type
param: $ns string namespace (not prefix) of the type
return: mixed

webDescription()   X-Ref
prints html description of services


lib_bwcheck()   X-Ref
No description

makeObj(obj)   X-Ref
No description

b_writeIt(text)   X-Ref
No description

popup(divid)   X-Ref
No description

popout()   X-Ref
No description

serialize($debug = 0)   X-Ref
serialize the parsed wsdl

param: mixed $debug whether to put debug=1 in endpoint URL
return: string serialization of WSDL

serializeRPCParameters($operation, $direction, $parameters)   X-Ref
serialize PHP values according to a WSDL message definition

TODO
- multi-ref serialization
- validate PHP values against type definitions, return errors if invalid

param: string $operation operation name
param: string $direction (input|output)
param: mixed $parameters parameter value(s)
return: mixed parameters serialized as XML or false on error (e.g. operation not found)

serializeParameters($operation, $direction, $parameters)   X-Ref
serialize a PHP value according to a WSDL message definition

TODO
- multi-ref serialization
- validate PHP values against type definitions, return errors if invalid

param: string $ type name
param: mixed $ param value
return: mixed new param or false if initial value didn't validate

serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)   X-Ref
serializes a PHP value according a given type definition

param: string $name name of value (part or element)
param: string $type XML schema type of value (type or element)
param: mixed $value a native PHP value (parameter value)
param: string $use use for part (encoded|literal)
param: string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
param: boolean $unqualified a kludge for what should be XML namespace form handling
return: string value serialized as an XML string

serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType)   X-Ref
serializes the attributes for a complexType

param: array $typeDef our internal representation of an XML schema type (or element)
param: mixed $value a native PHP value (parameter value)
param: string $ns the namespace of the type
param: string $uqType the local part of the type
return: string value serialized as an XML string

serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false)   X-Ref
serializes the elements for a complexType

param: array $typeDef our internal representation of an XML schema type (or element)
param: mixed $value a native PHP value (parameter value)
param: string $ns the namespace of the type
param: string $uqType the local part of the type
param: string $use use for part (encoded|literal)
param: string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
return: string value serialized as an XML string

addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array()   X-Ref
adds an XML Schema complex type to the WSDL types

param: string    name
param: string typeClass (complexType|simpleType|attribute)
param: string phpType: currently supported are array and struct (php assoc array)
param: string compositor (all|sequence|choice)
param: string restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
param: array elements = array ( name => array(name=>'',type=>'') )
param: array attrs =     array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
param: string arrayType: namespace:name (xsd:string)

addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()   X-Ref
adds an XML Schema simple type to the WSDL types

param: string $name
param: string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
param: string $typeClass (should always be simpleType)
param: string $phpType (should always be scalar)
param: array $enumeration array of values

addElement($attrs)   X-Ref
adds an element to the WSDL types

param: array $attrs attributes that must include name and type

addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = '')   X-Ref
register an operation with the server

param: string $name operation (method) name
param: array $in assoc array of input values: key = param name, value = param type
param: array $out assoc array of output values: key = param name, value = param type
param: string $namespace optional The namespace for the operation
param: string $soapaction optional The soapaction for the operation
param: string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically
param: string $use (encoded|literal) optional The use for the parameters (cannot mix right now)
param: string $documentation optional The description to include in the WSDL
param: string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)

Class: soap_parser  - X-Ref

soap_parser class parses SOAP XML messages into native PHP values

soap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true)   X-Ref
constructor that actually does the parsing

param: string $xml SOAP message
param: string $encoding character encoding scheme of message
param: string $method method for which XML is parsed (unused?)
param: string $decode_utf8 whether to decode UTF-8 to ISO-8859-1

start_element($parser, $name, $attrs)   X-Ref
start-element handler

param: resource $parser XML parser object
param: string $name element name
param: array $attrs associative array of attributes

end_element($parser, $name)   X-Ref
end-element handler

param: resource $parser XML parser object
param: string $name element name

character_data($parser, $data)   X-Ref
element content handler

param: resource $parser XML parser object
param: string $data element content

get_response()   X-Ref
get the parsed message

return: mixed

getHeaders()   X-Ref
get the parsed headers

return: string XML or empty if no headers

decodeSimple($value, $type, $typens)   X-Ref
decodes simple types into PHP variables

param: string $value value to decode
param: string $type XML type to decode
param: string $typens XML type namespace to decode
return: mixed PHP value

buildVal($pos)   X-Ref
builds response structures for compound values (arrays/structs)
and scalars

param: integer $pos position in node tree
return: mixed    PHP value

Class: soapclient  - X-Ref

soapclient higher level class for easy usage.

usage:

// instantiate client with server info
$soapclient = new soapclient( string path [ ,boolean wsdl] );

// call method, get results
echo $soapclient->call( string methodname [ ,array parameters] );

// bye bye client
unset($soapclient);

soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30)   X-Ref
constructor

param: mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object)
param: bool $wsdl optional, set to true if using WSDL
param: int $portName optional portName in WSDL document
param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword
param: integer $timeout set the connection timeout
param: integer $response_timeout set the response timeout

call($operation,$params=array()   X-Ref
calls method, returns PHP native type

param: string $method SOAP server URL or path
param: mixed $params An array, associative or simple, of the parameters
param: string $namespace optional method namespace (WSDL can override)
param: string $soapAction optional SOAPAction value (WSDL can override)
param: mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers
param: boolean $rpcParams optional (no longer used)
param: string    $style optional (rpc|document) the style to use when serializing parameters (WSDL can override)
param: string    $use optional (encoded|literal) the use when serializing parameters (WSDL can override)
return: mixed    response from SOAP call

getOperationData($operation)   X-Ref
get available data pertaining to an operation

param: string $operation operation name
return: array array of data pertaining to the operation

send($msg, $soapaction = '', $timeout=0, $response_timeout=30)   X-Ref
send the SOAP message

Note: if the operation has multiple return values
the return value of this method will be an array
of those values.

param: string $msg a SOAPx4 soapmsg object
param: string $soapaction SOAPAction value
param: integer $timeout set connection timeout in seconds
param: integer $response_timeout set response timeout in seconds
return: mixed native PHP types.

parseResponse($headers, $data)   X-Ref
processes SOAP message returned from server

param: array    $headers    The HTTP headers
param: string    $data        unprocessed response data from server
return: mixed    value of the message, decoded into a PHP type

setEndpoint($endpoint)   X-Ref
sets the SOAP endpoint, which can override WSDL

param: $endpoint string The endpoint URL to use, or empty string or false to prevent override

setHeaders($headers)   X-Ref
set the SOAP headers

param: $headers mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers

getHeaders()   X-Ref
get the SOAP response headers (namespace resolution incomplete)

return: string

setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '')   X-Ref
set proxy info here

param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword

setCredentials($username, $password, $authtype = 'basic', $certRequest = array()   X-Ref
if authenticating, set user credentials here

param: string $username
param: string $password
param: string $authtype (basic|digest|certificate)
param: array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)

setHTTPEncoding($enc='gzip, deflate')   X-Ref
use HTTP encoding

param: string $enc

useHTTPPersistentConnection()   X-Ref
use HTTP persistent connections if possible


getDefaultRpcParams()   X-Ref
gets the default RPC parameter setting.
If true, default is that call params are like RPC even for document style.
Each call() can override this value.

This is no longer used.

return: boolean

setDefaultRpcParams($rpcParams)   X-Ref
sets the default RPC parameter setting.
If true, default is that call params are like RPC even for document style
Each call() can override this value.

This is no longer used.

param: boolean $rpcParams

getProxy()   X-Ref
dynamically creates an instance of a proxy class,
allowing user to directly call methods from wsdl

return: object soap_proxy object

_getProxyClassCode($r)   X-Ref
dynamically creates proxy class code

return: string PHP/NuSOAP code for the proxy class

getProxyClassCode()   X-Ref
No description

getHTTPBody($soapmsg)   X-Ref
gets the HTTP body for the current request.

param: string $soapmsg The SOAP payload
return: string The HTTP body, which includes the SOAP payload

getHTTPContentType()   X-Ref
gets the HTTP content type for the current request.

Note: getHTTPBody must be called before this.

return: string the HTTP content type for the current request.

getHTTPContentTypeCharset()   X-Ref
gets the HTTP content type charset for the current request.
returns false for non-text content types.

Note: getHTTPBody must be called before this.

return: string the HTTP content type charset for the current request.

decodeUTF8($bool)   X-Ref
No description

setCookie($name, $value)   X-Ref
adds a new Cookie into $this->cookies array

param: string $name Cookie Name
param: string $value Cookie Value
return: if cookie-set was successful returns true, else false

getCookies()   X-Ref
gets all Cookies

return: array with all internal cookies

checkCookies()   X-Ref
checks all Cookies and delete those which are expired

return: always return true

UpdateCookies($cookies)   X-Ref
updates the current cookies with a new set

param: array $cookies new cookies with which to update current ones
return: always return true



[ Powered by PHPXref - Served by Debian GNU/Linux ]