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.8 2004/06/10 07:54:03 arnaud 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;
var $service = NULL; // 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;
$this->expect = & $expect;
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;
* print simple output about a methods result
* @param array endpoint_info
function showTestResult ($debug = 0 ) {
if ($debug) $this->show = 1;
echo " testing $this->test_name : ";
$hc = count($this->headers);
for ($i=0; $i < $hc; $i++ ) {
$h = & $this->headers[$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'];
print " FAILED: [{$fault->faultcode }] {$fault->faultstring }\n";
print "FAILED: ". $this->result['result']. "\n";
echo "<pre>\n". htmlentities($this->result['wire']). "</pre>\n";
Documentation generated on Mon, 11 Mar 2019 14:54:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|