function wsdl::addComplexType in Salesforce Suite 5
Same name in this branch
- 5 includes/nusoap.php \wsdl::addComplexType()
- 5 includes/nusoap.orig.php \wsdl::addComplexType()
Same name and namespace in other branches
- 5.2 includes/nusoap.php \wsdl::addComplexType()
- 5.2 includes/nusoap.orig.php \wsdl::addComplexType()
* adds an XML Schema complex type to the WSDL types * *
Parameters
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 = array ( name => array(name=>'',type=>'') ) * @param array attrs = array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) * @param string arrayType: namespace:name (xsd:string) * @see xmlschema * @access public
2 calls to wsdl::addComplexType()
- wsdl::addOperation in includes/
nusoap.php - * register an operation with the server * *
- wsdl::addOperation in includes/
nusoap.orig.php - * register an operation with the server * *
File
- includes/
nusoap.orig.php, line 5627
Class
- wsdl
- parses a WSDL file, allows access to it's data, other utility methods
Code
function addComplexType($name, $typeClass = 'complexType', $phpType = 'array', $compositor = '', $restrictionBase = '', $elements = [], $attrs = [], $arrayType = '') {
if (count($elements) > 0) {
foreach ($elements as $n => $e) {
// expand each element
foreach ($e as $k => $v) {
$k = strpos($k, ':') ? $this
->expandQname($k) : $k;
$v = strpos($v, ':') ? $this
->expandQname($v) : $v;
$ee[$k] = $v;
}
$eElements[$n] = $ee;
}
$elements = $eElements;
}
if (count($attrs) > 0) {
foreach ($attrs as $n => $a) {
// expand each attribute
foreach ($a as $k => $v) {
$k = strpos($k, ':') ? $this
->expandQname($k) : $k;
$v = strpos($v, ':') ? $this
->expandQname($v) : $v;
$aa[$k] = $v;
}
$eAttrs[$n] = $aa;
}
$attrs = $eAttrs;
}
$restrictionBase = strpos($restrictionBase, ':') ? $this
->expandQname($restrictionBase) : $restrictionBase;
$arrayType = strpos($arrayType, ':') ? $this
->expandQname($arrayType) : $arrayType;
$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
$this->schemas[$typens][0]
->addComplexType($name, $typeClass, $phpType, $compositor, $restrictionBase, $elements, $attrs, $arrayType);
}