mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Trying to make php3 compatible
This commit is contained in:
parent
4a115e8bb1
commit
7a53e55d30
@ -34,7 +34,7 @@ class soapclient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function call($method,$params=array(),$namespace=false,$soapAction=false)
|
function call($method,$params='',$namespace=false,$soapAction=false)
|
||||||
{
|
{
|
||||||
if($this->endpointType == 'wsdl')
|
if($this->endpointType == 'wsdl')
|
||||||
{
|
{
|
||||||
@ -106,7 +106,8 @@ class soapclient
|
|||||||
{
|
{
|
||||||
$this->debug("got fault");
|
$this->debug("got fault");
|
||||||
$faultArray = $return->decode();
|
$faultArray = $return->decode();
|
||||||
foreach($faultArray as $k => $v)
|
while(list($k,$v) = each($faultArray))
|
||||||
|
/* foreach($faultArray as $k => $v) */
|
||||||
{
|
{
|
||||||
print "$k = $v<br>";
|
print "$k = $v<br>";
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,8 @@ class soapmsg
|
|||||||
{
|
{
|
||||||
global $namespaces;
|
global $namespaces;
|
||||||
$i = count($namespaces);
|
$i = count($namespaces);
|
||||||
foreach($new_namespaces as $v)
|
while(list($v) = each($new_namespaces))
|
||||||
|
/* foreach($new_namespaces as $v) */
|
||||||
{
|
{
|
||||||
$namespaces[$v] = "ns".$i++;
|
$namespaces[$v] = "ns".$i++;
|
||||||
}
|
}
|
||||||
@ -28,7 +29,8 @@ class soapmsg
|
|||||||
function make_envelope($payload)
|
function make_envelope($payload)
|
||||||
{
|
{
|
||||||
global $namespaces;
|
global $namespaces;
|
||||||
foreach($namespaces as $k => $v)
|
while(list($k,$v) = each($namespaces))
|
||||||
|
/* foreach($namespaces as $k => $v) */
|
||||||
{
|
{
|
||||||
$ns_string .= " xmlns:$v=\"$k\"";
|
$ns_string .= " xmlns:$v=\"$k\"";
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,8 @@ class soapval
|
|||||||
$this->value = array();
|
$this->value = array();
|
||||||
if(is_array($vals) && count($vals) >= 1)
|
if(is_array($vals) && count($vals) >= 1)
|
||||||
{
|
{
|
||||||
foreach($vals as $k => $v)
|
while(list($k,$v) = each($vals))
|
||||||
|
/* foreach($vals as $k => $v) */
|
||||||
{
|
{
|
||||||
$this->debug("checking value $k : $v");
|
$this->debug("checking value $k : $v");
|
||||||
// if soapval, add..
|
// if soapval, add..
|
||||||
@ -192,7 +193,8 @@ class soapval
|
|||||||
$this->debug("adding struct '$this->name' with ".count($vals)." vals");
|
$this->debug("adding struct '$this->name' with ".count($vals)." vals");
|
||||||
if(is_array($vals) && count($vals) >= 1)
|
if(is_array($vals) && count($vals) >= 1)
|
||||||
{
|
{
|
||||||
foreach($vals as $k => $v)
|
while(list($k,$v) = each($vals))
|
||||||
|
/* foreach($vals as $k => $v) */
|
||||||
{
|
{
|
||||||
// if serialize, if soapval
|
// if serialize, if soapval
|
||||||
if(get_class($v) == "soapval")
|
if(get_class($v) == "soapval")
|
||||||
@ -205,7 +207,8 @@ class soapval
|
|||||||
{
|
{
|
||||||
if(is_array($v))
|
if(is_array($v))
|
||||||
{
|
{
|
||||||
foreach($v as $a => $b)
|
while(list($a,$b) = each($v))
|
||||||
|
/* foreach($v as $a => $b) */
|
||||||
{
|
{
|
||||||
if($a == "0")
|
if($a == "0")
|
||||||
{
|
{
|
||||||
@ -285,7 +288,8 @@ class soapval
|
|||||||
}
|
}
|
||||||
if(is_array($soapval->value))
|
if(is_array($soapval->value))
|
||||||
{
|
{
|
||||||
foreach($soapval->value as $k => $v)
|
while(list($k,$v) = each($soapval->value))
|
||||||
|
/* foreach($soapval->value as $k => $v) */
|
||||||
{
|
{
|
||||||
$xml .= $this->serializeval($v);
|
$xml .= $this->serializeval($v);
|
||||||
}
|
}
|
||||||
@ -301,7 +305,9 @@ class soapval
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
// array
|
// array
|
||||||
foreach($soapval->value as $array_val)
|
reset($soapval->value);
|
||||||
|
while($array_val = each($soapval->value))
|
||||||
|
/* foreach($soapval->value as $array_val) */
|
||||||
{
|
{
|
||||||
$array_types[$array_val->type] = 1;
|
$array_types[$array_val->type] = 1;
|
||||||
$xml .= $this->serializeval($array_val);
|
$xml .= $this->serializeval($array_val);
|
||||||
@ -348,7 +354,9 @@ class soapval
|
|||||||
{
|
{
|
||||||
if(is_array($soapval->value))
|
if(is_array($soapval->value))
|
||||||
{
|
{
|
||||||
foreach($soapval->value as $item)
|
reset($soapval->value);
|
||||||
|
while($item = each($soapval->value))
|
||||||
|
/* foreach($soapval->value as $item) */
|
||||||
{
|
{
|
||||||
$return[] = $this->decode($item);
|
$return[] = $this->decode($item);
|
||||||
}
|
}
|
||||||
@ -364,7 +372,9 @@ class soapval
|
|||||||
{
|
{
|
||||||
if(is_array($soapval->value))
|
if(is_array($soapval->value))
|
||||||
{
|
{
|
||||||
foreach($soapval->value as $item)
|
reset($soapval->value);
|
||||||
|
while($item = each($soapval->value))
|
||||||
|
/* foreach($soapval->value as $item) */
|
||||||
{
|
{
|
||||||
$return[$item->name] = $this->decode($item);
|
$return[$item->name] = $this->decode($item);
|
||||||
}
|
}
|
||||||
@ -384,7 +394,9 @@ class soapval
|
|||||||
{
|
{
|
||||||
global $namespaces,$soapTypes,$typemap;
|
global $namespaces,$soapTypes,$typemap;
|
||||||
|
|
||||||
foreach($typemap as $namespace => $types)
|
reset($typemap);
|
||||||
|
while(list($namespace,$types) = each($typemap))
|
||||||
|
/* foreach($typemap as $namespace => $types) */
|
||||||
{
|
{
|
||||||
if(in_array($type,$types))
|
if(in_array($type,$types))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user