[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/api/soap/nusoap/ -> class.wsdl.php (sommaire)

(pas de description)

Poids: 1904 lignes (78 kb)
Inclus ou requis: 2 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

wsdl:: (29 méthodes):
  wsdl()
  fetchWSDL()
  parseWSDL()
  start_element()
  end_element()
  character_data()
  setCredentials()
  getBindingData()
  getOperations()
  getOperationData()
  getOperationDataForSoapAction()
  getTypeDef()
  webDescription()
  lib_bwcheck()
  makeObj()
  b_writeIt()
  popup()
  popout()
  serialize()
  parametersMatchWrapped()
  serializeRPCParameters()
  serializeParameters()
  serializeType()
  serializeComplexTypeAttributes()
  serializeComplexTypeElements()
  addComplexType()
  addSimpleType()
  addElement()
  addOperation()


Classe: wsdl  - X-Ref

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

wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false)   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
param: array $curl_options user-specified cURL options
param: boolean $use_curl try to use cURL

fetchWSDL($wsdl)   X-Ref
fetches the WSDL document and parses it


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

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|ntlm)
param: array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)

getBindingData($binding)   X-Ref
Pas de description

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

param: string $bindingType eg: soap, smtp, dime (only soap and soap12 are 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, soap12
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, soap12
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: string $type the type
param: string $ns namespace (not prefix) of the type
return: mixed

webDescription()   X-Ref
prints html description of services


lib_bwcheck()   X-Ref
Pas de description

makeObj(obj)   X-Ref
Pas de description

b_writeIt(text)   X-Ref
Pas de description

popup(divid)   X-Ref
Pas de description

popout()   X-Ref
Pas de 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

parametersMatchWrapped($type, &$parameters)   X-Ref
determine whether a set of parameters are unwrapped
when they are expect to be wrapped, Microsoft-style.

param: string $type the type (element name) of the wrapper
param: array $parameters the parameter values for the SOAP call
return: boolean whether they parameters are unwrapped (and should be wrapped)

serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap')   X-Ref
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

param: string $operation operation name
param: string $direction (input|output)
param: mixed $parameters parameter value(s)
param: string $bindingType (soap|soap12)
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 $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)

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 e.g. array ( name => array(name=>'',type=>'') )
param: array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
param: string $arrayType as 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)



Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics