Documentation

wsdl extends nusoap_base
in package

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

also builds WSDL structures programmatically.

Tags
author

Dietrich Ayala dietrich@ganx4.com

author

Scott Nichol snichol@users.sourceforge.net

access

public

Table of Contents

$authtype  : mixed
$bindings  : mixed
$certRequest  : mixed
$charencoding  : bool
toggles automatic encoding of special characters as entities (should always be true, I think)
$complexTypes  : mixed
$curl_options  : mixed
$currentBinding  : mixed
$currentMessage  : mixed
$currentOperation  : mixed
$currentPort  : mixed
$currentPortType  : mixed
$currentSchema  : mixed
$debug_str  : string
Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)
$debugLevel  : int
the debug level for this instance
$depth  : mixed
$depth_array  : mixed
$documentation  : mixed
$endpoint  : mixed
$error_str  : string
Current error string (manipulated by getError/setError)
$import  : mixed
$message  : mixed
$messages  : mixed
$namespaces  : array<string|int, mixed>
namespaces in an array of prefix => uri
$opData  : mixed
$parser  : mixed
$password  : mixed
$ports  : mixed
$portTypes  : mixed
$position  : mixed
$proxyhost  : mixed
$proxypassword  : mixed
$proxyport  : mixed
$proxyusername  : mixed
$response_timeout  : mixed
$revision  : string
CVS revision for HTTP headers.
$schemas  : mixed
$soap_defencoding  : string
charset encoding for outgoing messages
$status  : mixed
$timeout  : mixed
$title  : string
Identification for HTTP headers.
$typemap  : array<string|int, mixed>
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.
$use_curl  : mixed
$usedNamespaces  : array<string|int, mixed>
namespaces used in the current context, e.g. during serialization
$username  : mixed
$version  : string
Version for HTTP headers.
$wsdl  : mixed
$xmlEntities  : array<string|int, mixed>
XML entities to convert
$XMLSchemaVersion  : string
set schema version
__construct()  : mixed
constructor
__toString()  : string
represents the object as a string
addComplexType()  : mixed
adds an XML Schema complex type to the WSDL types
addElement()  : mixed
adds an element to the WSDL types
addOperation()  : mixed
register an operation with the server
addSimpleType()  : mixed
adds an XML Schema simple type to the WSDL types
appendDebug()  : mixed
adds debug data to the instance debug string without formatting
character_data()  : mixed
element content handler
clearDebug()  : mixed
clears the current debug data for this instance
contractQname()  : string
contracts (changes namespace to prefix) a qualified name
debug()  : mixed
adds debug data to the instance debug string with formatting
end_element()  : mixed
end-element handler
expandEntities()  : mixed
expands entities, e.g. changes '<' to '&lt;'.
expandQname()  : string
expands (changes prefix to namespace) a qualified name
fetchWSDL()  : mixed
fetches the WSDL document and parses it
formatDump()  : string
formats a string to be inserted into an HTML stream
getBindingData()  : mixed
getDebug()  : debug
gets the current debug data for this instance
getDebugAsXMLComment()  : debug
gets the current debug data for this instance as an XML comment this may change the contents of the debug data
getDebugLevel()  : int
gets the debug level for this instance
getError()  : mixed
returns error string if present
getGlobalDebugLevel()  : int
gets the global debug level, which applies to future instances
getLocalPart()  : string
returns the local part of a prefixed string returns the original string, if not prefixed
getmicrotime()  : string
returns the time in ODBC canonical form with microseconds
getNamespaceFromPrefix()  : mixed
pass it a prefix, it returns a namespace
getOperationData()  : array<string|int, mixed>
returns an associative array of data necessary for calling an operation
getOperationDataForSoapAction()  : array<string|int, mixed>
returns an associative array of data necessary for calling an operation
getOperations()  : array<string|int, mixed>
returns an assoc array of operation names => operation data
getPrefix()  : mixed
returns the prefix part of a prefixed string returns false, if not prefixed
getPrefixFromNamespace()  : mixed
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace
getTypeDef()  : mixed
returns an array of information about a given type returns false if no type exists by the given name
isArraySimpleOrStruct()  : string
detect if array is a simple array or a struct (associative array)
parametersMatchWrapped()  : bool
determine whether a set of parameters are unwrapped when they are expect to be wrapped, Microsoft-style.
parseWSDL()  : mixed
parses the wsdl document
serialize()  : string
serialize the parsed wsdl
serialize_val()  : string
serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.
serializeComplexTypeAttributes()  : string
serializes the attributes for a complexType
serializeComplexTypeElements()  : string
serializes the elements for a complexType
serializeEnvelope()  : string
serializes a message
serializeParameters()  : mixed
serialize a PHP value according to a WSDL message definition
serializeRPCParameters()  : mixed
serialize PHP values according to a WSDL message definition contrary to the method name, this is not limited to RPC
serializeType()  : string
serializes a PHP value according a given type definition
setCredentials()  : mixed
if authenticating, set user credentials here
setDebugLevel()  : mixed
sets the debug level for this instance
setError()  : bool
sets error string
setGlobalDebugLevel()  : mixed
sets the global debug level, which applies to future instances
start_element()  : mixed
start-element handler
varDump()  : string
Returns a string with the output of var_dump
webDescription()  : mixed
prints html description of services

Properties

$authtype

public mixed $authtype = ''

$bindings

public mixed $bindings = array()

$certRequest

public mixed $certRequest = array()

$charencoding

toggles automatic encoding of special characters as entities (should always be true, I think)

public bool $charencoding = rue
Tags
access

private

$complexTypes

public mixed $complexTypes = array()

$curl_options

public mixed $curl_options = array()

$currentBinding

public mixed $currentBinding

$currentMessage

public mixed $currentMessage

$currentOperation

public mixed $currentOperation

$currentPort

public mixed $currentPort

$currentPortType

public mixed $currentPortType

$currentSchema

public mixed $currentSchema

$debug_str

Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)

public string $debug_str = ''
Tags
access

private

$debugLevel

the debug level for this instance

public int $debugLevel
Tags
access

private

$depth

public mixed $depth = 0

$depth_array

public mixed $depth_array = array()

$documentation

public mixed $documentation = alse

$endpoint

public mixed $endpoint = ''

$error_str

Current error string (manipulated by getError/setError)

public string $error_str = ''
Tags
access

private

$import

public mixed $import = array()

$message

public mixed $message = array()

$messages

public mixed $messages = array()

$namespaces

namespaces in an array of prefix => uri

public array<string|int, mixed> $namespaces = array('SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xsd' => 'http://www.w3.org/2001/XMLSchema', 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/')

this is "seeded" by a set of constants, but it may be altered by code

Tags
access

public

$opData

public mixed $opData = array()

$password

public mixed $password = ''

$ports

public mixed $ports = array()

$portTypes

public mixed $portTypes = array()

$position

public mixed $position = 0

$proxyhost

public mixed $proxyhost = ''

$proxypassword

public mixed $proxypassword = ''

$proxyport

public mixed $proxyport = ''

$proxyusername

public mixed $proxyusername = ''

$response_timeout

public mixed $response_timeout = 30

$revision

CVS revision for HTTP headers.

public string $revision = '$Revision: 1.123 $'
Tags
access

private

$schemas

public mixed $schemas = array()

$soap_defencoding

charset encoding for outgoing messages

public string $soap_defencoding = 'ISO-8859-1'
Tags
access

public

$status

public mixed $status = ''

$timeout

public mixed $timeout = 0

$title

Identification for HTTP headers.

public string $title = 'NuSOAP'
Tags
access

private

$typemap

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.

public array<string|int, mixed> $typemap = array('http://www.w3.org/2001/XMLSchema' => array( 'string' => 'string', 'boolean' => 'boolean', 'float' => 'double', 'double' => 'double', 'decimal' => 'double', 'duration' => '', 'dateTime' => 'string', 'time' => 'string', 'date' => 'string', 'gYearMonth' => '', 'gYear' => '', 'gMonthDay' => '', 'gDay' => '', 'gMonth' => '', 'hexBinary' => 'string', 'base64Binary' => 'string', // abstract "any" types 'anyType' => 'string', 'anySimpleType' => 'string', // derived datatypes 'normalizedString' => 'string', 'token' => 'string', 'language' => '', 'NMTOKEN' => '', 'NMTOKENS' => '', 'Name' => '', 'NCName' => '', 'ID' => '', 'IDREF' => '', 'IDREFS' => '', 'ENTITY' => '', 'ENTITIES' => '', 'integer' => 'integer', 'nonPositiveInteger' => 'integer', 'negativeInteger' => 'integer', 'long' => 'integer', 'int' => 'integer', 'short' => 'integer', 'byte' => 'integer', 'nonNegativeInteger' => 'integer', 'unsignedLong' => '', 'unsignedInt' => '', 'unsignedShort' => '', 'unsignedByte' => '', 'positiveInteger' => '', ), 'http://www.w3.org/2000/10/XMLSchema' => array('i4' => '', 'int' => 'integer', 'boolean' => 'boolean', 'string' => 'string', 'double' => 'double', 'float' => 'double', 'dateTime' => 'string', 'timeInstant' => 'string', 'base64Binary' => 'string', 'base64' => 'string', 'ur-type' => 'array'), 'http://www.w3.org/1999/XMLSchema' => array('i4' => '', 'int' => 'integer', 'boolean' => 'boolean', 'string' => 'string', 'double' => 'double', 'float' => 'double', 'dateTime' => 'string', 'timeInstant' => 'string', 'base64Binary' => 'string', 'base64' => 'string', 'ur-type' => 'array'), 'http://soapinterop.org/xsd' => array('SOAPStruct' => 'struct'), 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64' => 'string', 'array' => 'array', 'Array' => 'array'), 'http://xml.apache.org/xml-soap' => array('Map'))
Tags
access

public

$use_curl

public mixed $use_curl = alse

$usedNamespaces

namespaces used in the current context, e.g. during serialization

public array<string|int, mixed> $usedNamespaces = array()
Tags
access

private

$username

public mixed $username = ''

$version

Version for HTTP headers.

public string $version = '0.9.5'
Tags
access

private

$xmlEntities

XML entities to convert

public array<string|int, mixed> $xmlEntities = array('quot' => '"', 'amp' => '&', 'lt' => '<', 'gt' => '>', 'apos' => "'")
Tags
access

public

deprecated
see
expandEntities

$XMLSchemaVersion

set schema version

public string $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'
Tags
access

public

Methods

__construct()

constructor

public __construct([string $wsdl = '' ][, string $proxyhost = false ][, string $proxyport = false ][, string $proxyusername = false ][, string $proxypassword = false ], int $timeout[, int $response_timeout = 30 ][, array<string|int, mixed> $curl_options = null ][, bool $use_curl = false ]) : mixed
Parameters
$wsdl : string = ''

WSDL document URL

$proxyhost : string = false
$proxyport : string = false
$proxyusername : string = false
$proxypassword : string = false
$timeout : int

set the connection timeout

$response_timeout : int = 30

set the response timeout

$curl_options : array<string|int, mixed> = null

user-specified cURL options

$use_curl : bool = false

try to use cURL

Tags
access

public

Return values
mixed

__toString()

represents the object as a string

public __toString() : string
Tags
access

public

Return values
string

addComplexType()

adds an XML Schema complex type to the WSDL types

public addComplexType(string $name[, string $typeClass = 'complexType' ][, string $phpType = 'array' ][, string $compositor = '' ][, string $restrictionBase = '' ][, array<string|int, mixed> $elements = array() ][, array<string|int, mixed> $attrs = array() ][, string $arrayType = '' ]) : mixed
Parameters
$name : string
$typeClass : string = 'complexType'

(complexType|simpleType|attribute)

$phpType : string = 'array'

currently supported are array and struct (php assoc array)

$compositor : string = ''

(all|sequence|choice)

$restrictionBase : string = ''

namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)

$elements : array<string|int, mixed> = array()

e.g. array ( name => array(name=>'',type=>'') )

$attrs : array<string|int, mixed> = array()

e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))

$arrayType : string = ''

as namespace:name (xsd:string)

Tags
see
nusoap_xmlschema
access

public

Return values
mixed

addElement()

adds an element to the WSDL types

public addElement(array<string|int, mixed> $attrs) : mixed
Parameters
$attrs : array<string|int, mixed>

attributes that must include name and type

Tags
see
nusoap_xmlschema
access

public

Return values
mixed

addOperation()

register an operation with the server

public addOperation(string $name[, array<string|int, mixed> $in = false ][, array<string|int, mixed> $out = false ][, string $namespace = false ][, string $soapaction = false ][, string $style = 'rpc' ][, string $use = 'encoded' ][, string $documentation = '' ][, string $encodingStyle = '' ]) : mixed
Parameters
$name : string

operation (method) name

$in : array<string|int, mixed> = false

assoc array of input values: key = param name, value = param type

$out : array<string|int, mixed> = false

assoc array of output values: key = param name, value = param type

$namespace : string = false

optional The namespace for the operation

$soapaction : string = false

optional The soapaction for the operation

$style : string = 'rpc'

(rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically

$use : string = 'encoded'

(encoded|literal) optional The use for the parameters (cannot mix right now)

$documentation : string = ''

optional The description to include in the WSDL

$encodingStyle : string = ''

optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)

Tags
access

public

Return values
mixed

addSimpleType()

adds an XML Schema simple type to the WSDL types

public addSimpleType(string $name[, string $restrictionBase = '' ][, string $typeClass = 'simpleType' ][, string $phpType = 'scalar' ][, array<string|int, mixed> $enumeration = array() ]) : mixed
Parameters
$name : string
$restrictionBase : string = ''

namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)

$typeClass : string = 'simpleType'

(should always be simpleType)

$phpType : string = 'scalar'

(should always be scalar)

$enumeration : array<string|int, mixed> = array()

array of values

Tags
see
nusoap_xmlschema
access

public

Return values
mixed

appendDebug()

adds debug data to the instance debug string without formatting

public appendDebug(string $string) : mixed
Parameters
$string : string

debug data

Tags
access

public

Return values
mixed

character_data()

element content handler

public character_data(string $parser, string $data) : mixed
Parameters
$parser : string

XML parser object

$data : string

element content

Tags
access

private

Return values
mixed

clearDebug()

clears the current debug data for this instance

public clearDebug() : mixed
Tags
access

public

Return values
mixed

contractQname()

contracts (changes namespace to prefix) a qualified name

public contractQname(string $qname) : string
Parameters
$qname : string

qname

Tags
access

private

Return values
string

contracted qname

debug()

adds debug data to the instance debug string with formatting

public debug(string $string) : mixed
Parameters
$string : string

debug data

Tags
access

private

Return values
mixed

end_element()

end-element handler

public end_element(string $parser, string $name) : mixed
Parameters
$parser : string

XML parser object

$name : string

element name

Tags
access

private

Return values
mixed

expandEntities()

expands entities, e.g. changes '<' to '&lt;'.

public expandEntities(string $val) : mixed
Parameters
$val : string

The string in which to expand entities.

Tags
access

private

Return values
mixed

expandQname()

expands (changes prefix to namespace) a qualified name

public expandQname(string $qname) : string
Parameters
$qname : string

qname

Tags
access

private

Return values
string

expanded qname

fetchWSDL()

fetches the WSDL document and parses it

public fetchWSDL(mixed $wsdl) : mixed
Parameters
$wsdl : mixed
Tags
access

public

Return values
mixed

formatDump()

formats a string to be inserted into an HTML stream

public formatDump(string $str) : string
Parameters
$str : string

The string to format

Tags
access

public

deprecated
Return values
string

The formatted string

getBindingData()

public getBindingData( $binding) : mixed
Parameters
$binding :
Return values
mixed

getDebug()

gets the current debug data for this instance

public getDebug() : debug
Tags
access

public

Return values
debug

data

getDebugAsXMLComment()

gets the current debug data for this instance as an XML comment this may change the contents of the debug data

public getDebugAsXMLComment() : debug
Tags
access

public

Return values
debug

data as an XML comment

getDebugLevel()

gets the debug level for this instance

public getDebugLevel() : int
Tags
access

public

Return values
int

Debug level 0-9, where 0 turns off

getError()

returns error string if present

public getError() : mixed
Tags
access

public

Return values
mixed

error string or false

getGlobalDebugLevel()

gets the global debug level, which applies to future instances

public getGlobalDebugLevel() : int
Tags
access

public

Return values
int

Debug level 0-9, where 0 turns off

getLocalPart()

returns the local part of a prefixed string returns the original string, if not prefixed

public getLocalPart(string $str) : string
Parameters
$str : string

The prefixed string

Tags
access

public

Return values
string

The local part

getmicrotime()

returns the time in ODBC canonical form with microseconds

public getmicrotime() : string
Tags
access

public

Return values
string

The time in ODBC canonical form with microseconds

getNamespaceFromPrefix()

pass it a prefix, it returns a namespace

public getNamespaceFromPrefix(string $prefix) : mixed
Parameters
$prefix : string

The prefix

Tags
access

public

Return values
mixed

The namespace, false if no namespace has the specified prefix

getOperationData()

returns an associative array of data necessary for calling an operation

public getOperationData(string $operation[, string $bindingType = 'soap' ]) : array<string|int, mixed>
Parameters
$operation : string

name of operation

$bindingType : string = 'soap'

type of binding eg: soap, soap12

Tags
access

public

Return values
array<string|int, mixed>

getOperationDataForSoapAction()

returns an associative array of data necessary for calling an operation

public getOperationDataForSoapAction(string $soapAction[, string $bindingType = 'soap' ]) : array<string|int, mixed>
Parameters
$soapAction : string

soapAction for operation

$bindingType : string = 'soap'

type of binding eg: soap, soap12

Tags
access

public

Return values
array<string|int, mixed>

getOperations()

returns an assoc array of operation names => operation data

public getOperations([string $portName = '' ][, string $bindingType = 'soap' ]) : array<string|int, mixed>
Parameters
$portName : string = ''

WSDL port name

$bindingType : string = 'soap'

eg: soap, smtp, dime (only soap and soap12 are currently supported)

Tags
access

public

Return values
array<string|int, mixed>

getPrefix()

returns the prefix part of a prefixed string returns false, if not prefixed

public getPrefix(string $str) : mixed
Parameters
$str : string

The prefixed string

Tags
access

public

Return values
mixed

The prefix or false if there is no prefix

getPrefixFromNamespace()

returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace

public getPrefixFromNamespace(string $ns) : mixed
Parameters
$ns : string

The namespace

Tags
access

public

Return values
mixed

The prefix, false if the namespace has no prefixes

getTypeDef()

returns an array of information about a given type returns false if no type exists by the given name

public getTypeDef(string $type, string $ns) : mixed

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

Parameters
$type : string

the type

$ns : string

namespace (not prefix) of the type

Tags
access

public

see
nusoap_xmlschema
Return values
mixed

isArraySimpleOrStruct()

detect if array is a simple array or a struct (associative array)

public isArraySimpleOrStruct(mixed $val) : string
Parameters
$val : mixed

The PHP array

Tags
access

private

Return values
string

(arraySimple|arrayStruct)

parametersMatchWrapped()

determine whether a set of parameters are unwrapped when they are expect to be wrapped, Microsoft-style.

public parametersMatchWrapped(string $type, array<string|int, mixed> &$parameters) : bool
Parameters
$type : string

the type (element name) of the wrapper

$parameters : array<string|int, mixed>

the parameter values for the SOAP call

Tags
access

private

Return values
bool

whether they parameters are unwrapped (and should be wrapped)

parseWSDL()

parses the wsdl document

public parseWSDL([string $wsdl = '' ]) : mixed
Parameters
$wsdl : string = ''

path or URL

Tags
access

private

Return values
mixed

serialize()

serialize the parsed wsdl

public serialize(mixed $debug) : string
Parameters
$debug : mixed

whether to put debug=1 in endpoint URL

Tags
access

public

Return values
string

serialization of WSDL

serialize_val()

serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.

public serialize_val(mixed $val[, string $name = false ][, string $type = false ][, string $name_ns = false ][, string $type_ns = false ][, array<string|int, mixed> $attributes = false ][, string $use = 'encoded' ][, bool $soapval = false ]) : string
Parameters
$val : mixed

The value to serialize

$name : string = false

The name (local part) of the XML element

$type : string = false

The XML schema type (local part) for the element

$name_ns : string = false

The namespace for the name of the XML element

$type_ns : string = false

The namespace for the type of the element

$attributes : array<string|int, mixed> = false

The attributes to serialize as name=>value pairs

$use : string = 'encoded'

The WSDL "use" (encoded|literal)

$soapval : bool = false

Whether this is called from soapval.

Tags
access

public

Return values
string

The serialized element, possibly with child elements

serializeComplexTypeAttributes()

serializes the attributes for a complexType

public serializeComplexTypeAttributes(array<string|int, mixed> $typeDef, mixed $value, string $ns, string $uqType) : string
Parameters
$typeDef : array<string|int, mixed>

our internal representation of an XML schema type (or element)

$value : mixed

a native PHP value (parameter value)

$ns : string

the namespace of the type

$uqType : string

the local part of the type

Tags
access

private

Return values
string

value serialized as an XML string

serializeComplexTypeElements()

serializes the elements for a complexType

public serializeComplexTypeElements(array<string|int, mixed> $typeDef, mixed $value, string $ns, string $uqType[, string $use = 'encoded' ][, string $encodingStyle = false ]) : string
Parameters
$typeDef : array<string|int, mixed>

our internal representation of an XML schema type (or element)

$value : mixed

a native PHP value (parameter value)

$ns : string

the namespace of the type

$uqType : string

the local part of the type

$use : string = 'encoded'

use for part (encoded|literal)

$encodingStyle : string = false

SOAP encoding style for the value (if different than the enclosing style)

Tags
access

private

Return values
string

value serialized as an XML string

serializeEnvelope()

serializes a message

public serializeEnvelope(string $body[, mixed $headers = false ][, array<string|int, mixed> $namespaces = array() ][, string $style = 'rpc' ][, string $use = 'encoded' ][, string $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/' ]) : string
Parameters
$body : string

the XML of the SOAP body

$headers : mixed = false

optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array

$namespaces : array<string|int, mixed> = array()

optional the namespaces used in generating the body and headers

$style : string = 'rpc'

optional (rpc|document)

$use : string = 'encoded'

optional (encoded|literal)

$encodingStyle : string = 'http://schemas.xmlsoap.org/soap/encoding/'

optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)

Tags
access

public

Return values
string

the message

serializeParameters()

serialize a PHP value according to a WSDL message definition

public serializeParameters(string $operation, string $direction, mixed $parameters) : mixed

TODO

  • multi-ref serialization
  • validate PHP values against type definitions, return errors if invalid
Parameters
$operation : string

operation name

$direction : string

(input|output)

$parameters : mixed

parameter value(s)

Tags
access

public

deprecated
Return values
mixed

parameters serialized as XML or false on error (e.g. operation not found)

serializeRPCParameters()

serialize PHP values according to a WSDL message definition contrary to the method name, this is not limited to RPC

public serializeRPCParameters(string $operation, string $direction, mixed $parameters[, string $bindingType = 'soap' ]) : mixed

TODO

  • multi-ref serialization
  • validate PHP values against type definitions, return errors if invalid
Parameters
$operation : string

operation name

$direction : string

(input|output)

$parameters : mixed

parameter value(s)

$bindingType : string = 'soap'

(soap|soap12)

Tags
access

public

Return values
mixed

parameters serialized as XML or false on error (e.g. operation not found)

serializeType()

serializes a PHP value according a given type definition

public serializeType(string $name, string $type, mixed $value[, string $use = 'encoded' ][, string $encodingStyle = false ][, bool $unqualified = false ]) : string
Parameters
$name : string

name of value (part or element)

$type : string

XML schema type of value (type or element)

$value : mixed

a native PHP value (parameter value)

$use : string = 'encoded'

use for part (encoded|literal)

$encodingStyle : string = false

SOAP encoding style for the value (if different than the enclosing style)

$unqualified : bool = false

a kludge for what should be XML namespace form handling

Tags
access

private

Return values
string

value serialized as an XML string

setCredentials()

if authenticating, set user credentials here

public setCredentials(string $username, string $password[, string $authtype = 'basic' ][, array<string|int, mixed> $certRequest = array() ]) : mixed
Parameters
$username : string
$password : string
$authtype : string = 'basic'

(basic|digest|certificate|ntlm)

$certRequest : array<string|int, mixed> = array()

(keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)

Tags
access

public

Return values
mixed

setDebugLevel()

sets the debug level for this instance

public setDebugLevel(int $level) : mixed
Parameters
$level : int

Debug level 0-9, where 0 turns off

Tags
access

public

Return values
mixed

setError()

sets error string

public setError(mixed $str) : bool
Parameters
$str : mixed
Tags
access

private

Return values
bool

$string error string

setGlobalDebugLevel()

sets the global debug level, which applies to future instances

public setGlobalDebugLevel(int $level) : mixed
Parameters
$level : int

Debug level 0-9, where 0 turns off

Tags
access

public

Return values
mixed

start_element()

start-element handler

public start_element(string $parser, string $name, string $attrs) : mixed
Parameters
$parser : string

XML parser object

$name : string

element name

$attrs : string

associative array of attributes

Tags
access

private

Return values
mixed

varDump()

Returns a string with the output of var_dump

public varDump(mixed $data) : string
Parameters
$data : mixed

The variable to var_dump

Tags
access

public

Return values
string

The output of var_dump

webDescription()

prints html description of services

public webDescription() : mixed
Tags
access

private

Return values
mixed

Search results