Class wsdl

Description

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

  • access: public
  • version: $Id: class.wsdl.php,v 1.56 2005/08/04 01:27:42 snichol Exp $
  • author: Dietrich Ayala <dietrich@ganx4.com>

Located in /core/nusoap/lib/class.wsdl.php (line 13)

nusoap_base
   |
   --wsdl
Variable Summary
Method Summary
wsdl wsdl ([string $wsdl = ''], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30])
void addComplexType (string $name, [string $typeClass = 'complexType'], [string $phpType = 'array'], [string $compositor = ''], [string $restrictionBase = ''], [array $elements = array()], [array $attrs = array()], [string $arrayType = ''])
void addElement (array $attrs)
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 = ''])
void addSimpleType (string $name, [string $restrictionBase = ''], [string $typeClass = 'simpleType'], [string $phpType = 'scalar'], [array $enumeration = array()])
void getBindingData (mixed $binding)
array getOperationData (string $operation, [string $bindingType = 'soap'])
array getOperationDataForSoapAction (string $soapAction, [string $bindingType = 'soap'])
array getOperations ([string $bindingType = 'soap'])
mixed getTypeDef ($type $type, $ns $ns)
string serialize (mixed $debug)
mixed serializeParameters (mixed $operation, mixed $direction, mixed $parameters, mixed $)
mixed serializeRPCParameters (string $operation, string $direction, mixed $parameters)
Variables
mixed $bindings = array() (line 26)
mixed $complexTypes = array() (line 20)
mixed $currentBinding (line 27)
mixed $currentMessage (line 22)
mixed $currentOperation (line 23)
mixed $currentPort (line 29)
mixed $currentPortType (line 25)
mixed $currentSchema (line 18)
mixed $depth = 0 (line 39)
mixed $depth_array = array() (line 40)
mixed $documentation = false (line 32)
mixed $endpoint = '' (line 33)
mixed $import = array() (line 35)
mixed $message = array() (line 19)
mixed $messages = array() (line 21)
mixed $opData = array() (line 30)
mixed $parser (line 37)
mixed $ports = array() (line 28)
mixed $portTypes = array() (line 24)
mixed $position = 0 (line 38)
mixed $proxyhost = '' (line 42)
mixed $proxypassword = '' (line 45)
mixed $proxyport = '' (line 43)
mixed $proxyusername = '' (line 44)
mixed $response_timeout = 30 (line 47)
mixed $schemas = array() (line 17)
mixed $status = '' (line 31)
mixed $timeout = 0 (line 46)
mixed $wsdl (line 15)
Methods
Constructor wsdl (line 61)

constructor

  • access: public
wsdl wsdl ([string $wsdl = ''], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30])
  • 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
addComplexType (line 1489)

adds an XML Schema complex type to the WSDL types

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

adds an element to the WSDL types

  • access: public
  • see: xmlschema
void addElement (array $attrs)
  • array $attrs: attributes that must include name and type
addOperation (line 1567)

register an operation with the server

  • access: public
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)
addSimpleType (line 1534)

adds an XML Schema simple type to the WSDL types

  • access: public
  • see: xmlschema
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
getBindingData (line 525)
void getBindingData (mixed $binding)
getOperationData (line 569)

returns an associative array of data necessary for calling an operation

  • access: public
array getOperationData (string $operation, [string $bindingType = 'soap'])
  • string $operation: , name of operation
  • string $bindingType: , type of binding eg: soap
getOperationDataForSoapAction (line 599)

returns an associative array of data necessary for calling an operation

  • access: public
array getOperationDataForSoapAction (string $soapAction, [string $bindingType = 'soap'])
  • string $soapAction: soapAction for operation
  • string $bindingType: type of binding eg: soap
getOperations (line 539)

returns an assoc array of operation names => operation data

  • access: public
array getOperations ([string $bindingType = 'soap'])
  • string $bindingType: eg: soap, smtp, dime (only soap is currently supported)
getTypeDef (line 635)

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 )

  • see: xmlschema
  • access: public
mixed getTypeDef ($type $type, $ns $ns)
  • $type $type: string the type
  • $ns $ns: string namespace (not prefix) of the type
serialize (line 731)

serialize the parsed wsdl

  • return: serialization of WSDL
  • access: public
string serialize (mixed $debug)
  • mixed $debug: whether to put debug=1 in endpoint URL
serializeParameters (line 949)

serialize a PHP value according to a WSDL message definition

TODO

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

  • return: new param or false if initial value didn't validate
  • deprecated:
  • access: public
mixed serializeParameters (mixed $operation, mixed $direction, mixed $parameters, mixed $)
  • mixed $: param value
serializeRPCParameters (line 870)

serialize PHP values according to a WSDL message definition

TODO

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

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

Documentation generated on Tue, 4 Oct 2005 21:58:59 -0700 by phpDocumentor 1.3.0RC3