Trying to make php3 compatible

This commit is contained in:
Miles Lott 2001-07-23 11:21:38 +00:00
parent 4a115e8bb1
commit 7a53e55d30
3 changed files with 27 additions and 12 deletions

View File

@ -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')
{
@ -106,7 +106,8 @@ class soapclient
{
$this->debug("got fault");
$faultArray = $return->decode();
foreach($faultArray as $k => $v)
while(list($k,$v) = each($faultArray))
/* foreach($faultArray as $k => $v) */
{
print "$k = $v<br>";
}

View File

@ -14,7 +14,8 @@ class soapmsg
{
global $namespaces;
$i = count($namespaces);
foreach($new_namespaces as $v)
while(list($v) = each($new_namespaces))
/* foreach($new_namespaces as $v) */
{
$namespaces[$v] = "ns".$i++;
}
@ -28,7 +29,8 @@ class soapmsg
function make_envelope($payload)
{
global $namespaces;
foreach($namespaces as $k => $v)
while(list($k,$v) = each($namespaces))
/* foreach($namespaces as $k => $v) */
{
$ns_string .= " xmlns:$v=\"$k\"";
}

View File

@ -139,7 +139,8 @@ class soapval
$this->value = array();
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");
// if soapval, add..
@ -192,7 +193,8 @@ class soapval
$this->debug("adding struct '$this->name' with ".count($vals)." vals");
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(get_class($v) == "soapval")
@ -205,7 +207,8 @@ class soapval
{
if(is_array($v))
{
foreach($v as $a => $b)
while(list($a,$b) = each($v))
/* foreach($v as $a => $b) */
{
if($a == "0")
{
@ -285,7 +288,8 @@ class soapval
}
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);
}
@ -301,7 +305,9 @@ class soapval
break;
case 2:
// 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;
$xml .= $this->serializeval($array_val);
@ -348,7 +354,9 @@ class soapval
{
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);
}
@ -364,7 +372,9 @@ class soapval
{
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);
}
@ -384,7 +394,9 @@ class soapval
{
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))
{