|
@@ 1601-1626 (lines=26) @@
|
| 1598 |
|
|
| 1599 |
|
function send_returnvalue($method_response) { |
| 1600 |
|
// if we got nothing back. this might be ok (echoVoid) |
| 1601 |
|
if(isset($method_response) && $method_response != "" || is_bool($method_response)) { |
| 1602 |
|
// if fault |
| 1603 |
|
if(get_class($method_response) == 'soap_fault'){ |
| 1604 |
|
debug('soapserver::send_returnvalue got a fault object from method', 'loader'); |
| 1605 |
|
$this->fault = $method_response; |
| 1606 |
|
$return_val = $method_response->serialize(); |
| 1607 |
|
// if return val is soapval object |
| 1608 |
|
} elseif(get_class($method_response) == 'soapval'){ |
| 1609 |
|
$this->debug('got a soapval object from method'); |
| 1610 |
|
$return_val = $method_response->serialize(); |
| 1611 |
|
// returned other |
| 1612 |
|
} else { |
| 1613 |
|
$this->debug("got a ".gettype($method_response)." from method"); |
| 1614 |
|
$this->debug("serializing return value"); |
| 1615 |
|
if($this->wsdl){ |
| 1616 |
|
if(sizeof($this->opData['output']['parts']) > 1){ |
| 1617 |
|
$opParams = $method_response; |
| 1618 |
|
} else { |
| 1619 |
|
$opParams = array($method_response); |
| 1620 |
|
} |
| 1621 |
|
$return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); |
| 1622 |
|
} else { |
| 1623 |
|
$return_val = $this->serialize_val($method_response); |
| 1624 |
|
} |
| 1625 |
|
} |
| 1626 |
|
} |
| 1627 |
|
if (!$this->fault) { |
| 1628 |
|
$this->debug("serializing response"); |
| 1629 |
|
$payload = "<".$this->methodname."Response>\n".$return_val."</".$this->methodname."Response>\n"; |
|
@@ 1762-1787 (lines=26) @@
|
| 1759 |
|
} |
| 1760 |
|
$this->debug("done calling method: $this->methodname, received $method_response of type".gettype($method_response)); |
| 1761 |
|
// if we got nothing back. this might be ok (echoVoid) |
| 1762 |
|
if(isset($method_response) && $method_response != "" || is_bool($method_response)) { |
| 1763 |
|
// if fault |
| 1764 |
|
if(get_class($method_response) == 'soap_fault'){ |
| 1765 |
|
$this->debug('got a fault object from method'); |
| 1766 |
|
$this->fault = $method_response; |
| 1767 |
|
return $method_response->serialize(); |
| 1768 |
|
// if return val is soapval object |
| 1769 |
|
} elseif(get_class($method_response) == 'soapval'){ |
| 1770 |
|
$this->debug('got a soapval object from method'); |
| 1771 |
|
$return_val = $method_response->serialize(); |
| 1772 |
|
// returned other |
| 1773 |
|
} else { |
| 1774 |
|
$this->debug("got a ".gettype($method_response)." from method"); |
| 1775 |
|
$this->debug("serializing return value"); |
| 1776 |
|
if($this->wsdl){ |
| 1777 |
|
if(sizeof($this->opData['output']['parts']) > 1){ |
| 1778 |
|
$opParams = $method_response; |
| 1779 |
|
} else { |
| 1780 |
|
$opParams = array($method_response); |
| 1781 |
|
} |
| 1782 |
|
$return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); |
| 1783 |
|
} else { |
| 1784 |
|
$return_val = $this->serialize_val($method_response); |
| 1785 |
|
} |
| 1786 |
|
} |
| 1787 |
|
} |
| 1788 |
|
$this->debug("serializing response"); |
| 1789 |
|
$payload = "<".$this->methodname."Response>\n".$return_val."</".$this->methodname."Response>\n"; |
| 1790 |
|
$this->result = "successful"; |