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

Public Member Functions

 __construct ($wsdl='', $proxyhost=false, $proxyport=false, $proxyusername=false, $proxypassword=false, $timeout=0, $response_timeout=30, $curl_options=null, $use_curl=false)
 
 fetchWSDL ($wsdl)
 
 parseWSDL ($wsdl='')
 
 start_element ($parser, $name, $attrs)
 
 end_element ($parser, $name)
 
 character_data ($parser, $data)
 
 setCredentials ($username, $password, $authtype='basic', $certRequest=[])
 
 getBindingData ($binding)
 
 getOperations ($portName='', $bindingType='soap')
 
 getOperationData ($operation, $bindingType='soap')
 
 getOperationDataForSoapAction ($soapAction, $bindingType='soap')
 
 getTypeDef ($type, $ns)
 
 webDescription ()
 
 serialize ($debug=0)
 
 parametersMatchWrapped ($type, &$parameters)
 
 serializeRPCParameters ($operation, $direction, $parameters, $bindingType='soap')
 
 serializeParameters ($operation, $direction, $parameters)
 
 serializeType ($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
 
 serializeComplexTypeAttributes ($typeDef, $value, $ns, $uqType)
 
 serializeComplexTypeElements ($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false)
 
 addComplexType ($name, $typeClass='complexType', $phpType='array', $compositor='', $restrictionBase='', $elements=[], $attrs=[], $arrayType='')
 
 addSimpleType ($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=[])
 
 addElement ($attrs)
 
 addOperation ($name, $in=false, $out=false, $namespace=false, $soapaction=false, $style='rpc', $use='encoded', $documentation='', $encodingStyle='')
 
- 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

 $wsdl
 
 $schemas = []
 
 $currentSchema
 
 $message = []
 
 $complexTypes = []
 
 $messages = []
 
 $currentMessage
 
 $currentOperation
 
 $portTypes = []
 
 $currentPortType
 
 $bindings = []
 
 $currentBinding
 
 $ports = []
 
 $currentPort
 
 $opData = []
 
 $status = ''
 
 $documentation = false
 
 $endpoint = ''
 
 $import = []
 
 $parser
 
 $position = 0
 
 $depth = 0
 
 $depth_array = []
 
 $proxyhost = ''
 
 $proxyport = ''
 
 $proxyusername = ''
 
 $proxypassword = ''
 
 $timeout = 0
 
 $response_timeout = 30
 
 $curl_options = []
 
 $use_curl = false
 
 $username = ''
 
 $password = ''
 
 $authtype = ''
 
 $certRequest = []
 
- 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

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

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 4714 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $wsdl = '',
$proxyhost = false,
$proxyport = false,
$proxyusername = false,
$proxypassword = false,
$timeout = 0,
$response_timeout = 30,
$curl_options = null,
$use_curl = false )

constructor

Parameters
string$wsdlWSDL document URL
bool$proxyhost
bool$proxyport
bool$proxyusername
bool$proxypassword
int$timeoutset the connection timeout
int$response_timeoutset the response timeout
array$curl_optionsuser-specified cURL options
bool$use_curltry to use cURL @access public

Definition at line 4772 of file nusoap.php.

Member Function Documentation

◆ addComplexType()

addComplexType ( $name,
$typeClass = 'complexType',
$phpType = 'array',
$compositor = '',
$restrictionBase = '',
$elements = [],
$attrs = [],
$arrayType = '' )

adds an XML Schema complex type to the WSDL types

Parameters
string$name
string$typeClass(complexType|simpleType|attribute)
string$phpTypecurrently supported are array and struct (php assoc array)
string$compositor(all|sequence|choice)
string$restrictionBasenamespace:name (https://schemas.xmlsoap.org/soap/encoding/:Array)
array$elementse.g. array ( name => array(name=>'',type=>'') )
array$attrse.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
string$arrayTypeas namespace:name (xsd:string)
See also
nusoap_xmlschema @access public

Definition at line 6497 of file nusoap.php.

◆ addElement()

addElement ( $attrs)

adds an element to the WSDL types

Parameters
array$attrsattributes that must include name and type
See also
nusoap_xmlschema @access public

Definition at line 6560 of file nusoap.php.

◆ addOperation()

addOperation ( $name,
$in = false,
$out = false,
$namespace = false,
$soapaction = false,
$style = 'rpc',
$use = 'encoded',
$documentation = '',
$encodingStyle = '' )

register an operation with the server

Parameters
string$nameoperation (method) name
bool$inassoc array of input values: key = param name, value = param type
bool$outassoc array of output values: key = param name, value = param type
bool$namespaceoptional The namespace for the operation
bool$soapactionoptional 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$documentationoptional The description to include in the WSDL
string$encodingStyleoptional (usually 'https://schemas.xmlsoap.org/soap/encoding/' for encoded)
Returns
bool @access public

Definition at line 6581 of file nusoap.php.

◆ addSimpleType()

addSimpleType ( $name,
$restrictionBase = '',
$typeClass = 'simpleType',
$phpType = 'scalar',
$enumeration = [] )

adds an XML Schema simple type to the WSDL types

Parameters
string$name
string$restrictionBasenamespace:name (https://schemas.xmlsoap.org/soap/encoding/:Array)
string$typeClass(should always be simpleType)
string$phpType(should always be scalar)
array$enumerationarray of values
See also
nusoap_xmlschema @access public

Definition at line 6545 of file nusoap.php.

◆ character_data()

character_data ( $parser,
$data )

element content handler

Parameters
string$parserXML parser object
string$dataelement content @access private

Definition at line 5249 of file nusoap.php.

◆ end_element()

end_element ( $parser,
$name )

end-element handler

Parameters
string$parserXML parser object
string$nameelement name @access private

Definition at line 5218 of file nusoap.php.

◆ fetchWSDL()

fetchWSDL ( $wsdl)

fetches the WSDL document and parses it

@access public

Parameters
$wsdl

Definition at line 4795 of file nusoap.php.

◆ getBindingData()

getBindingData ( $binding)

Definition at line 5279 of file nusoap.php.

◆ getOperationData()

getOperationData ( $operation,
$bindingType = 'soap' )

returns an associative array of data necessary for calling an operation

Parameters
string$operationname of operation
string$bindingTypetype of binding eg: soap, soap12
Returns
array @access public

Definition at line 5335 of file nusoap.php.

◆ getOperationDataForSoapAction()

getOperationDataForSoapAction ( $soapAction,
$bindingType = 'soap' )

returns an associative array of data necessary for calling an operation

Parameters
string$soapActionsoapAction for operation
string$bindingTypetype of binding eg: soap, soap12
Returns
array @access public

Definition at line 5367 of file nusoap.php.

◆ getOperations()

getOperations ( $portName = '',
$bindingType = 'soap' )

returns an assoc array of operation names => operation data

Parameters
string$portNameWSDL port name
string$bindingTypeeg: soap, smtp, dime (only soap and soap12 are currently supported)
Returns
array @access public

Definition at line 5294 of file nusoap.php.

◆ getTypeDef()

getTypeDef ( $type,
$ns )

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 )

Parameters
string$typethe type
string$nsnamespace (not prefix) of the type
Returns
mixed @access public
See also
nusoap_xmlschema

Definition at line 5406 of file nusoap.php.

◆ parametersMatchWrapped()

parametersMatchWrapped ( $type,
& $parameters )

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

Parameters
string$typethe type (element name) of the wrapper
array$parametersthe parameter values for the SOAP call
Returns
bool whether they parameters are unwrapped (and should be wrapped) @access private

Definition at line 5741 of file nusoap.php.

◆ parseWSDL()

parseWSDL ( $wsdl = '')

parses the wsdl document

Parameters
string$wsdlpath or URL @access private
Returns
bool

Definition at line 4900 of file nusoap.php.

◆ serialize()

serialize ( $debug = 0)

serialize the parsed wsdl

Parameters
mixed$debugwhether to put debug=1 in endpoint URL
Returns
string serialization of WSDL @access public

Definition at line 5602 of file nusoap.php.

◆ serializeComplexTypeAttributes()

serializeComplexTypeAttributes ( $typeDef,
$value,
$ns,
$uqType )

serializes the attributes for a complexType

Parameters
array$typeDefour internal representation of an XML schema type (or element)
mixed$valuea native PHP value (parameter value)
string$nsthe namespace of the type
string$uqTypethe local part of the type
Returns
string value serialized as an XML string @access private

Definition at line 6324 of file nusoap.php.

◆ serializeComplexTypeElements()

serializeComplexTypeElements ( $typeDef,
$value,
$ns,
$uqType,
$use = 'encoded',
$encodingStyle = false )

serializes the elements for a complexType

Parameters
array$typeDefour internal representation of an XML schema type (or element)
mixed$valuea native PHP value (parameter value)
string$nsthe namespace of the type
string$uqTypethe local part of the type
string$useuse for part (encoded|literal)
bool$encodingStyleSOAP encoding style for the value (if different than the enclosing style)
Returns
string value serialized as an XML string @access private

Definition at line 6388 of file nusoap.php.

◆ serializeParameters()

serializeParameters ( $operation,
$direction,
$parameters )

serialize a PHP value according to a WSDL message definition

TODO

  • multi-ref serialization
  • validate PHP values against type definitions, return errors if invalid
Parameters
string$operationoperation name
string$direction(input|output)
mixed$parametersparameter value(s)
Returns
mixed parameters serialized as XML or false on error (e.g. operation not found) @access public
Deprecated

Definition at line 5927 of file nusoap.php.

◆ serializeRPCParameters()

serializeRPCParameters ( $operation,
$direction,
$parameters,
$bindingType = 'soap' )

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
Parameters
string$operationoperation name
string$direction(input|output)
mixed$parametersparameter value(s)
string$bindingType(soap|soap12)
Returns
mixed parameters serialized as XML or false on error (e.g. operation not found) @access public

Definition at line 5825 of file nusoap.php.

◆ serializeType()

serializeType ( $name,
$type,
$value,
$use = 'encoded',
$encodingStyle = false,
$unqualified = false )

serializes a PHP value according a given type definition

Parameters
string$namename of value (part or element)
string$typeXML schema type of value (type or element)
mixed$valuea native PHP value (parameter value)
string$useuse for part (encoded|literal)
bool$encodingStyleSOAP encoding style for the value (if different than the enclosing style)
bool$unqualifieda kludge for what should be XML namespace form handling
Returns
string value serialized as an XML string @access private

Definition at line 6005 of file nusoap.php.

◆ setCredentials()

setCredentials ( $username,
$password,
$authtype = 'basic',
$certRequest = [] )

if authenticating, set user credentials here

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

Definition at line 5269 of file nusoap.php.

◆ start_element()

start_element ( $parser,
$name,
$attrs )

start-element handler

Parameters
string$parserXML parser object
string$nameelement name
string$attrsassociative array of attributes @access private

Definition at line 5005 of file nusoap.php.

◆ webDescription()

webDescription ( )

prints html description of services

@access private

Definition at line 5467 of file nusoap.php.

Field Documentation

◆ $authtype

$authtype = ''

Definition at line 4755 of file nusoap.php.

◆ $bindings

$bindings = []

Definition at line 4728 of file nusoap.php.

◆ $certRequest

$certRequest = []

Definition at line 4756 of file nusoap.php.

◆ $complexTypes

$complexTypes = []

Definition at line 4722 of file nusoap.php.

◆ $curl_options

$curl_options = []

Definition at line 4750 of file nusoap.php.

◆ $currentBinding

$currentBinding

Definition at line 4729 of file nusoap.php.

◆ $currentMessage

$currentMessage

Definition at line 4724 of file nusoap.php.

◆ $currentOperation

$currentOperation

Definition at line 4725 of file nusoap.php.

◆ $currentPort

$currentPort

Definition at line 4731 of file nusoap.php.

◆ $currentPortType

$currentPortType

Definition at line 4727 of file nusoap.php.

◆ $currentSchema

$currentSchema

Definition at line 4720 of file nusoap.php.

◆ $depth

$depth = 0

Definition at line 4741 of file nusoap.php.

◆ $depth_array

$depth_array = []

Definition at line 4742 of file nusoap.php.

◆ $documentation

$documentation = false

Definition at line 4734 of file nusoap.php.

◆ $endpoint

$endpoint = ''

Definition at line 4735 of file nusoap.php.

◆ $import

$import = []

Definition at line 4737 of file nusoap.php.

◆ $message

$message = []

Definition at line 4721 of file nusoap.php.

◆ $messages

$messages = []

Definition at line 4723 of file nusoap.php.

◆ $opData

$opData = []

Definition at line 4732 of file nusoap.php.

◆ $parser

$parser

Definition at line 4739 of file nusoap.php.

◆ $password

$password = ''

Definition at line 4754 of file nusoap.php.

◆ $ports

$ports = []

Definition at line 4730 of file nusoap.php.

◆ $portTypes

$portTypes = []

Definition at line 4726 of file nusoap.php.

◆ $position

$position = 0

Definition at line 4740 of file nusoap.php.

◆ $proxyhost

$proxyhost = ''

Definition at line 4744 of file nusoap.php.

◆ $proxypassword

$proxypassword = ''

Definition at line 4747 of file nusoap.php.

◆ $proxyport

$proxyport = ''

Definition at line 4745 of file nusoap.php.

◆ $proxyusername

$proxyusername = ''

Definition at line 4746 of file nusoap.php.

◆ $response_timeout

$response_timeout = 30

Definition at line 4749 of file nusoap.php.

◆ $schemas

$schemas = []

Definition at line 4719 of file nusoap.php.

◆ $status

$status = ''

Definition at line 4733 of file nusoap.php.

◆ $timeout

$timeout = 0

Definition at line 4748 of file nusoap.php.

◆ $use_curl

$use_curl = false

Definition at line 4751 of file nusoap.php.

◆ $username

$username = ''

Definition at line 4753 of file nusoap.php.

◆ $wsdl

$wsdl

Definition at line 4717 of file nusoap.php.


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