Home » Web Services » SOAP » Bug #7224
Children of ComplexTypes
Details
| Submitted | 2006-03-28 09:12 UTC |
|---|---|
| From | markus at emedia-solutions-wolf dot de |
| Assigned | yunosh |
| Status | Closed |
| Package | SOAP |
| PHP Version | Irrelevant |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-03-28 09:12 UTC] markus at emedia-solutions-wolf dot de
Description:
------------
When one wants to get a child of a complex type but the complex type is a struct, then the method getComplexTypeChildType returns null.
This is, because the the method getComplexTypeForElement always returns null for struct types.
To get the child type in this case the method should be patched (see code below).
function getComplexTypeChildType($ns, $name, $child_ns, $child_name)
{
// is the type an element?
$t = $this->_getComplexTypeForElement($name, $ns);
if ($t) {
// no, get it from complex types directly
if (isset($t['elements'][$child_name]['type']))
return $t['elements'][$child_name]['type'];
} else {
// Type is not an element but complex
if (isset($this->ns[$ns]) &&
isset($this->elements[$this->ns[$ns]][$name]['complex']) &&
$this->elements[$this->ns[$ns]][$name]['complex']) {
return $this->elements[$this->ns[$ns]][$name]['elements'][$child_name]['type'];
}
}
return null;
}