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
// 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;
}
}
} 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
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;
$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;
*/
function compareResult($expect, $result, $type = NULL)
{
- return compare($expect, $result);
+ return compare($expect, $result);
}
}
$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) {
// 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!
"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){
$res =$fault->faultcode;
$pos = strpos($res,':');
if ($pos !== false) {
- $res = substr($res,$pos+1);
+ $res = substr($res,$pos+1);
}
}
// save the wire
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)
}
$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";
<html>
<head>
- <title>PEAR SOAP Interop</title>
+ <title>PHP SOAP Interop</title>
</head>
<?php
// get our endpoint
?>
<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>
<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>