constructor
wsdl
wsdl
([string $wsdl = ''], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30], [array $curl_options = null], [boolean $use_curl = false])
-
string
$wsdl: WSDL document URL
-
string
$proxyhost
-
string
$proxyport
-
string
$proxyusername
-
string
$proxypassword
-
integer
$timeout: set the connection timeout
-
integer
$response_timeout: set the response timeout
-
array
$curl_options: user-specified cURL options
-
boolean
$use_curl: try to use cURL
adds an XML Schema complex type to the WSDL types
void
addComplexType
(string $name, [string $typeClass = 'complexType'], [string $phpType = 'array'], [string $compositor = ''], [string $restrictionBase = ''], [array $elements = array()], [array $attrs = array()], [string $arrayType = ''])
-
string
$name
-
string
$typeClass: (complexType|simpleType|attribute)
-
string
$phpType: currently supported are array and struct (php assoc array)
-
string
$compositor: (all|sequence|choice)
-
string
$restrictionBase: namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-
array
$elements: e.g. array ( name => array(name=>'',type=>'') )
-
array
$attrs: e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
-
string
$arrayType: as namespace:name (xsd:string)
adds an element to the WSDL types
void
addElement
(array $attrs)
-
array
$attrs: attributes that must include name and type
register an operation with the server
void
addOperation
(string $name, [array $in = false], [array $out = false], [string $namespace = false], [string $soapaction = false], [string $style = 'rpc'], [string $use = 'encoded'], [string $documentation = ''], [string $encodingStyle = ''])
-
string
$name: operation (method) name
-
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
-
string
$namespace: optional The namespace for the operation
-
string
$soapaction: optional The soapaction for the operation
-
string
$style: (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically
-
string
$use: (encoded|literal) optional The use for the parameters (cannot mix right now)
-
string
$documentation: optional The description to include in the WSDL
-
string
$encodingStyle: optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
adds an XML Schema simple type to the WSDL types
void
addSimpleType
(string $name, [string $restrictionBase = ''], [string $typeClass = 'simpleType'], [string $phpType = 'scalar'], [array $enumeration = array()])
-
string
$name
-
string
$restrictionBase: namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-
string
$typeClass: (should always be simpleType)
-
string
$phpType: (should always be scalar)
-
array
$enumeration: array of values
element content handler
void
character_data
(string $parser, string $data)
-
string
$parser: XML parser object
-
string
$data: element content
end-element handler
void
end_element
(string $parser, string $name)
-
string
$parser: XML parser object
-
string
$name: element name
fetches the WSDL document and parses it
void
fetchWSDL
(mixed $wsdl)
void
getBindingData
(mixed $binding)
returns an associative array of data necessary for calling an operation
array
getOperationData
(string $operation, [string $bindingType = 'soap'])
-
string
$operation: name of operation
-
string
$bindingType: type of binding eg: soap, soap12
returns an associative array of data necessary for calling an operation
array
getOperationDataForSoapAction
(string $soapAction, [string $bindingType = 'soap'])
-
string
$soapAction: soapAction for operation
-
string
$bindingType: type of binding eg: soap, soap12
returns an assoc array of operation names => operation data
array
getOperations
([string $bindingType = 'soap'])
-
string
$bindingType: eg: soap, smtp, dime (only soap and soap12 are currently supported)
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 )
mixed
getTypeDef
(string $type, string $ns)
-
string
$type: the type
-
string
$ns: namespace (not prefix) of the type
determine whether a set of parameters are unwrapped when they are expect to be wrapped, Microsoft-style.
boolean
parametersMatchWrapped
(string $type, array &$parameters)
-
string
$type: the type (element name) of the wrapper
-
array
$parameters: the parameter values for the SOAP call
parses the wsdl document
void
parseWSDL
([string $wsdl = ''])
-
string
$wsdl: path or URL
serialize the parsed wsdl
string
serialize
(mixed $debug)
-
mixed
$debug: whether to put debug=1 in endpoint URL
serializes the attributes for a complexType
string
serializeComplexTypeAttributes
(array $typeDef, mixed $value, string $ns, string $uqType)
-
array
$typeDef: our internal representation of an XML schema type (or element)
-
mixed
$value: a native PHP value (parameter value)
-
string
$ns: the namespace of the type
-
string
$uqType: the local part of the type
serializes the elements for a complexType
string
serializeComplexTypeElements
(array $typeDef, mixed $value, string $ns, string $uqType, [string $use = 'encoded'], [string $encodingStyle = false])
-
array
$typeDef: our internal representation of an XML schema type (or element)
-
mixed
$value: a native PHP value (parameter value)
-
string
$ns: the namespace of the type
-
string
$uqType: the local part of the type
-
string
$use: use for part (encoded|literal)
-
string
$encodingStyle: SOAP encoding style for the value (if different than the enclosing style)
serialize a PHP value according to a WSDL message definition
TODO
- multi-ref serialization
- validate PHP values against type definitions, return errors if invalid
mixed
serializeParameters
(string $operation, string $direction, mixed $parameters)
-
string
$operation: operation name
-
string
$direction: (input|output)
-
mixed
$parameters: parameter value(s)
serialize PHP values according to a WSDL message definition contrary to the method name, this is not limited to RPC
TODO
- multi-ref serialization
- validate PHP values against type definitions, return errors if invalid
mixed
serializeRPCParameters
(string $operation, string $direction, mixed $parameters, [string $bindingType = 'soap'])
-
string
$operation: operation name
-
string
$direction: (input|output)
-
mixed
$parameters: parameter value(s)
-
string
$bindingType: (soap|soap12)
serializes a PHP value according a given type definition
string
serializeType
(string $name, string $type, mixed $value, [string $use = 'encoded'], [string $encodingStyle = false], [boolean $unqualified = false])
-
string
$name: name of value (part or element)
-
string
$type: XML schema type of value (type or element)
-
mixed
$value: a native PHP value (parameter value)
-
string
$use: use for part (encoded|literal)
-
string
$encodingStyle: SOAP encoding style for the value (if different than the enclosing style)
-
boolean
$unqualified: a kludge for what should be XML namespace form handling
if authenticating, set user credentials here
void
setCredentials
(string $username, string $password, [string $authtype = 'basic'], [array $certRequest = array()])
-
string
$username
-
string
$password
-
string
$authtype: (basic|digest|certificate|ntlm)
-
array
$certRequest: (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
start-element handler
void
start_element
(string $parser, string $name, string $attrs)
-
string
$parser: XML parser object
-
string
$name: element name
-
string
$attrs: associative array of attributes
prints html description of services
void
webDescription
()
Inherited Methods
Inherited From nusoap_base
nusoap_base::nusoap_base()
nusoap_base::appendDebug()
nusoap_base::clearDebug()
nusoap_base::contractQname()
nusoap_base::debug()
nusoap_base::expandEntities()
nusoap_base::expandQname()
nusoap_base::formatDump()
nusoap_base::getDebug()
nusoap_base::getDebugAsXMLComment()
nusoap_base::getDebugLevel()
nusoap_base::getError()
nusoap_base::getGlobalDebugLevel()
nusoap_base::getLocalPart()
nusoap_base::getmicrotime()
nusoap_base::getNamespaceFromPrefix()
nusoap_base::getPrefix()
nusoap_base::getPrefixFromNamespace()
nusoap_base::isArraySimpleOrStruct()
nusoap_base::serializeEnvelope()
nusoap_base::serialize_val()
nusoap_base::setDebugLevel()
nusoap_base::setError()
nusoap_base::setGlobalDebugLevel()
nusoap_base::varDump()
nusoap_base::__toString()