summaryrefslogtreecommitdiff
path: root/ext/soap/interop
diff options
context:
space:
mode:
authorShane Caraveo <shane@php.net>2002-07-14 22:57:53 +0000
committerShane Caraveo <shane@php.net>2002-07-14 22:57:53 +0000
commit59e1b8e1c276186b7368a78d62620b013d0025cc (patch)
tree7782cb58c3b60f01209b52d365157b1de59f9274 /ext/soap/interop
parent3650bab76f08ee9cb5dfa21861bbc9de2cd666d8 (diff)
downloadphp-git-59e1b8e1c276186b7368a78d62620b013d0025cc.tar.gz
make this work with wsdl also
Diffstat (limited to 'ext/soap/interop')
-rw-r--r--ext/soap/interop/client_round2_interop.php15
1 files changed, 12 insertions, 3 deletions
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) {