Home » Web Services » SOAP » Bug #7239
Determin item type in _decode method for complex types
Details
| Submitted | 2006-03-29 08:50 UTC |
|---|---|
| From | markus at emedia-solutions-wolf dot de |
| Status | No Feedback |
| Package | SOAP |
| PHP Version | Irrelevant |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-03-29 08:50 UTC] markus at emedia-solutions-wolf dot de
Description:
------------
The part for determin the item type of a soapvalue when using WSDL is only done when the return object is of type object.
But when there are more than one item to handle the return object is converted to an array and then for all succeeding items the wsdl type is not set anymore.
The solution for this is to move the wsdl type determination before the if (is_object(... block. For code see below:
in SOAP/Base.php around line 880:
foreach ($soapval->value as $item) {
if ($this->_wsdl) {
// Get this child's WSDL information.
// /$soapval->ns/$soapval->type/$item->ns/$item->name
$child_type = $this->_wsdl->getComplexTypeChildType(
$soapval->namespace,
$soapval->name,
$item->namespace,
$item->name);
if ($child_type) {
$item->type = $child_type;
}
}
if (is_object($return)) {
...
The if ($this->_wsdl) block has been moved out of the if (is_object($return)) block.
[2006-06-19 18:12 UTC] markus at emedia-solutions-wolf dot de
Sorry, but I've dropped the SOAP code I've used to handle this problem. There where more problems with SOAP (not PEAR related) and we decided to use hessian webservices.