Source for file interop_test.php
Documentation is available at interop_test.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 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 at 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> |
// +----------------------------------------------------------------------+
// $Id: interop_test.php,v 1.10 2007/01/26 17:21:44 yunosh Exp $
require_once 'SOAP/Value.php';
define('SOAP_TEST_ACTOR_NEXT','http://schemas.xmlsoap.org/soap/actor/next');
define('SOAP_TEST_ACTOR_OTHER','http://some/other/actor');
class SOAP_Interop_Test {
var $method_params = null;
var $expect_fault = false;
var $headers_expect = null;
var $encoding = SOAP_DEFAULT_ENCODING;
* If multiple services, this sets to a specific service.
function SOAP_Interop_Test ($methodname, $params, $expect = null )
if (strchr($methodname, '(')) {
preg_match('/(.*)\((.*)\)/', $methodname, $matches);
$this->test_name = $methodname;
$this->method_name = $matches[1 ];
$this->test_name = $this->method_name = $methodname;
$this->method_params = $params;
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;
* Prints simple output about a methods result.
function showTestResult ($debug = 0 )
echo " Testing $this->test_name: ";
$hc = count($this->headers);
for ($i = 0; $i < $hc; $i++ ) {
echo " \n {$h->name },{$h->attributes ['SOAP-ENV:actor']},{ $h->attributes ['SOAP-ENV:mustUnderstand']} : ";
echo " \n $h[0],$h[4],$h[3] : ";
$ok = $this->result['success'];
$fault = $this->result['fault'];
echo " FAILED: [{$fault->faultcode }] {$fault->faultstring }\n";
if (!empty ($fault->faultdetail )) {
echo $fault->faultdetail . "\n";
echo "FAILED: " . $this->result['result'] . "\n";
echo "\n" . $this->result['wire'] . "\n";
Documentation generated on Mon, 11 Mar 2019 15:06:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|