From 59e1b8e1c276186b7368a78d62620b013d0025cc Mon Sep 17 00:00:00 2001 From: Shane Caraveo Date: Sun, 14 Jul 2002 22:57:53 +0000 Subject: make this work with wsdl also --- ext/soap/interop/client_round2_interop.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ext/soap/interop') diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php index bc06434742..1e77ed92c8 100644 --- a/ext/soap/interop/client_round2_interop.php +++ b/ext/soap/interop/client_round2_interop.php @@ -370,7 +370,7 @@ class Interop_Client extends Interop_Base if (!array_key_exists('client',$endpoint_info)) { $endpoint_info['client'] = new SoapObject($endpoint_info['wsdlURL']); } - $soap = $endpoint_info['client']; + $soap =& $endpoint_info['client']; # XXX how do we determine a failure on retreiving/parsing wsdl? if ($soap->wsdl->fault) { @@ -418,13 +418,22 @@ class Interop_Client extends Interop_Base // this lets us set UTF-8, US-ASCII or other //$soap->setEncoding($soap_test->encoding); - $return = $soap->__call($soap_test->method_name,$soap_test->method_params, $soapaction, $namespace); + if ($this->useWSDL) { + $args = ''; + foreach ($soap_test->method_params as $pname => $param) { + $arg = '$soap_test->method_params["'.$pname.'"]'; + $args .= $args?','.$arg:$arg; + } + $return = eval('return $soap->'.$soap_test->method_name.'('.$args.');'); + } else { + $return = $soap->__call($soap_test->method_name,$soap_test->method_params,$soapaction, $namespace); + } // save the wire $wire = $soap->__getlastrequest()."\n\n".$soap->__getlastresponse(); $wire = str_replace('>',">\n",$wire); $wire = str_replace('" ',"\" \n",$wire); - print $wire; + #print $wire; if(!$soap->__isfault()){ if (is_array($soap_test->method_params) && count($soap_test->method_params) == 1) { -- cgit v1.2.1