mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
Remove outdated soap examples
This patch removes PHP soap extension examples in favor of the PHP manual.
This commit is contained in:
parent
61536b9d64
commit
ab60b79912
@ -1,113 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Round 2 Interop Client Tests</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a href="index.php">Back to Interop Index</a><br>
|
||||
<p> </p>
|
||||
<?php
|
||||
require_once 'client_round2_interop.php';
|
||||
|
||||
$iop = new Interop_Client();
|
||||
|
||||
function endpointList($test,$sel_endpoint)
|
||||
{
|
||||
global $iop;
|
||||
$iop->getEndpoints($test);
|
||||
echo "<select name='endpoint'>\n";
|
||||
echo "<option value=''>-- All Endpoints --</option>\n";
|
||||
foreach ($iop->endpoints as $epname => $epinfo) {
|
||||
$selected = '';
|
||||
if ($sel_endpoint == $epname) $selected = ' SELECTED';
|
||||
echo "<option value='$epname'$selected>$epname</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
}
|
||||
function methodList($test,$sel_method)
|
||||
{
|
||||
global $iop;
|
||||
global $soap_tests;
|
||||
|
||||
echo "<select name='method'>\n";
|
||||
echo "<option value='ALL'>-- Run All Methods --</option>\n";
|
||||
$prev_method = "";
|
||||
foreach ($soap_tests[$test] as $x) {
|
||||
$method = $x->test_name;
|
||||
if ($method != $prev_method) {
|
||||
$prev_method = $method;
|
||||
$selected = '';
|
||||
if ($sel_method == $method) $selected = ' SELECTED';
|
||||
echo "<option value='$method'$selected>$method</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
}
|
||||
|
||||
function endpointTestForm($test, $endpoint, $method, $paramType, $useWSDL)
|
||||
{
|
||||
global $PHP_SELF;
|
||||
if (!$test) $test = 'base';
|
||||
echo "Round 2 '$test' Selected<br>\n";
|
||||
echo "Select endpoint and method to run:<br>\n";
|
||||
echo "<form action='$PHP_SELF' method='post'>\n";
|
||||
echo "<input type='hidden' name='test' value='$test'>\n";
|
||||
endpointList($test, $endpoint);
|
||||
methodList($test, $method);
|
||||
echo "<select name='paramType'>";
|
||||
// echo "<option value='all'>-- All --</option>";
|
||||
echo "<option value='soapval'".($paramType=='soapval'?' selected':'').">soap value</option>";
|
||||
echo "<option value='php'".($paramType=='php'?' selected':'').">php internal type</option></select>\n";
|
||||
echo "<select name='useWSDL'>";
|
||||
// echo "<option value='all'>-- All --</option>";
|
||||
echo "<option value='0'>go Direct</option>";
|
||||
echo "<option value='1'".($useWSDL?' selected':'').">use WSDL</option></select>\n";
|
||||
echo "<input type='submit' value='Go'>\n";
|
||||
echo "</form><br>\n";
|
||||
}
|
||||
|
||||
function testSelectForm($selected_test = NULL)
|
||||
{
|
||||
global $iop, $PHP_SELF;
|
||||
echo "Select a Round 2 test case to run:<br>\n";
|
||||
echo "<form action='$PHP_SELF' method='post'>\n";
|
||||
echo "<select name='test'>\n";
|
||||
foreach ($iop->tests as $test) {
|
||||
$selected = '';
|
||||
if ($selected_test == $test) $selected = ' SELECTED';
|
||||
echo "<option value='$test'$selected>$test</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<input type='submit' value='Go'>\n";
|
||||
echo "</form><br>\n";
|
||||
}
|
||||
|
||||
testSelectForm($_POST['test']);
|
||||
endpointTestForm($_POST['test'],$_POST['endpoint'],$_POST['method'],$_POST['paramType'],$_POST['useWSDL']);
|
||||
|
||||
if ($_POST['test'] && array_key_exists('endpoint', $_POST) && array_key_exists('method', $_POST)) {
|
||||
// here we execute the orders
|
||||
echo "<h2>Calling {$_POST['method']} at {$_POST['endpoint']}</h2>\n";
|
||||
echo "NOTE: wire's are slightly modified to display better in web browsers.<br>\n";
|
||||
|
||||
$iop->currentTest = $_POST['test']; // see $tests above
|
||||
$iop->paramType = $_POST['paramType']; // 'php' or 'soapval'
|
||||
$iop->useWSDL = $_POST['useWSDL']; // 1= do wsdl tests
|
||||
$iop->numServers = 0; // 0 = all
|
||||
$iop->specificEndpoint = $_POST['endpoint']; // test only this endpoint
|
||||
$iop->testMethod = $_POST['method']=='ALL'?'':$_POST['method']; // test only this method
|
||||
$iop->skipEndpointList = array(); // endpoints to skip
|
||||
$iop->nosave = 0; // 1= disable saving results to database
|
||||
// debug output
|
||||
$iop->show = 0;
|
||||
$iop->debug = 0;
|
||||
$iop->showFaults = 0; // used in result table output
|
||||
echo '<pre>';
|
||||
$iop->doTest(); // run a single set of tests using above options
|
||||
echo '</pre>';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
@ -1,783 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
require_once 'DB.php'; // PEAR/DB
|
||||
require_once 'client_round2_params.php';
|
||||
require_once 'test.utility.php';
|
||||
require_once 'config.php';
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
|
||||
class Interop_Client
|
||||
{
|
||||
// database DNS
|
||||
var $DSN = "";
|
||||
|
||||
var $baseURL = "";
|
||||
|
||||
// our central interop server, where we can get the list of endpoints
|
||||
var $interopServer = "http://www.whitemesa.net/wsdl/interopInfo.wsdl";
|
||||
|
||||
// our local endpoint, will always get added to the database for all tests
|
||||
var $localEndpoint;
|
||||
|
||||
// specify testing
|
||||
var $currentTest = 'base'; // see $tests above
|
||||
var $paramType = 'php'; // 'php' or 'soapval'
|
||||
var $useWSDL = 0; // 1= do wsdl tests
|
||||
var $numServers = 0; // 0 = all
|
||||
var $specificEndpoint = ''; // test only this endpoint
|
||||
var $testMethod = ''; // test only this method
|
||||
var $skipEndpointList = array(); // endpoints to skip
|
||||
var $nosave = 0;
|
||||
var $startAt = ''; // start in list at this endpoint
|
||||
// debug output
|
||||
var $show = 1;
|
||||
var $debug = 0;
|
||||
var $showFaults = 0; // used in result table output
|
||||
|
||||
// PRIVATE VARIABLES
|
||||
var $dbc = NULL;
|
||||
var $totals = array();
|
||||
var $tests = array('base','GroupB', 'GroupC');
|
||||
var $paramTypes = array('php', 'soapval');
|
||||
var $endpoints = array();
|
||||
var $html = 1;
|
||||
|
||||
function Interop_Client() {
|
||||
global $interopConfig;
|
||||
$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
|
||||
if (DB::isError($this->dbc)) {
|
||||
echo $this->dbc->getMessage();
|
||||
$this->dbc = NULL;
|
||||
}
|
||||
// set up local endpoint
|
||||
$this->localEndpoint['base'] = (object)array(
|
||||
'endpointName'=>'PHP ext/soap',
|
||||
'endpointURL'=>$this->baseURL.'/server_round2_base.php',
|
||||
'wsdlURL'=>$this->baseURL.'/interop.wsdl.php'
|
||||
);
|
||||
$this->localEndpoint['GroupB'] = (object)array(
|
||||
'endpointName'=>'PHP ext/soap',
|
||||
'endpointURL'=>$this->baseURL.'/server_round2_groupB.php',
|
||||
'wsdlURL'=>$this->baseURL.'/interopB.wsdl.php'
|
||||
);
|
||||
$this->localEndpoint['GroupC'] = (object)array(
|
||||
'endpointName'=>'PHP ext/soap',
|
||||
'endpointURL'=>$this->baseURL.'/server_round2_groupC.php',
|
||||
'wsdlURL'=>$this->baseURL.'/echoheadersvc.wsdl.php');
|
||||
}
|
||||
|
||||
function _fetchEndpoints(&$soapclient, $test) {
|
||||
$this->_getEndpoints($test, 1);
|
||||
|
||||
// retrieve endpoints from the endpoint server
|
||||
$endpointArray = $soapclient->__soapCall("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>";
|
||||
print $soapclient->wire."\n";
|
||||
print_r($endpointArray);
|
||||
if ($this->html) print "</pre>";
|
||||
print "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
// add our local endpoint
|
||||
if ($this->localEndpoint[$test]) {
|
||||
array_push($endpointArray, $this->localEndpoint[$test]);
|
||||
}
|
||||
|
||||
if (!$endpointArray) return;
|
||||
|
||||
// reset the status to zero
|
||||
$res = $this->dbc->query("update endpoints set status = 0 where class='$test'");
|
||||
if (DB::isError($res)) {
|
||||
die ($res->getMessage());
|
||||
}
|
||||
if (is_object($res)) $res->free();
|
||||
// save new endpoints into database
|
||||
foreach($endpointArray as $k => $v){
|
||||
if (array_key_exists($v->endpointName,$this->endpoints)) {
|
||||
$res = $this->dbc->query("update endpoints set endpointURL='{$v->endpointURL}', wsdlURL='{$v->wsdlURL}', status=1 where id={$this->endpoints[$v->endpointName]['id']}");
|
||||
} else {
|
||||
$res = $this->dbc->query("insert into endpoints (endpointName,endpointURL,wsdlURL,class) values('{$v->endpointName}','{$v->endpointURL}','{$v->wsdlURL}','$test')");
|
||||
}
|
||||
if (DB::isError($res)) {
|
||||
die ($res->getMessage());
|
||||
}
|
||||
if (is_object($res)) $res->free();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* fetchEndpoints
|
||||
* retrieve endpoints interop server
|
||||
*
|
||||
* @return boolean result
|
||||
* @access private
|
||||
*/
|
||||
function fetchEndpoints($test = NULL) {
|
||||
// fetch from the interop server
|
||||
try {
|
||||
$soapclient = new SoapClient($this->interopServer);
|
||||
if ($test) {
|
||||
$this->_fetchEndpoints($soapclient, $test);
|
||||
} else {
|
||||
foreach ($this->tests as $test) {
|
||||
$this->_fetchEndpoints($soapclient, $test);
|
||||
}
|
||||
$test = 'base';
|
||||
}
|
||||
} catch (SoapFault $fault) {
|
||||
if ($this->html) {
|
||||
echo "<pre>$fault</pre>\n";
|
||||
} else {
|
||||
echo "$fault\n";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
// retrieve all endpoints now
|
||||
$this->currentTest = $test;
|
||||
$x = $this->_getEndpoints($test);
|
||||
return $x;
|
||||
}
|
||||
|
||||
/**
|
||||
* getEndpoints
|
||||
* retrieve endpoints from either database or interop server
|
||||
*
|
||||
* @param string base (see local var $tests)
|
||||
* @param boolean all (if false, only get valid endpoints, status=1)
|
||||
* @return boolean result
|
||||
* @access private
|
||||
*/
|
||||
function getEndpoints($base = 'base', $all = 0) {
|
||||
if (!$this->_getEndpoints($base, $all)) {
|
||||
return $this->fetchEndpoints($base);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* _getEndpoints
|
||||
* retrieve endpoints from database
|
||||
*
|
||||
* @param string base (see local var $tests)
|
||||
* @param boolean all (if false, only get valid endpoints, status=1)
|
||||
* @return boolean result
|
||||
* @access private
|
||||
*/
|
||||
function _getEndpoints($base = "", $all = 0) {
|
||||
$this->endpoints = array();
|
||||
|
||||
// build sql
|
||||
$sql = "select * from endpoints ";
|
||||
if ($base) {
|
||||
$sql .= "where class='$base' ";
|
||||
if (!$all) $sql .= "and status=1";
|
||||
} else
|
||||
if (!$all) $sql .= "where status=1";
|
||||
$sql .= " order by endpointName";
|
||||
|
||||
|
||||
$db_ep = $this->dbc->getAll($sql,NULL, DB_FETCHMODE_ASSOC );
|
||||
if (DB::isError($db_ep)) {
|
||||
echo $sql."\n";
|
||||
echo $db_ep->getMessage();
|
||||
return FALSE;
|
||||
}
|
||||
// rearange the array
|
||||
foreach ($db_ep as $entry) {
|
||||
$this->endpoints[$entry['endpointName']] = $entry;
|
||||
}
|
||||
|
||||
if (count($this->endpoints) > 0) {
|
||||
$this->currentTest = $base;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* getResults
|
||||
* retrieve results from the database, stuff them into the endpoint array
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function getResults($test = 'base', $type = 'php', $wsdl = 0) {
|
||||
// be sure we have the right endpoints for this test result
|
||||
$this->getEndpoints($test);
|
||||
|
||||
// retrieve the results and put them into the endpoint info
|
||||
$sql = "select * from results where class='$test' and type='$type' and wsdl=$wsdl";
|
||||
$results = $this->dbc->getAll($sql,NULL, DB_FETCHMODE_ASSOC );
|
||||
foreach ($results as $result) {
|
||||
// find the endpoint
|
||||
foreach ($this->endpoints as $epn => $epi) {
|
||||
if ($epi['id'] == $result['endpoint']) {
|
||||
// store the info
|
||||
$this->endpoints[$epn]['methods'][$result['function']] = $result;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* saveResults
|
||||
* save the results of a method test into the database
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _saveResults($endpoint_id, &$soap_test) {
|
||||
if ($this->nosave) return;
|
||||
|
||||
$result = $soap_test->result;
|
||||
$wire = $result['wire'];
|
||||
if ($result['success']) {
|
||||
$success = 'OK';
|
||||
$error = '';
|
||||
} else {
|
||||
$success = $result['fault']->faultcode;
|
||||
$pos = strpos($success,':');
|
||||
if ($pos !== false) {
|
||||
$success = substr($success,$pos+1);
|
||||
}
|
||||
$error = $result['fault']->faultstring;
|
||||
if (!$wire) $wire= $result['fault']->detail;
|
||||
}
|
||||
|
||||
$test_name = $soap_test->test_name;
|
||||
|
||||
$sql = "delete from results where endpoint=$endpoint_id ".
|
||||
"and class='$this->currentTest' and type='$this->paramType' ".
|
||||
"and wsdl=$this->useWSDL and function=".
|
||||
$this->dbc->quote($test_name);
|
||||
#echo "\n".$sql;
|
||||
$res = $this->dbc->query($sql);
|
||||
if (DB::isError($res)) {
|
||||
die ($res->getMessage());
|
||||
}
|
||||
if (is_object($res)) $res->free();
|
||||
|
||||
$sql = "insert into results (endpoint,stamp,class,type,wsdl,function,result,error,wire) ".
|
||||
"values($endpoint_id,".time().",'$this->currentTest',".
|
||||
"'$this->paramType',$this->useWSDL,".
|
||||
$this->dbc->quote($test_name).",".
|
||||
$this->dbc->quote($success).",".
|
||||
$this->dbc->quote($error).",".
|
||||
($wire?$this->dbc->quote($wire):"''").")";
|
||||
#echo "\n".$sql;
|
||||
$res = $this->dbc->query($sql);
|
||||
|
||||
if (DB::isError($res)) {
|
||||
die ($res->getMessage());
|
||||
}
|
||||
if (is_object($res)) $res->free();
|
||||
}
|
||||
|
||||
/**
|
||||
* decodeSoapval
|
||||
* decodes a soap value to php type, used for test result comparisons
|
||||
*
|
||||
* @param SOAP_Value soapval
|
||||
* @return mixed result
|
||||
* @access public
|
||||
*/
|
||||
function decodeSoapval($soapval)
|
||||
{
|
||||
if (gettype($soapval) == "object" &&
|
||||
(strcasecmp(get_class($soapval),"SoapParam") == 0 ||
|
||||
strcasecmp(get_class($soapval),"SoapVar") == 0)) {
|
||||
if (strcasecmp(get_class($soapval),"SoapParam") == 0)
|
||||
$val = $soapval->param_data->enc_value;
|
||||
else
|
||||
$val = $soapval->enc_value;
|
||||
} else {
|
||||
$val = $soapval;
|
||||
}
|
||||
if (is_array($val)) {
|
||||
foreach($val as $k => $v) {
|
||||
if (gettype($v) == "object" &&
|
||||
(strcasecmp(get_class($soapval),"SoapParam") == 0 ||
|
||||
strcasecmp(get_class($soapval),"SoapVar") == 0)) {
|
||||
$val[$k] = $this->decodeSoapval($v);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* compareResult
|
||||
* compare two php types for a match
|
||||
*
|
||||
* @param string expect
|
||||
* @param string test_result
|
||||
* @return boolean result
|
||||
* @access public
|
||||
*/
|
||||
function compareResult($expect, $result, $type = NULL)
|
||||
{
|
||||
return compare($expect, $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* doEndpointMethod
|
||||
* run a method on an endpoint and store it's results to the database
|
||||
*
|
||||
* @param array endpoint_info
|
||||
* @param SOAP_Test test
|
||||
* @return boolean result
|
||||
* @access public
|
||||
*/
|
||||
function doEndpointMethod(&$endpoint_info, &$soap_test) {
|
||||
$ok = FALSE;
|
||||
|
||||
// prepare a holder for the test results
|
||||
$soap_test->result['class'] = $this->currentTest;
|
||||
$soap_test->result['type'] = $this->paramType;
|
||||
$soap_test->result['wsdl'] = $this->useWSDL;
|
||||
|
||||
if ($this->useWSDL) {
|
||||
if (array_key_exists('wsdlURL',$endpoint_info)) {
|
||||
if (!array_key_exists('client',$endpoint_info)) {
|
||||
try {
|
||||
$endpoint_info['client'] = new SoapClient($endpoint_info['wsdlURL'], array("trace"=>1));
|
||||
} catch (SoapFault $ex) {
|
||||
$endpoint_info['client']->wsdl->fault = $ex;
|
||||
}
|
||||
}
|
||||
$soap =& $endpoint_info['client'];
|
||||
|
||||
# XXX how do we determine a failure on retrieving/parsing wsdl?
|
||||
if ($soap->wsdl->fault) {
|
||||
$fault = $soap->wsdl->fault;
|
||||
$soap_test->setResult(0,'WSDL',
|
||||
$fault->faultstring."\n\n".$fault->detail,
|
||||
$fault->faultstring,
|
||||
$fault
|
||||
);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
$fault = new SoapFault('WSDL',"no WSDL defined for $endpoint");
|
||||
$soap_test->setResult(0,'WSDL',
|
||||
$fault->faultstring,
|
||||
$fault->faultstring,
|
||||
$fault
|
||||
);
|
||||
return FALSE;
|
||||
}
|
||||
$namespace = false;
|
||||
$soapaction = false;
|
||||
} else {
|
||||
$namespace = $soapaction = 'http://soapinterop.org/';
|
||||
// hack to make tests work with MS SoapToolkit
|
||||
// it's the only one that uses this soapaction, and breaks if
|
||||
// it isn't right. Can't wait for soapaction to be fully deprecated
|
||||
if ($this->currentTest == 'base' &&
|
||||
strstr($endpoint_info['endpointName'],'MS SOAP ToolKit 2.0')) {
|
||||
$soapaction = 'urn:soapinterop';
|
||||
}
|
||||
if (!array_key_exists('client',$endpoint_info)) {
|
||||
$endpoint_info['client'] = new SoapClient(null,array('location'=>$endpoint_info['endpointURL'],'uri'=>$soapaction,'trace'=>1));
|
||||
}
|
||||
$soap = $endpoint_info['client'];
|
||||
}
|
||||
// // add headers to the test
|
||||
// if ($soap_test->headers) {
|
||||
// // $header is already a SOAP_Header class
|
||||
// foreach ($soap_test->headers as $header) {
|
||||
// $soap->addHeader($header);
|
||||
// }
|
||||
// }
|
||||
// XXX no way to set encoding
|
||||
// this lets us set UTF-8, US-ASCII or other
|
||||
//$soap->setEncoding($soap_test->encoding);
|
||||
try {
|
||||
if ($this->useWSDL && !$soap_test->headers && !$soap_test->headers_expect) {
|
||||
$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 {
|
||||
if ($soap_test->headers || $soap_test->headers_expect) {
|
||||
$return = $soap->__soapCall($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace), $soap_test->headers, $result_headers);
|
||||
} else {
|
||||
$return = $soap->__soapCall($soap_test->method_name,$soap_test->method_params,array('soapaction'=>$soapaction,'uri'=>$namespace));
|
||||
}
|
||||
}
|
||||
} catch (SoapFault $ex) {
|
||||
$return = $ex;
|
||||
}
|
||||
|
||||
if(!is_soap_fault($return)){
|
||||
if ($soap_test->expect !== NULL) {
|
||||
$sent = $soap_test->expect;
|
||||
} else if (is_array($soap_test->method_params) && count($soap_test->method_params) == 1) {
|
||||
reset($soap_test->method_params);
|
||||
$sent = current($soap_test->method_params);
|
||||
} else if (is_array($soap_test->method_params) && count($soap_test->method_params) == 0) {
|
||||
$sent = null;
|
||||
} else {
|
||||
$sent = $soap_test->method_params;
|
||||
}
|
||||
|
||||
// compare header results
|
||||
$headers_ok = TRUE;
|
||||
if ($soap_test->headers || $soap_test->headers_expect) {
|
||||
$headers_ok = $this->compareResult($soap_test->headers_expect, $result_headers);
|
||||
}
|
||||
|
||||
# we need to decode what we sent so we can compare!
|
||||
$sent_d = $this->decodeSoapval($sent);
|
||||
|
||||
$soap_test->result['sent'] = $sent;
|
||||
$soap_test->result['return'] = $return;
|
||||
|
||||
// compare the results with what we sent
|
||||
|
||||
if ($soap_test->cmp_func !== NULL) {
|
||||
$cmp_func = $soap_test->cmp_func;
|
||||
$ok = $cmp_func($sent_d,$return);
|
||||
} else {
|
||||
$ok = $this->compareResult($sent_d,$return, $sent->type);
|
||||
if (!$ok && $soap_test->expect) {
|
||||
$ok = $this->compareResult($soap_test->expect,$return);
|
||||
}
|
||||
}
|
||||
|
||||
// save the wire
|
||||
$wire = "REQUEST:\n".str_replace('" ',"\" \n",str_replace('>',">\n",$soap->__getlastrequest()))."\n\n".
|
||||
"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);
|
||||
}
|
||||
#print "Wire:".htmlentities($wire);
|
||||
|
||||
if($ok){
|
||||
if (!$headers_ok) {
|
||||
$fault = new SoapFault('HEADER','The returned result did not match what we expected to receive');
|
||||
$soap_test->setResult(0,$fault->faultcode,
|
||||
$wire,
|
||||
$fault->faultstring,
|
||||
$fault
|
||||
);
|
||||
} else {
|
||||
$soap_test->setResult(1,'OK',$wire);
|
||||
$success = TRUE;
|
||||
}
|
||||
} else {
|
||||
$fault = new SoapFault('RESULT','The returned result did not match what we expected to receive');
|
||||
$soap_test->setResult(0,$fault->faultcode,
|
||||
$wire,
|
||||
$fault->faultstring,
|
||||
$fault
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$fault = $return;
|
||||
if ($soap_test->expect_fault) {
|
||||
$ok = 1;
|
||||
$res = 'OK';
|
||||
} else {
|
||||
$ok = 0;
|
||||
$res =$fault->faultcode;
|
||||
$pos = strpos($res,':');
|
||||
if ($pos !== false) {
|
||||
$res = substr($res,$pos+1);
|
||||
}
|
||||
}
|
||||
// save the wire
|
||||
$wire = "REQUEST:\n".str_replace('" ',"\" \n",str_replace('>',">\n",$soap->__getlastrequest()))."\n\n".
|
||||
"RESPONSE:\n".str_replace('" ',"\" \n",str_replace('>',">\n",$soap->__getlastresponse()))."\n".
|
||||
"RESULTL:\n".var_dump_str($return);
|
||||
#print "Wire:".htmlentities($wire);
|
||||
|
||||
$soap_test->setResult($ok,$res, $wire,$fault->faultstring, $fault);
|
||||
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* doTest
|
||||
* run a single round of tests
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function doTest() {
|
||||
global $soap_tests;
|
||||
// get endpoints for this test
|
||||
$this->getEndpoints($this->currentTest);
|
||||
#clear totals
|
||||
$this->totals = array();
|
||||
|
||||
$i = 0;
|
||||
foreach($this->endpoints as $endpoint => $endpoint_info){
|
||||
|
||||
// if we specify an endpoint, skip until we find it
|
||||
if ($this->specificEndpoint && $endpoint != $this->specificEndpoint) continue;
|
||||
if ($this->useWSDL && !$endpoint_info['endpointURL']) continue;
|
||||
|
||||
$skipendpoint = FALSE;
|
||||
$this->totals['servers']++;
|
||||
#$endpoint_info['tests'] = array();
|
||||
|
||||
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)
|
||||
|
||||
// only run the type of test we're looking for (php or soapval)
|
||||
if ($soap_test->type != $this->paramType) continue;
|
||||
|
||||
// if we haven't reached our startpoint, skip
|
||||
if ($this->startAt && $this->startAt != $endpoint_info['endpointName']) continue;
|
||||
$this->startAt = '';
|
||||
|
||||
// if this is in our skip list, skip it
|
||||
if (in_array($endpoint, $this->skipEndpointList)) {
|
||||
$skipendpoint = TRUE;
|
||||
$skipfault = new SoapFault('SKIP','endpoint skipped');
|
||||
$soap_test->setResult(0,$fault->faultcode, '',
|
||||
$skipfault->faultstring,
|
||||
$skipfault
|
||||
);
|
||||
#$endpoint_info['tests'][] = &$soap_test;
|
||||
#$soap_test->showTestResult($this->debug, $this->html);
|
||||
#$this->_saveResults($endpoint_info['id'], $soap_test->method_name);
|
||||
$soap_test->result = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
// if we're looking for a specific method, skip unless we have it
|
||||
if ($this->testMethod && strcmp($this->testMethod,$soap_test->test_name) != 0) continue;
|
||||
|
||||
// if we are skipping the rest of the tests (due to error) note a fault
|
||||
if ($skipendpoint) {
|
||||
$soap_test->setResult(0,$fault->faultcode, '',
|
||||
$skipfault->faultstring,
|
||||
$skipfault
|
||||
);
|
||||
#$endpoint_info['tests'][] = &$soap_test;
|
||||
$this->totals['fail']++;
|
||||
} else {
|
||||
// run the endpoint test
|
||||
if ($this->doEndpointMethod($endpoint_info, $soap_test)) {
|
||||
$this->totals['success']++;
|
||||
} else {
|
||||
$skipendpoint = $soap_test->result['fault']->faultcode=='HTTP'
|
||||
&& strstr($soap_test->result['fault']->faultstring,'Connect Error');
|
||||
$skipfault = $soap_test->result['fault'];
|
||||
$this->totals['fail']++;
|
||||
}
|
||||
#$endpoint_info['tests'][] = &$soap_test;
|
||||
}
|
||||
$soap_test->showTestResult($this->debug, $this->html);
|
||||
$this->_saveResults($endpoint_info['id'], $soap_test);
|
||||
$soap_test->result = NULL;
|
||||
$this->totals['calls']++;
|
||||
}
|
||||
if ($this->numservers && ++$i >= $this->numservers) break;
|
||||
}
|
||||
}
|
||||
|
||||
function doGroupTests() {
|
||||
$dowsdl = array(0,1);
|
||||
foreach($dowsdl as $usewsdl) {
|
||||
$this->useWSDL = $usewsdl;
|
||||
foreach($this->paramTypes as $ptype) {
|
||||
// skip a pointless test
|
||||
if ($usewsdl && $ptype == 'soapval') break;
|
||||
$this->paramType = $ptype;
|
||||
$this->doTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* doTests
|
||||
* go all out. This takes time.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function doTests() {
|
||||
// the mother of all interop tests
|
||||
$dowsdl = array(0,1);
|
||||
foreach($this->tests as $test) {
|
||||
$this->currentTest = $test;
|
||||
foreach($dowsdl as $usewsdl) {
|
||||
$this->useWSDL = $usewsdl;
|
||||
foreach($this->paramTypes as $ptype) {
|
||||
// skip a pointless test
|
||||
if ($usewsdl && $ptype == 'soapval') break;
|
||||
$this->paramType = $ptype;
|
||||
$this->doTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ***********************************************************
|
||||
// output functions
|
||||
|
||||
/**
|
||||
* getResults
|
||||
* retrieve results from the database, stuff them into the endpoint array
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function getMethodList($test = 'base') {
|
||||
// retrieve the results and put them into the endpoint info
|
||||
$sql = "select distinct(function) from results where class='$test' order by function";
|
||||
$results = $this->dbc->getAll($sql);
|
||||
$ar = array();
|
||||
foreach($results as $result) {
|
||||
$ar[] = $result[0];
|
||||
}
|
||||
return $ar;
|
||||
}
|
||||
|
||||
function outputTable()
|
||||
{
|
||||
$methods = $this->getMethodList($this->currentTest);
|
||||
if (!$methods) return;
|
||||
$this->getResults($this->currentTest,$this->paramType,$this->useWSDL);
|
||||
|
||||
echo "<b>Testing $this->currentTest ";
|
||||
if ($this->useWSDL) echo "using WSDL ";
|
||||
else echo "using Direct calls ";
|
||||
echo "with $this->paramType values</b><br>\n";
|
||||
|
||||
// calculate totals for this table
|
||||
$this->totals['success'] = 0;
|
||||
$this->totals['fail'] = 0;
|
||||
$this->totals['servers'] = 0; #count($this->endpoints);
|
||||
foreach ($this->endpoints as $endpoint => $endpoint_info) {
|
||||
if (count($endpoint_info['methods']) > 0) {
|
||||
$this->totals['servers']++;
|
||||
foreach ($methods as $method) {
|
||||
$r = $endpoint_info['methods'][$method]['result'];
|
||||
if ($r == 'OK') $this->totals['success']++;
|
||||
else $this->totals['fail']++;
|
||||
}
|
||||
} else {
|
||||
unset($this->endpoints[$endpoint]);
|
||||
}
|
||||
}
|
||||
$this->totals['calls'] = count($methods) * $this->totals['servers'];
|
||||
|
||||
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";
|
||||
echo "<tr><td class=\"BLANK\">Endpoint</td>\n";
|
||||
foreach ($methods as $method) {
|
||||
$info = split(':', $method);
|
||||
echo "<td class='BLANK' valign='top'>";
|
||||
foreach ($info as $m) {
|
||||
$hi = split(',',$m);
|
||||
echo '<b>'.$hi[0]."</b><br>\n";
|
||||
if (count($hi) > 1) {
|
||||
echo " Actor=".($hi[1]?'Target':'Not Target')."<br>\n";
|
||||
echo " MustUnderstand=$hi[2]<br>\n";
|
||||
}
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$faults = array();
|
||||
$fi = 0;
|
||||
foreach ($this->endpoints as $endpoint => $endpoint_info) {
|
||||
if (array_key_exists('wsdlURL',$endpoint_info)) {
|
||||
echo "<tr><td class=\"BLANK\"><a href=\"{$endpoint_info['wsdlURL']}\">$endpoint</a></td>\n";
|
||||
} else {
|
||||
echo "<tr><td class=\"BLANK\">$endpoint</td>\n";
|
||||
}
|
||||
foreach ($methods as $method) {
|
||||
$id = $endpoint_info['methods'][$method]['id'];
|
||||
$r = $endpoint_info['methods'][$method]['result'];
|
||||
$e = $endpoint_info['methods'][$method]['error'];
|
||||
if ($e) {
|
||||
$faults[$fi++] = $e;
|
||||
}
|
||||
if ($r) {
|
||||
echo "<td class='$r'><a href='$PHP_SELF?wire=$id'>$r</a></td>\n";
|
||||
} else {
|
||||
echo "<td class='untested'>untested</td>\n";
|
||||
}
|
||||
}
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</table><br>\n";
|
||||
if ($this->showFaults && count($faults) > 0) {
|
||||
echo "<b>ERROR Details:</b><br>\n<ul>\n";
|
||||
# output more error detail
|
||||
foreach ($faults as $fault) {
|
||||
echo '<li>'.HTMLSpecialChars($fault)."</li>\n";
|
||||
}
|
||||
}
|
||||
echo "</ul><br><br>\n";
|
||||
}
|
||||
|
||||
function outputTables() {
|
||||
// the mother of all interop tests
|
||||
$dowsdl = array(0,1);
|
||||
foreach($this->tests as $test) {
|
||||
$this->currentTest = $test;
|
||||
foreach($dowsdl as $usewsdl) {
|
||||
$this->useWSDL = $usewsdl;
|
||||
foreach($this->paramTypes as $ptype) {
|
||||
// skip a pointless test
|
||||
if ($usewsdl && $ptype == 'soapval') break;
|
||||
$this->paramType = $ptype;
|
||||
$this->outputTable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showWire($id) {
|
||||
$results = $this->dbc->getAll("select * from results where id=$id",NULL, DB_FETCHMODE_ASSOC );
|
||||
#$wire = preg_replace("/>/",">\n",$results[0]['wire']);
|
||||
$wire = $results[0]['wire'];
|
||||
if ($this->html) print "<pre>";
|
||||
echo "\n".HTMLSpecialChars($wire);
|
||||
if ($this->html) print "</pre>";
|
||||
print "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -1,619 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
define('SOAP_TEST_ACTOR_OTHER','http://some/other/actor');
|
||||
|
||||
class SOAP_Test {
|
||||
var $type = 'php';
|
||||
var $test_name = NULL;
|
||||
var $method_name = NULL;
|
||||
var $method_params = NULL;
|
||||
var $cmp_func = NULL;
|
||||
var $expect = NULL;
|
||||
var $expect_fault = FALSE;
|
||||
var $headers = NULL;
|
||||
var $headers_expect = NULL;
|
||||
var $result = array();
|
||||
var $show = 1;
|
||||
var $debug = 0;
|
||||
var $encoding = 'UTF-8';
|
||||
|
||||
function SOAP_Test($methodname, $params, $expect = NULL, $cmp_func = NULL) {
|
||||
# XXX we have to do this to make php-soap happy with NULL params
|
||||
if (!$params) $params = array();
|
||||
|
||||
if (strchr($methodname,'(')) {
|
||||
preg_match('/(.*)\((.*)\)/',$methodname,$matches);
|
||||
$this->test_name = $methodname;
|
||||
$this->method_name = $matches[1];
|
||||
} else {
|
||||
$this->test_name = $this->method_name = $methodname;
|
||||
}
|
||||
$this->method_params = $params;
|
||||
if ($expect !== NULL) {
|
||||
$this->expect = $expect;
|
||||
}
|
||||
if ($cmp_func !== NULL) {
|
||||
$this->cmp_func = $cmp_func;
|
||||
}
|
||||
|
||||
// determine test type
|
||||
if ($params) {
|
||||
$v = array_values($params);
|
||||
if (gettype($v[0]) == 'object' &&
|
||||
(get_class($v[0]) == 'SoapVar' || get_class($v[0]) == 'SoapParam'))
|
||||
$this->type = 'soapval';
|
||||
}
|
||||
}
|
||||
|
||||
function setResult($ok, $result, $wire, $error = '', $fault = NULL)
|
||||
{
|
||||
$this->result['success'] = $ok;
|
||||
$this->result['result'] = $result;
|
||||
$this->result['error'] = $error;
|
||||
$this->result['wire'] = $wire;
|
||||
$this->result['fault'] = $fault;
|
||||
}
|
||||
|
||||
/**
|
||||
* showMethodResult
|
||||
* print simple output about a methods result
|
||||
*
|
||||
* @param array endpoint_info
|
||||
* @param string method
|
||||
* @access public
|
||||
*/
|
||||
function showTestResult($debug = 0, $html = 0) {
|
||||
// debug output
|
||||
if ($debug) $this->show = 1;
|
||||
if ($debug) {
|
||||
echo str_repeat("-",50).$html?"<br>\n":"\n";
|
||||
}
|
||||
|
||||
echo "testing $this->test_name : ";
|
||||
|
||||
if ($debug) {
|
||||
print "method params: ";
|
||||
print_r($this->params);
|
||||
print "\n";
|
||||
}
|
||||
|
||||
$ok = $this->result['success'];
|
||||
if ($ok) {
|
||||
if ($html) {
|
||||
print "<font color=\"#00cc00\">SUCCESS</font>\n";
|
||||
} else {
|
||||
print "SUCCESS\n";
|
||||
}
|
||||
} else {
|
||||
$fault = $this->result['fault'];
|
||||
if ($fault) {
|
||||
$res = $fault->faultcode;
|
||||
$pos = strpos($res,':');
|
||||
if ($pos !== false) {
|
||||
$res = substr($res,$pos+1);
|
||||
}
|
||||
if ($html) {
|
||||
print "<font color=\"#ff0000\">FAILED: [$res] {$fault->faultstring}</font>\n";
|
||||
} else {
|
||||
print "FAILED: [$res] {$fault->faultstring}\n";
|
||||
}
|
||||
} else {
|
||||
if ($html) {
|
||||
print "<font color=\"#ff0000\">FAILED: ".$this->result['result']."</font>\n";
|
||||
} else {
|
||||
print "FAILED: ".$this->result['result']."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($debug) {
|
||||
if ($html) {
|
||||
echo "<pre>\n".htmlentities($this->result['wire'])."</pre>\n";
|
||||
} else {
|
||||
echo "\n".htmlentities($this->result['wire'])."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# XXX I know this isn't quite right, need to deal with this better
|
||||
function make_2d($x, $y)
|
||||
{
|
||||
for ($_x = 0; $_x < $x; $_x++) {
|
||||
for ($_y = 0; $_y < $y; $_y++) {
|
||||
$a[$_x][$_y] = "x{$_x}y{$_y}";
|
||||
}
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
function soap_value($name, $value, $type, $type_name=NULL, $type_ns=NULL) {
|
||||
return new SoapParam(new SoapVar($value,$type,$type_name,$type_ns),$name);
|
||||
}
|
||||
|
||||
class SOAPStruct {
|
||||
var $varString;
|
||||
var $varInt;
|
||||
var $varFloat;
|
||||
function SOAPStruct($s, $i, $f) {
|
||||
$this->varString = $s;
|
||||
$this->varInt = $i;
|
||||
$this->varFloat = $f;
|
||||
}
|
||||
}
|
||||
|
||||
//***********************************************************
|
||||
// Base echoString
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString', array('inputString' => 'hello world!'));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString', array('inputString' => soap_value('inputString','hello world',XSD_STRING)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(empty)', array('inputString' => ''));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(empty)', array('inputString' => soap_value('inputString','',XSD_STRING)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(null)', array('inputString' => NULL));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(null)', array('inputString' => soap_value('inputString',NULL,XSD_STRING)));
|
||||
//$soap_tests['base'][] = new SOAP_Test('echoString(entities)', array('inputString' => ">,<,&,\",',0:\x00",1:\x01,2:\x02,3:\x03,4:\x04,5:\x05,6:\x06,7:\x07,8:\x08,9:\x09,10:\x0a,11:\x0b,12:\x0c,13:\x0d,14:\x0e,15:\x0f,16:\x10,17:\x11,18:\x12,19:\x13,20:\x14,21:\x15,22:\x16,23:\x17,24:\x18,25:\x19,26:\x1a,27:\x1b,28:\x1c,29:\x1d,30:\x1e,31:\x1f"));
|
||||
//$soap_tests['base'][] = new SOAP_Test('echoString(entities)', array('inputString' => soap_value('inputString',">,<,&,\",',0:\x00",1:\x01,2:\x02,3:\x03,4:\x04,5:\x05,6:\x06,7:\x07,8:\x08,9:\x09,10:\x0a,11:\x0b,12:\x0c,13:\x0d,14:\x0e,15:\x0f,16:\x10,17:\x11,18:\x12,19:\x13,20:\x14,21:\x15,22:\x16,23:\x17,24:\x18,25:\x19,26:\x1a,27:\x1b,28:\x1c,29:\x1d,30:\x1e,31:\x1f",XSD_STRING)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(entities)', array('inputString' => ">,<,&,\",',\\,\n"));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoString(entities)', array('inputString' => soap_value('inputString',">,<,&,\",',\\,\n",XSD_STRING)));
|
||||
$test = new SOAP_Test('echoString(utf-8)', array('inputString' => utf8_encode('ỗÈéóÒ₧⅜ỗỸ')));
|
||||
$test->encoding = 'UTF-8';
|
||||
$soap_tests['base'][] = $test;
|
||||
$test = new SOAP_Test('echoString(utf-8)', array('inputString' => soap_value('inputString',utf8_encode('ỗÈéóÒ₧⅜ỗỸ'),XSD_STRING)));
|
||||
$test->encoding = 'UTF-8';
|
||||
$soap_tests['base'][] = $test;
|
||||
|
||||
//***********************************************************
|
||||
// Base echoStringArray
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray',
|
||||
array('inputStringArray' => array('good','bad')));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray',
|
||||
array('inputStringArray' =>
|
||||
soap_value('inputStringArray',array('good','bad'),SOAP_ENC_ARRAY,"ArrayOfstring","http://soapinterop.org/xsd")));
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(one)',
|
||||
array('inputStringArray' => array('good')));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(one)',
|
||||
array('inputStringArray' =>
|
||||
soap_value('inputStringArray',array('good'),SOAP_ENC_ARRAY,"ArrayOfstring","http://soapinterop.org/xsd")));
|
||||
|
||||
// empty array test
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(empty)', array('inputStringArray' => array()));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(empty)', array('inputStringArray' => soap_value('inputStringArray',array(),SOAP_ENC_ARRAY,"ArrayOfstring","http://soapinterop.org/xsd")));
|
||||
|
||||
# XXX NULL Arrays not supported
|
||||
// null array test
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(null)', array('inputStringArray' => NULL));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStringArray(null)', array('inputStringArray' => soap_value('inputStringArray',NULL,SOAP_ENC_ARRAY,"ArrayOfstring","http://soapinterop.org/xsd")));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoInteger
|
||||
$x = new SOAP_Test('echoInteger', array('inputInteger' => 34345));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoInteger', array('inputInteger' => 34345));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoInteger', array('inputInteger' => soap_value('inputInteger',12345,XSD_INT)));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoIntegerArray
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoIntegerArray', array('inputIntegerArray' => array(1,234324324,2)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoIntegerArray',
|
||||
array('inputIntegerArray' =>
|
||||
soap_value('inputIntegerArray',
|
||||
array(new SoapVar(12345,XSD_INT),new SoapVar(654321,XSD_INT)),
|
||||
SOAP_ENC_ARRAY,"ArrayOfint","http://soapinterop.org/xsd")));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoFloat
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoFloat', array('inputFloat' => 342.23));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoFloat', array('inputFloat' => soap_value('inputFloat',123.45,XSD_FLOAT)));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoFloatArray
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoFloatArray', array('inputFloatArray' => array(1.3223,34.2,325.325)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoFloatArray',
|
||||
array('inputFloatArray' =>
|
||||
soap_value('inputFloatArray',
|
||||
array(new SoapVar(123.45,XSD_FLOAT),new SoapVar(654.321,XSD_FLOAT)),
|
||||
SOAP_ENC_ARRAY,"ArrayOffloat","http://soapinterop.org/xsd")));
|
||||
//***********************************************************
|
||||
// Base echoStruct
|
||||
|
||||
$soapstruct = new SOAPStruct('arg',34,325.325);
|
||||
# XXX no way to set a namespace!!!
|
||||
$soapsoapstruct = soap_value('inputStruct',$soapstruct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd");
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStruct', array('inputStruct' =>$soapstruct));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStruct', array('inputStruct' =>$soapsoapstruct));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoStructArray
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStructArray', array('inputStructArray' => array(
|
||||
$soapstruct,$soapstruct,$soapstruct)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoStructArray', array('inputStructArray' =>
|
||||
soap_value('inputStructArray',array(
|
||||
new SoapVar($soapstruct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
new SoapVar($soapstruct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
new SoapVar($soapstruct,SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd")),
|
||||
SOAP_ENC_ARRAY,"ArrayOfSOAPStruct","http://soapinterop.org/xsd")));
|
||||
|
||||
|
||||
//***********************************************************
|
||||
// Base echoVoid
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoVoid', NULL);
|
||||
$test = new SOAP_Test('echoVoid', NULL);
|
||||
$test->type = 'soapval';
|
||||
$soap_tests['base'][] = $test;
|
||||
|
||||
//***********************************************************
|
||||
// Base echoBase64
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBase64', array('inputBase64' => 'TmVicmFza2E='));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBase64', array('inputBase64' =>
|
||||
soap_value('inputBase64','TmVicmFza2E=',XSD_BASE64BINARY)));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoHexBinary
|
||||
|
||||
$soap_tests['base'][] = new SOAP_Test('echoHexBinary', array('inputHexBinary' => '736F61707834'),'736F61707834','hex_compare');
|
||||
$soap_tests['base'][] = new SOAP_Test('echoHexBinary', array('inputHexBinary' =>
|
||||
soap_value('inputHexBinary','736F61707834',XSD_HEXBINARY)),'736F61707834','hex_compare');
|
||||
|
||||
//***********************************************************
|
||||
// Base echoDecimal
|
||||
|
||||
# XXX test fails because php-soap incorrectly sets decimal to long rather than float
|
||||
$soap_tests['base'][] = new SOAP_Test('echoDecimal', array('inputDecimal' => '12345.67890'));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoDecimal', array('inputDecimal' =>
|
||||
soap_value('inputDecimal','12345.67890',XSD_DECIMAL)));
|
||||
|
||||
//***********************************************************
|
||||
// Base echoDate
|
||||
|
||||
# php-soap doesn't handle datetime types properly yet
|
||||
$soap_tests['base'][] = new SOAP_Test('echoDate', array('inputDate' => '2001-05-24T17:31:41Z'), null, 'date_compare');
|
||||
$soap_tests['base'][] = new SOAP_Test('echoDate', array('inputDate' =>
|
||||
soap_value('inputDate','2001-05-24T17:31:41Z',XSD_DATETIME)), null, 'date_compare');
|
||||
|
||||
//***********************************************************
|
||||
// Base echoBoolean
|
||||
|
||||
# php-soap sends boolean as zero or one, which is ok, but to be explicit, send true or false.
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(true)', array('inputBoolean' => TRUE));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(true)', array('inputBoolean' =>
|
||||
soap_value('inputBoolean',TRUE,XSD_BOOLEAN)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(false)', array('inputBoolean' => FALSE));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(false)', array('inputBoolean' =>
|
||||
soap_value('inputBoolean',FALSE,XSD_BOOLEAN)));
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(1)', array('inputBoolean' => 1),true);
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(1)', array('inputBoolean' =>
|
||||
soap_value('inputBoolean',1,XSD_BOOLEAN)),true);
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(0)', array('inputBoolean' => 0),false);
|
||||
$soap_tests['base'][] = new SOAP_Test('echoBoolean(0)', array('inputBoolean' =>
|
||||
soap_value('inputBoolean',0,XSD_BOOLEAN)),false);
|
||||
|
||||
|
||||
|
||||
//***********************************************************
|
||||
// GROUP B
|
||||
|
||||
|
||||
//***********************************************************
|
||||
// GroupB echoStructAsSimpleTypes
|
||||
|
||||
$expect = array(
|
||||
'outputString'=>'arg',
|
||||
'outputInteger'=>34,
|
||||
'outputFloat'=>325.325
|
||||
);
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoStructAsSimpleTypes',
|
||||
array('inputStruct' => (object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325
|
||||
)), $expect);
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoStructAsSimpleTypes',
|
||||
array('inputStruct' =>
|
||||
soap_value('inputStruct',
|
||||
(object)array('varString' => 'arg',
|
||||
'varInt' => 34,
|
||||
'varFloat' => 325.325
|
||||
), SOAP_ENC_OBJECT, "SOAPStruct","http://soapinterop.org/xsd")), $expect);
|
||||
|
||||
//***********************************************************
|
||||
// GroupB echoSimpleTypesAsStruct
|
||||
|
||||
$expect =
|
||||
(object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325
|
||||
);
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoSimpleTypesAsStruct',
|
||||
array(
|
||||
'inputString'=>'arg',
|
||||
'inputInteger'=>34,
|
||||
'inputFloat'=>325.325
|
||||
), $expect);
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoSimpleTypesAsStruct',
|
||||
array(
|
||||
soap_value('inputString','arg', XSD_STRING),
|
||||
soap_value('inputInteger',34, XSD_INT),
|
||||
soap_value('inputFloat',325.325, XSD_FLOAT)
|
||||
), $expect);
|
||||
|
||||
//***********************************************************
|
||||
// GroupB echo2DStringArray
|
||||
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echo2DStringArray',
|
||||
array('input2DStringArray' => make_2d(3,3)));
|
||||
|
||||
$multidimarray =
|
||||
soap_value('input2DStringArray',
|
||||
array(
|
||||
array('row0col0', 'row0col1', 'row0col2'),
|
||||
array('row1col0', 'row1col1', 'row1col2')
|
||||
), SOAP_ENC_ARRAY
|
||||
);
|
||||
//$multidimarray->options['flatten'] = TRUE;
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echo2DStringArray',
|
||||
array('input2DStringArray' => $multidimarray));
|
||||
|
||||
//***********************************************************
|
||||
// GroupB echoNestedStruct
|
||||
|
||||
$strstr = (object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325,
|
||||
'varStruct' => (object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325
|
||||
));
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoNestedStruct',
|
||||
array('inputStruct' => $strstr));
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoNestedStruct',
|
||||
array('inputStruct' =>
|
||||
soap_value('inputStruct',
|
||||
(object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325,
|
||||
'varStruct' => new SoapVar((object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325
|
||||
), SOAP_ENC_OBJECT, "SOAPStruct","http://soapinterop.org/xsd")
|
||||
), SOAP_ENC_OBJECT, "SOAPStructStruct","http://soapinterop.org/xsd"
|
||||
)),$strstr);
|
||||
|
||||
//***********************************************************
|
||||
// GroupB echoNestedArray
|
||||
|
||||
$arrstr = (object)array(
|
||||
'varString'=>'arg',
|
||||
'varInt'=>34,
|
||||
'varFloat'=>325.325,
|
||||
'varArray' => array('red','blue','green')
|
||||
);
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoNestedArray',
|
||||
array('inputStruct' => $arrstr));
|
||||
$soap_tests['GroupB'][] = new SOAP_Test('echoNestedArray',
|
||||
array('inputStruct' =>
|
||||
soap_value('inputStruct',
|
||||
(object)array('varString' => 'arg',
|
||||
'varInt' => 34,
|
||||
'varFloat' => 325.325,
|
||||
'varArray' =>
|
||||
new SoapVar(array("red", "blue", "green"), SOAP_ENC_ARRAY, "ArrayOfstring","http://soapinterop.org/xsd")
|
||||
), SOAP_ENC_OBJECT, "SOAPArrayStruct","http://soapinterop.org/xsd"
|
||||
)),$arrstr);
|
||||
|
||||
|
||||
//***********************************************************
|
||||
// GROUP C header tests
|
||||
|
||||
//***********************************************************
|
||||
// echoMeStringRequest
|
||||
|
||||
// echoMeStringRequest with endpoint as header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 0, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 0, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStringRequest with endpoint as header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array('echoMeStringResponse'=>'hello world');
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStringRequest with endpoint NOT header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 0, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=0 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world',XSD_STRING), 0, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStringRequest with endpoint NOT header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest mustUnderstand=1 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStringRequest', new SoapVar('hello world', XSD_STRING), 1, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStringRequest with endpoint header destination, must understand,
|
||||
// invalid namespace, should receive a fault
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest invalid namespace)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://unknown.org/echoheader/','echoMeStringRequest', 'hello world', 1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$test->expect_fault = TRUE;
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStringRequest invalid namespace)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://unknown.org/echoheader/','echoMeStringRequest', new SoapVar('hello world', XSD_STRING), 1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$test->expect_fault = TRUE;
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
//***********************************************************
|
||||
// echoMeStructRequest
|
||||
|
||||
// echoMeStructRequest with endpoint as header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SOAPStruct('arg',34,325.325), 0, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect =
|
||||
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
0, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect =
|
||||
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStructRequest with endpoint as header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SOAPStruct('arg',34,325.325), 1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect =
|
||||
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
1, SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect =
|
||||
array('echoMeStructResponse'=> (object)array('varString'=>'arg','varInt'=>34,'varFloat'=>325.325));
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStructRequest with endpoint NOT header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SOAPStruct('arg',34,325.325), 0, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=0 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
0, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeStructRequest with endpoint NOT header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SOAPStruct('arg',34,325.325), 1, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeStructRequest mustUnderstand=1 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeStructRequest',
|
||||
new SoapVar(new SOAPStruct('arg',34,325.325),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd"),
|
||||
1, SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
//***********************************************************
|
||||
// echoMeUnknown
|
||||
|
||||
// echoMeUnknown with endpoint as header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',0,SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),0,SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeUnknown with endpoint as header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=next)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',1,SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$test->expect_fault = TRUE;
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=next)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),1,SOAP_ACTOR_NEXT);
|
||||
$test->headers_expect = array();
|
||||
$test->expect_fault = TRUE;
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeUnknown with endpoint NOT header destination, doesn't have to understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',0,SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=0 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),0,SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
// echoMeUnknown with endpoint NOT header destination, must understand
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=other)', NULL);
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', 'nobody understands me!',1,SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
|
||||
$test = new SOAP_Test('echoVoid(echoMeUnknown mustUnderstand=1 actor=other)', NULL);
|
||||
$test->type = 'soapval';
|
||||
$test->headers[] = new SoapHeader('http://soapinterop.org/echoheader/','echoMeUnknown', new SoapVar('nobody understands me!',XSD_STRING),1,SOAP_TEST_ACTOR_OTHER);
|
||||
$test->headers_expect = array();
|
||||
$soap_tests['GroupC'][] = $test;
|
||||
?>
|
@ -1,73 +0,0 @@
|
||||
<?php
|
||||
// NOTE: do not run this directly under a web server, as it will take a very long
|
||||
// time to execute. Run from a command line or something, and redirect output
|
||||
// to an html file.
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
require_once 'client_round2_interop.php';
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
TD { background-color: Red; }
|
||||
TD.BLANK { background-color: White; }
|
||||
TD.OK { background-color: Lime; }
|
||||
TD.RESULT { background-color: Green; }
|
||||
TD.untested { background-color: White; }
|
||||
TD.CONNECT { background-color: Yellow; }
|
||||
TD.TRANSPORT { background-color: Yellow; }
|
||||
TD.WSDL { background-color: Yellow; }
|
||||
TD.WSDLCACHE { background-color: Yellow; }
|
||||
TD.WSDLPARSER { background-color: Yellow; }
|
||||
TD.HTTP { background-color: Yellow; }
|
||||
TD.SMTP { background-color: Yellow; }
|
||||
</style>
|
||||
<title>PHP SOAP Client Interop Test Results</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="White" text="Black">
|
||||
<h2 align="center">PHP SOAP Client Interop Test Results: Round2</h2>
|
||||
|
||||
<a href="index.php">Back to Interop Index</a><br>
|
||||
<p> </p>
|
||||
|
||||
<?php
|
||||
$iop = new Interop_Client();
|
||||
|
||||
if ($_GET['detail'] == 1) $iop->showFaults = 1;
|
||||
|
||||
if ($_GET['wire']) {
|
||||
$iop->showWire($_GET['wire']);
|
||||
} else {
|
||||
$iop->getEndpoints();
|
||||
$iop->getResults();
|
||||
|
||||
if ($_GET['test']) {
|
||||
$iop->currentTest = $_GET['test'];
|
||||
$iop->useWSDL = $_GET['wsdl']?$_GET['wsdl']:0;
|
||||
$iop->paramType = $_GET['type']?$_GET['type']:'php';
|
||||
$iop->outputTable();
|
||||
} else {
|
||||
$iop->outputTables();
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
@ -1,50 +0,0 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
set_time_limit(0);
|
||||
require_once 'client_round2_interop.php';
|
||||
|
||||
$iop = new Interop_Client();
|
||||
$iop->html = 0;
|
||||
|
||||
// force a fetch of endpoints, this happens regardless if no endpoints in database
|
||||
$iop->fetchEndpoints();
|
||||
|
||||
// set some options
|
||||
$iop->currentTest = 'GroupC'; // see $tests above
|
||||
$iop->paramType = 'php'; // 'php' or 'soapval'
|
||||
$iop->useWSDL = 1; // 1= do wsdl tests
|
||||
$iop->numServers = 0; // 0 = all
|
||||
//$iop->specificEndpoint = 'PHP ext/soap'; // test only this endpoint
|
||||
//$iop->testMethod = 'echoString'; // test only this method
|
||||
|
||||
// endpoints to skip
|
||||
//$iop->skipEndpointList = array('Apache Axis','IONA XMLBus','IONA XMLBus (CORBA)','MS SOAP ToolKit 2.0','MS SOAP ToolKit 3.0','Spheon JSOAP','SQLData SOAP Server','WASP Advanced 3.0');
|
||||
$iop->startAt='';
|
||||
$iop->nosave = 0; // 1= disable saving results to database
|
||||
// debug output
|
||||
$iop->show = 1;
|
||||
$iop->debug = 0;
|
||||
$iop->showFaults = 0; // used in result table output
|
||||
|
||||
$iop->doTest(); // run a single set of tests using above options
|
||||
#$iop->doGroupTests(); // run a group of tests set in $currentTest
|
||||
#$iop->doTests(); // run all tests, ignore above options
|
||||
#$iop->outputTables();
|
||||
echo "done\n";
|
||||
|
||||
?>
|
@ -1,5 +0,0 @@
|
||||
<?php
|
||||
// configuration items
|
||||
$interopConfig['DSN'] = 'mysql://root@localhost/soapinterop';
|
||||
$interopConfig['baseURL'] = 'http://localhost/soap/interop';
|
||||
?>
|
@ -1,44 +0,0 @@
|
||||
# phpMyAdmin MySQL-Dump
|
||||
# version 2.2.5
|
||||
# http://phpwizard.net/phpMyAdmin/
|
||||
# http://phpmyadmin.sourceforge.net/ (download page)
|
||||
#
|
||||
# Host: localhost
|
||||
# Generation Time: Apr 08, 2002 at 08:32 PM
|
||||
# Server version: 3.23.49
|
||||
# PHP Version: 4.1.1
|
||||
# Database : `interop`
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Table structure for table `endpoints`
|
||||
#
|
||||
|
||||
CREATE TABLE endpoints (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
endpointName varchar(50) NOT NULL default '',
|
||||
endpointURL varchar(255) NOT NULL default '',
|
||||
wsdlURL varchar(255) NOT NULL default '',
|
||||
class varchar(20) NOT NULL default '',
|
||||
status int(11) NOT NULL default '1',
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
# --------------------------------------------------------
|
||||
|
||||
#
|
||||
# Table structure for table `results`
|
||||
#
|
||||
|
||||
CREATE TABLE results (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
endpoint int(11) NOT NULL default '0',
|
||||
stamp int(11) NOT NULL default '0',
|
||||
class varchar(10) NOT NULL default '',
|
||||
type varchar(10) default NULL,
|
||||
wsdl int(11) NOT NULL default '0',
|
||||
function varchar(255) NOT NULL default '',
|
||||
result varchar(25) NOT NULL default '',
|
||||
error text,
|
||||
wire text NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
@ -1,398 +0,0 @@
|
||||
<?php
|
||||
header("Content-Type: text/xml");
|
||||
echo '<?xml version="1.0"?>';
|
||||
echo "\n";
|
||||
?>
|
||||
<definitions name="InteropTest" targetNamespace="http://soapinterop.org/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:s="http://soapinterop.org/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
|
||||
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
|
||||
<complexType name="ArrayOfstring">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfint">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOffloat">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfSOAPStruct">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="SOAPStruct">
|
||||
<all>
|
||||
<element name="varString" type="string" nillable="true"/>
|
||||
<element name="varInt" type="int" nillable="true"/>
|
||||
<element name="varFloat" type="float" nillable="true"/>
|
||||
</all>
|
||||
</complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoHeaderString_Request">
|
||||
<part name="echoMeStringRequest" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoHeaderString_Response">
|
||||
<part name="echoMeStringResponse" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoHeaderStruct_Request">
|
||||
<part name="echoMeStructRequest" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoHeaderStruct_Response">
|
||||
<part name="echoMeStructResponse" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStringRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringResponse">
|
||||
<part name="return" type="xsd:string"/>
|
||||
</message>
|
||||
<message name="echoStringArrayRequest">
|
||||
<part name="inputStringArray" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfstring"/>
|
||||
</message>
|
||||
<message name="echoIntegerRequest">
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerResponse">
|
||||
<part name="return" type="xsd:int"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayRequest">
|
||||
<part name="inputIntegerArray" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoIntegerArrayResponse">
|
||||
<part name="return" type="s:ArrayOfint"/>
|
||||
</message>
|
||||
<message name="echoFloatRequest">
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatResponse">
|
||||
<part name="return" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayRequest">
|
||||
<part name="inputFloatArray" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoFloatArrayResponse">
|
||||
<part name="return" type="s:ArrayOffloat"/>
|
||||
</message>
|
||||
<message name="echoStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayRequest">
|
||||
<part name="inputStructArray" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructArrayResponse">
|
||||
<part name="return" type="s:ArrayOfSOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoVoidRequest"/>
|
||||
<message name="echoVoidResponse"/>
|
||||
<message name="echoBase64Request">
|
||||
<part name="inputBase64" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoBase64Response">
|
||||
<part name="return" type="xsd:base64Binary"/>
|
||||
</message>
|
||||
<message name="echoDateRequest">
|
||||
<part name="inputDate" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoDateResponse">
|
||||
<part name="return" type="xsd:dateTime"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryRequest">
|
||||
<part name="inputHexBinary" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoHexBinaryResponse">
|
||||
<part name="return" type="xsd:hexBinary"/>
|
||||
</message>
|
||||
<message name="echoDecimalRequest">
|
||||
<part name="inputDecimal" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoDecimalResponse">
|
||||
<part name="return" type="xsd:decimal"/>
|
||||
</message>
|
||||
<message name="echoBooleanRequest">
|
||||
<part name="inputBoolean" type="xsd:boolean"/>
|
||||
</message>
|
||||
<message name="echoBooleanResponse">
|
||||
<part name="return" type="xsd:boolean"/>
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortType">
|
||||
<operation name="echoString" parameterOrder="inputString">
|
||||
<input message="tns:echoStringRequest"/>
|
||||
<output message="tns:echoStringResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStringArray" parameterOrder="inputStringArray">
|
||||
<input message="tns:echoStringArrayRequest"/>
|
||||
<output message="tns:echoStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoInteger" parameterOrder="inputInteger">
|
||||
<input message="tns:echoIntegerRequest"/>
|
||||
<output message="tns:echoIntegerResponse"/>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray" parameterOrder="inputIntegerArray">
|
||||
<input message="tns:echoIntegerArrayRequest"/>
|
||||
<output message="tns:echoIntegerArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloat" parameterOrder="inputFloat">
|
||||
<input message="tns:echoFloatRequest"/>
|
||||
<output message="tns:echoFloatResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloatArray" parameterOrder="inputFloatArray">
|
||||
<input message="tns:echoFloatArrayRequest"/>
|
||||
<output message="tns:echoFloatArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoStructRequest"/>
|
||||
<output message="tns:echoStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStructArray" parameterOrder="inputStructArray">
|
||||
<input message="tns:echoStructArrayRequest"/>
|
||||
<output message="tns:echoStructArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<input message="tns:echoVoidRequest"/>
|
||||
<output message="tns:echoVoidResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBase64" parameterOrder="inputBase64">
|
||||
<input message="tns:echoBase64Request"/>
|
||||
<output message="tns:echoBase64Response"/>
|
||||
</operation>
|
||||
<operation name="echoDate" parameterOrder="inputDate">
|
||||
<input message="tns:echoDateRequest"/>
|
||||
<output message="tns:echoDateResponse"/>
|
||||
</operation>
|
||||
<operation name="echoHexBinary" parameterOrder="inputHexBinary">
|
||||
<input message="tns:echoHexBinaryRequest"/>
|
||||
<output message="tns:echoHexBinaryResponse"/>
|
||||
</operation>
|
||||
<operation name="echoDecimal" parameterOrder="inputDecimal">
|
||||
<input message="tns:echoDecimalRequest"/>
|
||||
<output message="tns:echoDecimalResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBoolean" parameterOrder="inputBoolean">
|
||||
<input message="tns:echoBooleanRequest"/>
|
||||
<output message="tns:echoBooleanResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropEchoHeaderBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Request" part="echoMeStringRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Request" part="echoMeStructRequest" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderString_Response" part="echoMeStringResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
<soap:header use="encoded" message="tns:echoHeaderStruct_Response" part="echoMeStructResponse" namespace="http://soapinterop.org/echoheader/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
|
||||
</binding>
|
||||
|
||||
<service name="interopLabEchoHeader">
|
||||
|
||||
<port name="interopPortEchoHdr" binding="tns:InteropEchoHeaderBinding">
|
||||
<soap:address location="<?php echo ((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']));?>/server_round2_groupC.php"/>
|
||||
</port>
|
||||
|
||||
</service>
|
||||
</definitions>
|
@ -1,59 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>PHP SOAP Interop</title>
|
||||
</head>
|
||||
<?php
|
||||
// get our endpoint
|
||||
$server = $_SERVER['HTTP_HOST'].':'.$_SERVER['SERVER_PORT'];
|
||||
$base = (isset($_SERVER['HTTPS'])?"https://":"http://").$server.dirname($_SERVER['PHP_SELF'])."/interop.wsdl.php";
|
||||
$groupb = (isset($_SERVER['HTTPS'])?"https://":"http://").$server.dirname($_SERVER['PHP_SELF'])."/interopB.wsdl.php";
|
||||
$groupc = (isset($_SERVER['HTTPS'])?"https://":"http://").$server.dirname($_SERVER['PHP_SELF'])."/echoheadersvc.wsdl.php";
|
||||
?>
|
||||
<body>
|
||||
|
||||
<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>Round 2 Interop Server</h3>
|
||||
Base WSDL: <a href="<?php echo $base ?>"><?php echo $base ?></a><br>
|
||||
Group B WSDL: <a href="<?php echo $groupb ?>"><?php echo $groupb ?></a><br>
|
||||
Group C WSDL: <a href="<?php echo $groupc ?>"><?php echo $groupc ?></a><br>
|
||||
|
||||
<h3>Interop Client</h3>
|
||||
|
||||
<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 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 PHP SOAP
|
||||
Client against a chosen 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 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.</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>
|
||||
<li><a href="client_round2_results.php?test=base&type=php&wsdl=1">Base results using PHP native types with WSDL</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupB&type=php&wsdl=0">Group B results using PHP native types</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupB&type=soapval&wsdl=0">Group B results using SOAP types</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupB&type=php&wsdl=1">Group B results using PHP native types with WSDL</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupC&type=php&wsdl=0">Group C results using PHP native types</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupC&type=soapval&wsdl=0">Group C results using SOAP types</a></li>
|
||||
<li><a href="client_round2_results.php?test=GroupC&type=php&wsdl=1">Group C results using PHP native types with WSDL</a></li>
|
||||
<li><a href="client_round2_results.php">Show All Results</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
@ -1,336 +0,0 @@
|
||||
<?php
|
||||
header("Content-Type: text/xml");
|
||||
echo '<?xml version="1.0"?>';
|
||||
echo "\n";
|
||||
?>
|
||||
<definitions name="InteropTest"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns:s="http://soapinterop.org/xsd"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
targetNamespace="http://soapinterop.org/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://soapinterop.org/xsd">
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
|
||||
<xsd:complexType name="ArrayOfstring">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="SOAP-ENC:Array">
|
||||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ArrayOfint">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="SOAP-ENC:Array">
|
||||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ArrayOffloat">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="SOAP-ENC:Array">
|
||||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="SOAPStruct">
|
||||
<xsd:all>
|
||||
<xsd:element name="varString" type="string"/>
|
||||
<xsd:element name="varInt" type="int"/>
|
||||
<xsd:element name="varFloat" type="float"/>
|
||||
</xsd:all>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="ArrayOfSOAPStruct">
|
||||
<xsd:complexContent>
|
||||
<xsd:restriction base="SOAP-ENC:Array">
|
||||
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</xsd:restriction>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoStringRequest">
|
||||
<part name="inputString" type="xsd:string" />
|
||||
</message>
|
||||
<message name="echoStringResponse">
|
||||
<part name="outputString" type="xsd:string" />
|
||||
</message>
|
||||
<message name="echoStringArrayRequest">
|
||||
<part name="inputStringArray" type="s:ArrayOfstring" />
|
||||
</message>
|
||||
<message name="echoStringArrayResponse">
|
||||
<part name="outputStringArray" type="s:ArrayOfstring" />
|
||||
</message>
|
||||
<message name="echoIntegerRequest">
|
||||
<part name="inputInteger" type="xsd:int" />
|
||||
</message>
|
||||
<message name="echoIntegerResponse">
|
||||
<part name="outputInteger" type="xsd:int" />
|
||||
</message>
|
||||
<message name="echoIntegerArrayRequest">
|
||||
<part name="inputIntegerArray" type="s:ArrayOfint" />
|
||||
</message>
|
||||
<message name="echoIntegerArrayResponse">
|
||||
<part name="outputIntegerArray" type="s:ArrayOfint" />
|
||||
</message>
|
||||
<message name="echoFloatRequest">
|
||||
<part name="inputFloat" type="xsd:float" />
|
||||
</message>
|
||||
<message name="echoFloatResponse">
|
||||
<part name="outputFloat" type="xsd:float" />
|
||||
</message>
|
||||
<message name="echoFloatArrayRequest">
|
||||
<part name="inputFloatArray" type="s:ArrayOffloat" />
|
||||
</message>
|
||||
<message name="echoFloatArrayResponse">
|
||||
<part name="outputFloatArray" type="s:ArrayOffloat" />
|
||||
</message>
|
||||
<message name="echoStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct" />
|
||||
</message>
|
||||
<message name="echoStructResponse">
|
||||
<part name="outputStruct" type="s:SOAPStruct" />
|
||||
</message>
|
||||
<message name="echoStructArrayRequest">
|
||||
<part name="inputStructArray" type="s:ArrayOfSOAPStruct" />
|
||||
</message>
|
||||
<message name="echoStructArrayResponse">
|
||||
<part name="outputStructArray" type="s:ArrayOfSOAPStruct" />
|
||||
</message>
|
||||
<message name="echoVoidRequest">
|
||||
</message>
|
||||
<message name="echoVoidResponse">
|
||||
</message>
|
||||
<message name="echoBase64Request">
|
||||
<part name="inputBase64" type="xsd:base64Binary" />
|
||||
</message>
|
||||
<message name="echoBase64Response">
|
||||
<part name="outputBase64" type="xsd:base64Binary" />
|
||||
</message>
|
||||
<message name="echoDateRequest">
|
||||
<part name="inputDate" type="xsd:dateTime" />
|
||||
</message>
|
||||
<message name="echoDateResponse">
|
||||
<part name="outputDate" type="xsd:dateTime" />
|
||||
</message>
|
||||
<message name="echoHexBinaryRequest">
|
||||
<part name="inputHexBinary" type="xsd:hexBinary" />
|
||||
</message>
|
||||
<message name="echoHexBinaryResponse">
|
||||
<part name="outputHexBinary" type="xsd:hexBinary" />
|
||||
</message>
|
||||
<message name="echoDecimalRequest">
|
||||
<part name="inputDecimal" type="xsd:decimal" />
|
||||
</message>
|
||||
<message name="echoDecimalResponse">
|
||||
<part name="outputDecimal" type="xsd:decimal" />
|
||||
</message>
|
||||
<message name="echoBooleanRequest">
|
||||
<part name="inputBoolean" type="xsd:boolean" />
|
||||
</message>
|
||||
<message name="echoBooleanResponse">
|
||||
<part name="outputBoolean" type="xsd:boolean" />
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortType">
|
||||
<operation name="echoString">
|
||||
<input message="tns:echoStringRequest"/>
|
||||
<output message="tns:echoStringResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<input message="tns:echoStringArrayRequest"/>
|
||||
<output message="tns:echoStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<input message="tns:echoIntegerRequest"/>
|
||||
<output message="tns:echoIntegerResponse"/>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<input message="tns:echoIntegerArrayRequest"/>
|
||||
<output message="tns:echoIntegerArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<input message="tns:echoFloatRequest"/>
|
||||
<output message="tns:echoFloatResponse"/>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<input message="tns:echoFloatArrayRequest"/>
|
||||
<output message="tns:echoFloatArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<input message="tns:echoStructRequest"/>
|
||||
<output message="tns:echoStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<input message="tns:echoStructArrayRequest"/>
|
||||
<output message="tns:echoStructArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<input message="tns:echoVoidRequest"/>
|
||||
<output message="tns:echoVoidResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<input message="tns:echoBase64Request"/>
|
||||
<output message="tns:echoBase64Response"/>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<input message="tns:echoDateRequest"/>
|
||||
<output message="tns:echoDateResponse"/>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<input message="tns:echoHexBinaryRequest"/>
|
||||
<output message="tns:echoHexBinaryResponse"/>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<input message="tns:echoDecimalRequest"/>
|
||||
<output message="tns:echoDecimalResponse"/>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<input message="tns:echoBooleanRequest"/>
|
||||
<output message="tns:echoBooleanResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropTestBinding" type="tns:InteropTestPortType">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoString">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStringArray">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoInteger">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoIntegerArray">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloat">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoFloatArray">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStruct">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoStructArray">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoVoid">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBase64">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDate">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoHexBinary">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoDecimal">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoBoolean">
|
||||
<soap:operation soapAction="http://" style="rpc"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="InteropTest">
|
||||
<port name="InteropTestPort" binding="tns:InteropTestBinding">
|
||||
<soap:address location="<?php echo ((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']));?>/server_round2_base.php"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
@ -1,196 +0,0 @@
|
||||
<?php
|
||||
header("Content-Type: text/xml");
|
||||
echo '<?xml version="1.0"?>';
|
||||
echo "\n";
|
||||
?>
|
||||
<definitions name="InteropTest"
|
||||
targetNamespace="http://soapinterop.org/"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
||||
xmlns:tns="http://soapinterop.org/"
|
||||
xmlns:s="http://soapinterop.org/xsd"
|
||||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||
|
||||
<types>
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://soapinterop.org/xsd">
|
||||
|
||||
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
|
||||
<complexType name="ArrayOfstring">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfint">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="int[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOffloat">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="float[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfSOAPStruct">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="s:SOAPStruct[]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
<complexType name="SOAPStruct">
|
||||
<all>
|
||||
<element name="varString" type="string" nillable="true"/>
|
||||
<element name="varInt" type="int" nillable="true"/>
|
||||
<element name="varFloat" type="float" nillable="true"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPStructStruct">
|
||||
<all>
|
||||
<element name="varString" type="string" nillable="true"/>
|
||||
<element name="varInt" type="int" nillable="true"/>
|
||||
<element name="varFloat" type="float" nillable="true"/>
|
||||
<element name="varStruct" type="s:SOAPStruct"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="SOAPArrayStruct">
|
||||
<all>
|
||||
<element name="varString" type="string" nillable="true"/>
|
||||
<element name="varInt" type="int" nillable="true"/>
|
||||
<element name="varFloat" type="float" nillable="true"/>
|
||||
<element name="varArray" type="s:ArrayOfstring"/>
|
||||
</all>
|
||||
</complexType>
|
||||
<complexType name="ArrayOfString2D">
|
||||
<complexContent>
|
||||
<restriction base="SOAP-ENC:Array">
|
||||
<attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="string[,]"/>
|
||||
</restriction>
|
||||
</complexContent>
|
||||
</complexType>
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<message name="echoStructAsSimpleTypesRequest">
|
||||
<part name="inputStruct" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echoStructAsSimpleTypesResponse">
|
||||
<part name="outputString" type="xsd:string"/>
|
||||
<part name="outputInteger" type="xsd:int"/>
|
||||
<part name="outputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructRequest">
|
||||
<part name="inputString" type="xsd:string"/>
|
||||
<part name="inputInteger" type="xsd:int"/>
|
||||
<part name="inputFloat" type="xsd:float"/>
|
||||
</message>
|
||||
<message name="echoSimpleTypesAsStructResponse">
|
||||
<part name="return" type="s:SOAPStruct"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayRequest">
|
||||
<part name="input2DStringArray" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echo2DStringArrayResponse">
|
||||
<part name="return" type="s:ArrayOfString2D"/>
|
||||
</message>
|
||||
<message name="echoNestedStructRequest">
|
||||
<part name="inputStruct" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedStructResponse">
|
||||
<part name="return" type="s:SOAPStructStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayRequest">
|
||||
<part name="inputStruct" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
<message name="echoNestedArrayResponse">
|
||||
<part name="return" type="s:SOAPArrayStruct"/>
|
||||
</message>
|
||||
|
||||
<portType name="InteropTestPortTypeB">
|
||||
<operation name="echoStructAsSimpleTypes" parameterOrder="inputStruct outputString outputInteger outputFloat">
|
||||
<input message="tns:echoStructAsSimpleTypesRequest" name="echoStructAsSimpleTypes"/>
|
||||
<output message="tns:echoStructAsSimpleTypesResponse" name="echoStructAsSimpleTypesResponse"/>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct" parameterOrder="inputString inputInteger inputFloat">
|
||||
<input message="tns:echoSimpleTypesAsStructRequest" name="echoSimpleTypesAsStruct"/>
|
||||
<output message="tns:echoSimpleTypesAsStructResponse" name="echoSimpleTypesAsStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray" parameterOrder="input2DStringArray">
|
||||
<input message="tns:echo2DStringArrayRequest" name="echo2DStringArray"/>
|
||||
<output message="tns:echo2DStringArrayResponse" name="echo2DStringArrayResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedStructRequest" name="echoNestedStruct"/>
|
||||
<output message="tns:echoNestedStructResponse" name="echoNestedStructResponse"/>
|
||||
</operation>
|
||||
<operation name="echoNestedArray" parameterOrder="inputStruct">
|
||||
<input message="tns:echoNestedArrayRequest" name="echoNestedArray"/>
|
||||
<output message="tns:echoNestedArrayResponse" name="echoNestedArrayResponse"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="InteropTestSoapBindingB" type="tns:InteropTestPortTypeB">
|
||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<operation name="echoStructAsSimpleTypes">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoSimpleTypesAsStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echo2DStringArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedStruct">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="echoNestedArray">
|
||||
<soap:operation soapAction="http://soapinterop.org/"/>
|
||||
<input>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap:body use="encoded" namespace="http://soapinterop.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<service name="interopLabB">
|
||||
<port name="interopTestPortB" binding="tns:InteropTestSoapBindingB">
|
||||
<soap:address location="<?php echo ((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']));?>/server_round2_groupB.php"/>
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
@ -1,102 +0,0 @@
|
||||
<?
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
|
||||
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
class SOAP_Interop_Base {
|
||||
|
||||
function echoString($inputString)
|
||||
{
|
||||
return $inputString;
|
||||
}
|
||||
|
||||
function echoStringArray($inputStringArray)
|
||||
{
|
||||
return $inputStringArray;
|
||||
}
|
||||
|
||||
|
||||
function echoInteger($inputInteger)
|
||||
{
|
||||
return $inputInteger;
|
||||
}
|
||||
|
||||
function echoIntegerArray($inputIntegerArray)
|
||||
{
|
||||
return $inputIntegerArray;
|
||||
}
|
||||
|
||||
function echoFloat($inputFloat)
|
||||
{
|
||||
return $inputFloat;
|
||||
}
|
||||
|
||||
function echoFloatArray($inputFloatArray)
|
||||
{
|
||||
return $inputFloatArray;
|
||||
}
|
||||
|
||||
function echoStruct($inputStruct)
|
||||
{
|
||||
return $inputStruct;
|
||||
}
|
||||
|
||||
function echoStructArray($inputStructArray)
|
||||
{
|
||||
return $inputStructArray;
|
||||
}
|
||||
|
||||
function echoVoid()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
function echoBase64($b_encoded)
|
||||
{
|
||||
return $b_encoded;
|
||||
}
|
||||
|
||||
function echoDate($timeInstant)
|
||||
{
|
||||
return $timeInstant;
|
||||
}
|
||||
|
||||
function echoHexBinary($hb)
|
||||
{
|
||||
return $hb;
|
||||
}
|
||||
|
||||
function echoDecimal($dec)
|
||||
{
|
||||
return $dec;
|
||||
}
|
||||
|
||||
function echoBoolean($boolean)
|
||||
{
|
||||
return $boolean;
|
||||
}
|
||||
|
||||
function echoMimeAttachment($stuff)
|
||||
{
|
||||
return new SOAP_Attachment('return','application/octet-stream',NULL,$stuff);
|
||||
}
|
||||
}
|
||||
|
||||
$server = new SoapServer((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/interop.wsdl.php");
|
||||
$server->setClass("SOAP_Interop_Base");
|
||||
$server->handle();
|
||||
?>
|
@ -1,55 +0,0 @@
|
||||
<?
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> Port to PEAR and more |
|
||||
// | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
class SOAP_Interop_GroupB {
|
||||
|
||||
function echoStructAsSimpleTypes ($struct)
|
||||
{
|
||||
return array('outputString' => $struct->varString,
|
||||
'outputInteger' => $struct->varInt,
|
||||
'outputFloat' => $struct->varFloat);
|
||||
}
|
||||
|
||||
function echoSimpleTypesAsStruct($string, $int, $float)
|
||||
{
|
||||
return (object)array("varString" => $string,
|
||||
"varInt" => $int,
|
||||
"varFloat" => $float);
|
||||
}
|
||||
|
||||
function echoNestedStruct($struct)
|
||||
{
|
||||
return $struct;
|
||||
}
|
||||
|
||||
function echo2DStringArray($ary)
|
||||
{
|
||||
return $ary;
|
||||
}
|
||||
|
||||
function echoNestedArray($ary)
|
||||
{
|
||||
return $ary;
|
||||
}
|
||||
}
|
||||
|
||||
$server = new SoapServer((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/interopB.wsdl.php");
|
||||
$server->setClass("SOAP_Interop_GroupB");
|
||||
$server->handle();
|
||||
?>
|
@ -1,40 +0,0 @@
|
||||
<?
|
||||
//
|
||||
// +----------------------------------------------------------------------+
|
||||
// | PHP Version 4 |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Copyright (c) 1997-2018 The PHP Group |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | This source file is subject to version 2.02 of the PHP license, |
|
||||
// | that is bundled with this package in the file LICENSE, and is |
|
||||
// | available through the world-wide-web at |
|
||||
// | http://www.php.net/license/2_02.txt. |
|
||||
// | If you did not receive a copy of the PHP license and are unable to |
|
||||
// | obtain it through the world-wide-web, please send a note to |
|
||||
// | license@php.net so we can mail you a copy immediately. |
|
||||
// +----------------------------------------------------------------------+
|
||||
// | Authors: Shane Caraveo <Shane@Caraveo.com> |
|
||||
// +----------------------------------------------------------------------+
|
||||
|
||||
class SOAP_Interop_GroupC {
|
||||
var $method_namespace = 'http://soapinterop.org/echoheader/';
|
||||
|
||||
function echoMeStringRequest($string)
|
||||
{
|
||||
return new SoapHeader($this->method_namespace, "echoMeStringResponse", $string);
|
||||
}
|
||||
|
||||
function echoMeStructRequest($struct)
|
||||
{
|
||||
return new SoapHeader($this->method_namespace, "echoMeStructResponse", $struct);
|
||||
}
|
||||
|
||||
function echoVoid()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
$server = new SoapServer((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/echoheadersvc.wsdl.php");
|
||||
$server->setClass("SOAP_Interop_GroupC");
|
||||
$server->handle();
|
||||
?>
|
@ -1,143 +0,0 @@
|
||||
<?php
|
||||
|
||||
function timestamp_to_soap_datetime($t) {
|
||||
return date('Y-m-d\TH:i:sO',$t);
|
||||
}
|
||||
|
||||
function soap_datetime_to_timestamp($t) {
|
||||
/* Ignore Microsecconds */
|
||||
$iso8601 = '(-?[0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]*)?(Z|[+\-][0-9]{4}|[+\-][0-9]{2}:[0-9]{2})?';
|
||||
if (!is_int($t)) {
|
||||
if (!ereg($iso8601,$t,$r)) {
|
||||
return false;
|
||||
}
|
||||
$t = gmmktime($r[4],$r[5],$r[6],$r[2],$r[3],$r[1]);
|
||||
if (!empty($r[8]) && $r[8] != 'Z') {
|
||||
$op = substr($r[8],0,1);
|
||||
$h = substr($r[8],1,2);
|
||||
if (strstr($r[8],':')) {
|
||||
$m = substr($r[8],4,2);
|
||||
} else {
|
||||
$m = substr($r[8],3,2);
|
||||
}
|
||||
$t += (($op == "-"?1:-1) * $h * 60 + $m) * 60;
|
||||
}
|
||||
}
|
||||
return $t;
|
||||
}
|
||||
|
||||
function date_compare($f1,$f2)
|
||||
{
|
||||
return soap_datetime_to_timestamp($f1) == soap_datetime_to_timestamp($f2);
|
||||
}
|
||||
|
||||
function hex_compare($f1, $f2)
|
||||
{
|
||||
return strcasecmp($f1,$f2) == 0;
|
||||
}
|
||||
|
||||
function number_compare($f1, $f2)
|
||||
{
|
||||
# figure out which has the least fractional digits
|
||||
preg_match('/.*?\.(.*)/',$f1,$m1);
|
||||
preg_match('/.*?\.(.*)/',$f2,$m2);
|
||||
#print_r($m1);
|
||||
# always use at least 2 digits of precision
|
||||
$d = max(min(strlen(count($m1)?$m1[1]:'0'),strlen(count($m2)?$m2[1]:'0')),2);
|
||||
$f1 = round($f1, $d);
|
||||
$f2 = round($f2, $d);
|
||||
return $f1 == $f2;
|
||||
// return bccomp($f1, $f2, $d) == 0;
|
||||
}
|
||||
|
||||
function boolean_compare($f1, $f2)
|
||||
{
|
||||
if (($f1 == 'true' || $f1 === TRUE || $f1 != 0) &&
|
||||
($f2 == 'true' || $f2 === TRUE || $f2 != 0)) return TRUE;
|
||||
if (($f1 == 'false' || $f1 === FALSE || $f1 == 0) &&
|
||||
($f2 == 'false' || $f2 === FALSE || $f2 == 0)) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function string_compare($e1, $e2)
|
||||
{
|
||||
if (is_numeric($e1) && is_numeric($e2)) {
|
||||
return number_compare($e1, $e2);
|
||||
}
|
||||
# handle dateTime comparison
|
||||
$e1_type = gettype($e1);
|
||||
$e2_type = gettype($e2);
|
||||
$ok = FALSE;
|
||||
if ($e1_type == "string") {
|
||||
// $dt = new SOAP_Type_dateTime();
|
||||
// $ok = $dt->compare($e1, $e2) == 0;
|
||||
$oj = false;
|
||||
}
|
||||
return $ok || $e1 == $e2 || strcasecmp(trim($e1), trim($e2)) == 0;
|
||||
}
|
||||
|
||||
function array_compare(&$ar1, &$ar2) {
|
||||
if (gettype($ar1) != 'array' || gettype($ar2) != 'array') return FALSE;
|
||||
if (count($ar1) != count($ar2)) return FALSE;
|
||||
foreach ($ar1 as $k => $v) {
|
||||
if (!array_key_exists($k,$ar2)) return FALSE;
|
||||
if (!compare($v,$ar2[$k])) return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
function object_compare(&$obj1, &$obj2) {
|
||||
if (gettype($obj1) != 'object' || gettype($obj2) != 'object') return FALSE;
|
||||
// if (class_name(obj1) != class_name(obj2)) return FALSE;
|
||||
$ar1 = (array)$obj1;
|
||||
$ar2 = (array)$obj2;
|
||||
return array_compare($ar1,$ar2);
|
||||
}
|
||||
|
||||
function compare(&$x,&$y) {
|
||||
$ok = 0;
|
||||
$x_type = gettype($x);
|
||||
$y_type = gettype($y);
|
||||
if ($x_type == $y_type) {
|
||||
if ($x_type == "array") {
|
||||
$ok = array_compare($x, $y);
|
||||
} else if ($x_type == "object") {
|
||||
$ok = object_compare($x, $y);
|
||||
} else if ($x_type == "double") {
|
||||
$ok = number_compare($x, $y);
|
||||
// } else if ($x_type == 'boolean') {
|
||||
// $ok = boolean_compare($x, $y);
|
||||
} else {
|
||||
$ok = ($x == $y);
|
||||
// $ok = string_compare($expect, $result);
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
||||
function parseMessage($msg)
|
||||
{
|
||||
# strip line endings
|
||||
#$msg = preg_replace('/\r|\n/', ' ', $msg);
|
||||
$response = new SOAP_Parser($msg);
|
||||
if ($response->fault) {
|
||||
return $response->fault->getFault();
|
||||
}
|
||||
$return = $response->getResponse();
|
||||
$v = $response->decode($return);
|
||||
if (gettype($v) == 'array' && count($v)==1) {
|
||||
return array_shift($v);
|
||||
}
|
||||
return $v;
|
||||
}
|
||||
|
||||
function var_dump_str($var) {
|
||||
ob_start();
|
||||
var_dump($var);
|
||||
$res = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $res;
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user