From 2d1ae249a85288760c705ef515cd74f7093a3188 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 13 Feb 2004 10:29:55 +0000 Subject: [PATCH] Cleanup --- ext/soap/interop/client_round2_interop.php | 56 ++++++++-------------- ext/soap/interop/client_round2_results.php | 4 +- ext/soap/interop/index.php | 31 +++++------- ext/soap/interop/server_round2_groupC.php | 4 -- 4 files changed, 34 insertions(+), 61 deletions(-) diff --git a/ext/soap/interop/client_round2_interop.php b/ext/soap/interop/client_round2_interop.php index 76fe653e68..60d144ec7b 100644 --- a/ext/soap/interop/client_round2_interop.php +++ b/ext/soap/interop/client_round2_interop.php @@ -63,9 +63,9 @@ class Interop_Client function Interop_Client() { global $interopConfig; - $this->DSN = $interopConfig['DSN']; - $this->baseURL = $interopConfig['baseURL']; - //$this->baseURL = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); + $this->DSN = $interopConfig['DSN']; + $this->baseURL = $interopConfig['baseURL']; + //$this->baseURL = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); // set up the database connection $this->dbc = DB::connect($this->DSN, true); // if it errors out, just ignore it and rely on regular methods @@ -96,10 +96,10 @@ class Interop_Client // retreive endpoints from the endpoint server $endpointArray = $soapclient->__call("GetEndpointInfo",array("groupName"=>$test),array('soapaction'=>"http://soapinterop.org/",'uri'=>"http://soapinterop.org/")); if (is_soap_fault($endpointArray) || PEAR::isError($endpointArray)) { - if ($this->html) print "
";
+            if ($this->html) print "
";
             print $soapclient->wire."\n";
             print_r($endpointArray);
-        		if ($this->html) print "
"; + if ($this->html) print "
"; print "\n"; return; } @@ -152,10 +152,10 @@ class Interop_Client } } catch (SoapFault $fault) { if ($this->html) { - echo "
$fault
\n"; - } else { - echo "$fault\n"; - } + echo "
$fault
\n"; + } else { + echo "$fault\n"; + } return NULL; } // retreive all endpoints now @@ -212,13 +212,7 @@ class Interop_Client foreach ($db_ep as $entry) { $this->endpoints[$entry['endpointName']] = $entry; } -/* - $this->endpoints["PHP ext/soap"] = - array("endpointName" => "PHP ext/soap", - "endpointURL" => "http://soap.4s4c.com/ilab/soap.asp", - "wsdlURL" => "http://www.pocketsoap.com/services/ilab.wsdl", - "class" => "base" "status"]=> string(1) "1" } -*/ + if (count($this->endpoints) > 0) { $this->currentTest = $base; return TRUE; @@ -269,7 +263,7 @@ class Interop_Client $success = $result['fault']->faultcode; $pos = strpos($success,':'); if ($pos !== false) { - $success = substr($success,$pos+1); + $success = substr($success,$pos+1); } $error = $result['fault']->faultstring; if (!$wire) $wire= $result['fault']->detail; @@ -347,7 +341,7 @@ class Interop_Client */ function compareResult($expect, $result, $type = NULL) { - return compare($expect, $result); + return compare($expect, $result); } @@ -433,17 +427,15 @@ try { } $return = eval('return $soap->'.$soap_test->method_name.'('.$args.');'); } else { - if ($soap_test->headers || $soap_test->headers_expect) { + if ($soap_test->headers || $soap_test->headers_expect) { $return = $soap->__call($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace), $soap_test->headers, $result_headers); } else { $return = $soap->__call($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace)); } } } catch (SoapFault $ex) { - $return = $ex; + $return = $ex; } -//var_dump($return); - if(!is_soap_fault($return)){ if ($soap_test->expect !== NULL) { @@ -460,7 +452,7 @@ try { // compare header results $headers_ok = TRUE; if ($soap_test->headers || $soap_test->headers_expect) { - $headers_ok = $this->compareResult($soap_test->headers_expect, $result_headers); + $headers_ok = $this->compareResult($soap_test->headers_expect, $result_headers); } # we need to decode what we sent so we can compare! @@ -486,10 +478,10 @@ try { "RESPONSE:\n".str_replace('" ',"\" \n",str_replace('>',">\n",$soap->__getlastresponse()))."\n\n". "EXPECTED:\n".var_dump_str($sent_d)."\n". "RESULTL:\n".var_dump_str($return); - if ($soap_test->headers_expect) { - $wire .= "\nEXPECTED HEADERS:\n".var_dump_str($soap_test->headers_expect)."\n". - "RESULT HEADERS:\n".var_dump_str($result_headers); - } + if ($soap_test->headers_expect) { + $wire .= "\nEXPECTED HEADERS:\n".var_dump_str($soap_test->headers_expect)."\n". + "RESULT HEADERS:\n".var_dump_str($result_headers); + } #print "Wire:".htmlentities($wire); if($ok){ @@ -522,7 +514,7 @@ try { $res =$fault->faultcode; $pos = strpos($res,':'); if ($pos !== false) { - $res = substr($res,$pos+1); + $res = substr($res,$pos+1); } } // save the wire @@ -565,7 +557,7 @@ try { if ($this->show) { print "Processing $endpoint at {$endpoint_info['endpointURL']}"; if ($this->html) print "
\n"; else print "\n"; - } + } foreach($soap_tests[$this->currentTest] as $soap_test) { //foreach(array_keys($method_params[$this->currentTest][$this->paramType]) as $method) @@ -709,12 +701,6 @@ try { } $this->totals['calls'] = count($methods) * $this->totals['servers']; -# if ($this->totals['fail'] == $this->totals['calls']) { -# // assume tests have not run, skip outputing table -# print "No Data Available
\n"; -# return; -# } - echo "\n\nServers: {$this->totals['servers']} Calls: {$this->totals['calls']} Success: {$this->totals['success']} Fail: {$this->totals['fail']}
\n"; echo "\n"; diff --git a/ext/soap/interop/client_round2_results.php b/ext/soap/interop/client_round2_results.php index 42c49e2b39..52e89c3ded 100644 --- a/ext/soap/interop/client_round2_results.php +++ b/ext/soap/interop/client_round2_results.php @@ -41,11 +41,11 @@ TD.WSDLPARSER { background-color: Yellow; } TD.HTTP { background-color: Yellow; } TD.SMTP { background-color: Yellow; } - PEAR-PHP SOAP Interop Tests + PHP SOAP Client Interop Test Results -

SOAP Client Interop Test Results: Round2

+

PHP SOAP Client Interop Test Results: Round2

Back to Interop Index

 

diff --git a/ext/soap/interop/index.php b/ext/soap/interop/index.php index 999cd47efa..1ae25d92f0 100644 --- a/ext/soap/interop/index.php +++ b/ext/soap/interop/index.php @@ -2,7 +2,7 @@ - PEAR SOAP Interop + PHP SOAP Interop -

PEAR SOAP Interop

-

Welcome to the PEAR SOAP Interop pages. These pages are set up for +

PHP SOAP Interop

+

Welcome to the PHP SOAP Interop pages. These pages are set up for SOAP Builder interop tests. You can find out more about the interop tests at White Mesa.

Currently Round 2 base, Group B and Group C interop tests are enabled.

@@ -26,32 +26,23 @@ Group C WSDL:

Interop Client

-

-Notes: -Tests are done both "Direct" and with "WSDL". WSDL tests use the supplied interop WSDL +

Notes: Tests are done both "Direct" and with "WSDL". WSDL tests use the supplied interop WSDL to run the tests against. The Direct method uses an internal prebuilt list of methods and parameters for the test.

-

-Tests are also run against two methods of generating method parameters. The first, 'php', attempts -to directly serialize PHP variables into soap values. The second method, 'soapval', uses a SOAP_Value -class to define what the type of the value is. The second method is more interopable than the first -by nature. -

+

Tests are also run against two methods of generating method parameters. The first, 'php', attempts +to directly serialize PHP variables into soap values. The second method, 'soapval', uses a SoapParam and SoapVar +classes to define what the type of the value is.

Client Test Interface

-

The client interface allows you to run the PEAR SOAP +

The client interface allows you to run the PHP SOAP Client against a choosen interop server. Each run updates the results database below.

Interop Client Test Results

-

This is a database of the current test results using PEAR SOAP Clients against interop servers.

-

-More detail (wire) about errors (marked yellow or red) can be obtained by clicking on the +

This is a database of the current test results using PHP SOAP Clients against interop servers.

+

More detail (wire) about errors (marked yellow or red) can be obtained by clicking on the link in the result box. If we have an HTTP error attempting to connect to the endpoint, we will mark all consecutive attempts as errors, and skip -testing that endpoint. This reduces the time it takes to run the tests if a server is unavailable. -WSDLCACHE errors mean we cannot retreive the WSDL file specified for the endpoint. -

- +testing that endpoint. This reduces the time it takes to run the tests if a server is unavailable.