Changes to soap functions

This commit is contained in:
Miles Lott 2001-12-10 02:09:31 +00:00
parent 9f568f8b33
commit 86eed797cb

View File

@ -308,15 +308,14 @@
function _send_soap_($method_name, $args, $url, $debug=True) function _send_soap_($method_name, $args, $url, $debug=True)
{ {
// $method_name = str_replace('.','_',$method_name); $method_name = str_replace('.','_',$method_name);
list($uri,$hostpart) = $this->_split_url($url); list($uri,$hostpart) = $this->_split_url($url);
$this->build_request($args);
/* if(!$args)
if(gettype($args) != 'array')
{ {
$arr[] = CreateObject('phpgwapi.soapval','','string',$args); $arr = '';
} }
else elseif(is_array($args))
{ {
while(list($key,$val) = @each($args)) while(list($key,$val) = @each($args))
{ {
@ -334,18 +333,18 @@
$ele[] = CreateObject('phpgwapi.soapval',$key, 'string',$val); $ele[] = CreateObject('phpgwapi.soapval',$key, 'string',$val);
} }
} }
if($complex) $arr[] = CreateObject('phpgwapi.soapval','','struct',$ele);
{
$arr[] = CreateObject('phpgwapi.soapval','','struct',$ele);
$ele = $arr;
}
} }
*/ else
{
$arr[] = CreateObject('phpgwapi.soapval','','string',$args);
}
$this->request = $arr;
$soap_message = CreateObject('phpgwapi.soapmsg',$method_name,$this->request); $soap_message = CreateObject('phpgwapi.soapmsg',$method_name,$this->request);
$soap = CreateObject('phpgwapi.soap_client',$uri,$hostpart); $soap = CreateObject('phpgwapi.soap_client',$uri,$hostpart);
$soap->username = $this->sessionid; $soap->username = $this->sessionid;
$soap->password = $this->kp3; $soap->password = $this->kp3;
/* _debug_array($soap_message); */
if($r = $soap->send($soap_message,$method_name)) if($r = $soap->send($soap_message,$method_name))
{ {
_debug_array(htmlentities($soap->outgoing_payload)); _debug_array(htmlentities($soap->outgoing_payload));