dmitry Fri Feb 13 05:29:57 2004 EDT Modified files: /php-src/ext/soap/interop client_round2_interop.php client_round2_results.php index.php server_round2_groupC.php Log: Cleanup
http://cvs.php.net/diff.php/php-src/ext/soap/interop/client_round2_interop.php?r1=1.13&r2=1.14&ty=u Index: php-src/ext/soap/interop/client_round2_interop.php diff -u php-src/ext/soap/interop/client_round2_interop.php:1.13 php-src/ext/soap/interop/client_round2_interop.php:1.14 --- php-src/ext/soap/interop/client_round2_interop.php:1.13 Wed Feb 11 11:13:15 2004 +++ php-src/ext/soap/interop/client_round2_interop.php Fri Feb 13 05:29:55 2004 @@ -16,7 +16,7 @@ // | Authors: Shane Caraveo <[EMAIL PROTECTED]> | // +----------------------------------------------------------------------+ // -// $Id: client_round2_interop.php,v 1.13 2004/02/11 16:13:15 dmitry Exp $ +// $Id: client_round2_interop.php,v 1.14 2004/02/13 10:29:55 dmitry Exp $ // require_once 'DB.php'; // PEAR/DB require_once 'client_round2_params.php'; @@ -63,9 +63,9 @@ 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 @@ // 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 "<pre>"; + if ($this->html) print "<pre>"; print $soapclient->wire."\n"; print_r($endpointArray); - if ($this->html) print "</pre>"; + if ($this->html) print "</pre>"; print "\n"; return; } @@ -152,10 +152,10 @@ } } catch (SoapFault $fault) { if ($this->html) { - echo "<pre>$fault</pre>\n"; - } else { - echo "$fault\n"; - } + echo "<pre>$fault</pre>\n"; + } else { + echo "$fault\n"; + } return NULL; } // retreive all endpoints now @@ -212,13 +212,7 @@ 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 @@ $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 @@ */ function compareResult($expect, $result, $type = NULL) { - return compare($expect, $result); + return compare($expect, $result); } @@ -433,17 +427,15 @@ } $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 @@ // 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 @@ "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 @@ $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 @@ if ($this->show) { print "Processing $endpoint at {$endpoint_info['endpointURL']}"; if ($this->html) print "<br>\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 @@ } $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<br>\n"; -# return; -# } - echo "\n\n<b>Servers: {$this->totals['servers']} Calls: {$this->totals['calls']} Success: {$this->totals['success']} Fail: {$this->totals['fail']}</b><br>\n"; echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\n"; http://cvs.php.net/diff.php/php-src/ext/soap/interop/client_round2_results.php?r1=1.3&r2=1.4&ty=u Index: php-src/ext/soap/interop/client_round2_results.php diff -u php-src/ext/soap/interop/client_round2_results.php:1.3 php-src/ext/soap/interop/client_round2_results.php:1.4 --- php-src/ext/soap/interop/client_round2_results.php:1.3 Mon Jan 5 11:44:00 2004 +++ php-src/ext/soap/interop/client_round2_results.php Fri Feb 13 05:29:55 2004 @@ -19,7 +19,7 @@ // | Authors: Shane Caraveo <[EMAIL PROTECTED]> | // +----------------------------------------------------------------------+ // -// $Id: client_round2_results.php,v 1.3 2004/01/05 16:44:00 dmitry Exp $ +// $Id: client_round2_results.php,v 1.4 2004/02/13 10:29:55 dmitry Exp $ // require_once 'client_round2_interop.php'; ?> @@ -41,11 +41,11 @@ TD.HTTP { background-color: Yellow; } TD.SMTP { background-color: Yellow; } </style> - <title>PEAR-PHP SOAP Interop Tests</title> + <title>PHP SOAP Client Interop Test Results</title> </head> <body bgcolor="White" text="Black"> -<h2 align="center">SOAP Client Interop Test Results: Round2</h2> +<h2 align="center">PHP SOAP Client Interop Test Results: Round2</h2> <a href="index.php">Back to Interop Index</a><br> <p> </p> http://cvs.php.net/diff.php/php-src/ext/soap/interop/index.php?r1=1.3&r2=1.4&ty=u Index: php-src/ext/soap/interop/index.php diff -u php-src/ext/soap/interop/index.php:1.3 php-src/ext/soap/interop/index.php:1.4 --- php-src/ext/soap/interop/index.php:1.3 Fri Jan 9 09:56:24 2004 +++ php-src/ext/soap/interop/index.php Fri Feb 13 05:29:55 2004 @@ -2,7 +2,7 @@ <html> <head> - <title>PEAR SOAP Interop</title> + <title>PHP SOAP Interop</title> </head> <?php // get our endpoint @@ -13,8 +13,8 @@ ?> <body> -<h2 align='center'>PEAR SOAP Interop</h2> -<p>Welcome to the PEAR SOAP Interop pages. These pages are set up for +<h2 align='center'>PHP SOAP Interop</h2> +<p>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 <a href="http://www.whitemesa.com/interop.htm">White Mesa</a>.</p> <p>Currently Round 2 base, Group B and Group C interop tests are enabled.</p> @@ -26,32 +26,23 @@ <h3>Interop Client</h3> -<p> -Notes: -Tests are done both "Direct" and with "WSDL". WSDL tests use the supplied interop WSDL +<p>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.</p> -<p> -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. -</p> +<p>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.</p> <h3>Client Test Interface</h3> -<p>The <a href="client_round2.php">client interface</a> allows you to run the PEAR SOAP +<p>The <a href="client_round2.php">client interface</a> allows you to run the PHP SOAP Client against a choosen interop server. Each run updates the results database below.</p> <h3>Interop Client Test Results</h3> -<p>This is a database of the current test results using PEAR SOAP Clients against interop servers.</p> -<p> -More detail (wire) about errors (marked yellow or red) can be obtained by clicking on the +<p>This is a database of the current test results using PHP SOAP Clients against interop servers.</p> +<p>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. -</p> - +testing that endpoint. This reduces the time it takes to run the tests if a server is unavailable.</p> <ul> <li><a href="client_round2_results.php?test=base&type=php&wsdl=0">Base results using PHP native types</a></li> <li><a href="client_round2_results.php?test=base&type=soapval&wsdl=0">Base results using SOAP types</a></li> http://cvs.php.net/diff.php/php-src/ext/soap/interop/server_round2_groupC.php?r1=1.6&r2=1.7&ty=u Index: php-src/ext/soap/interop/server_round2_groupC.php diff -u php-src/ext/soap/interop/server_round2_groupC.php:1.6 php-src/ext/soap/interop/server_round2_groupC.php:1.7 --- php-src/ext/soap/interop/server_round2_groupC.php:1.6 Thu Feb 5 15:26:03 2004 +++ php-src/ext/soap/interop/server_round2_groupC.php Fri Feb 13 05:29:55 2004 @@ -16,7 +16,7 @@ // | Authors: Shane Caraveo <[EMAIL PROTECTED]> | // +----------------------------------------------------------------------+ // -// $Id: server_round2_groupC.php,v 1.6 2004/02/05 20:26:03 dmitry Exp $ +// $Id: server_round2_groupC.php,v 1.7 2004/02/13 10:29:55 dmitry Exp $ // class SOAP_Interop_GroupC { @@ -24,15 +24,11 @@ function echoMeStringRequest($string) { -// return $string; -// return new SoapVar($string, XSD_STRING, "string", XSD_NAMESPACE, "echoMeStringResponse", $this->method_namespace); return new SoapHeader($this->method_namespace, "echoMeStringResponse", $string); } function echoMeStructRequest($struct) { -// return $struct; -// return new SoapVar($struct, SOAP_ENC_OBJECT, "SOAPStruct", "http://soapinterop.org/", "echoMeStructResponse",$this->method_namespace); return new SoapHeader($this->method_namespace, "echoMeStructResponse", $struct); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php