Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
webservice_soap\wsdl Class Reference

WSDL generator for the SOAP web service. More...

Public Member Functions

 __construct ($serviceclass, $namespace)
 webservice_soap_wsdl constructor. More...
 
 add_complex_type ($classname, $properties)
 Adds a complex type to the WSDL. More...
 
 register ($functionname, $inputparams=array(), $outputparams=array(), $documentation='')
 Registers the external service method to the WSDL. More...
 
 to_xml ()
 Outputs the WSDL in XML format. More...
 

Public Attributes

const BINDING = 'Binding'
 BINDING - string constant attached to the service class name to identify binding nodes.
 
const IN = 'In'
 IN - string constant attached to the function name to identify input nodes.
 
const NS_SOAP = 'http://schemas.xmlsoap.org/wsdl/soap/'
 Namespace URI for the WSDL SOAP binding.
 
const NS_SOAP_ENC = 'http://schemas.xmlsoap.org/soap/encoding/'
 Encoding namespace URI as defined by SOAP 1.1.
 
const NS_SOAP_TRANSPORT = 'http://schemas.xmlsoap.org/soap/http'
 WSDL namespace for the WSDL HTTP GET and POST binding.
 
const NS_WSDL = 'http://schemas.xmlsoap.org/wsdl/'
 Namespace URI for the WSDL framework.
 
const NS_XSD = 'http://www.w3.org/2001/XMLSchema'
 Schema namespace URI as defined by XSD.
 
const OUT = 'Out'
 OUT - string constant attached to the function name to identify output nodes.
 
const PORT = 'Port'
 PORT - string constant attached to the service class name to identify port nodes.
 
const SERVICE = 'Service'
 SERVICE string constant attached to the service class name to identify service nodes.
 

Detailed Description

WSDL generator for the SOAP web service.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

webservice_soap\wsdl::__construct (   $serviceclass,
  $namespace 
)

webservice_soap_wsdl constructor.

Parameters
string$serviceclassThe service class' name.
string$namespaceThe WSDL namespace.

Member Function Documentation

◆ add_complex_type()

webservice_soap\wsdl::add_complex_type (   $classname,
  $properties 
)

Adds a complex type to the WSDL.

Parameters
string$classnameThe complex type's class name.
array$propertiesAn associative array containing the properties of the complex type class.

◆ register()

webservice_soap\wsdl::register (   $functionname,
  $inputparams = array(),
  $outputparams = array(),
  $documentation = '' 
)

Registers the external service method to the WSDL.

Parameters
string$functionnameThe name of the web service function to be registered.
array$inputparamsContains the function's input parameters with their associated types.
array$outputparamsContains the function's output parameters with their associated types.
string$documentationThe function's description.

◆ to_xml()

webservice_soap\wsdl::to_xml ( )

Outputs the WSDL in XML format.

Return values
mixedThe string value of the WSDL in XML format. False, otherwise.

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