diff --git a/soap/test.soap.php b/soap/test.soap.php new file mode 100644 index 000000000..0e8a84ffe --- /dev/null +++ b/soap/test.soap.php @@ -0,0 +1,48 @@ +, + * Andreas Oesterreicher and + * Karl Burkhart . + */ +header("Cache-Control: no-cache"); +header("Cache-Control: post-check=0, pre-check=0",false); +header("Expires Mon, 26 Jul 1997 05:00:00 GMT"); +header("Pragma: no-cache"); + + +require_once('../config/vilesci.config.inc.php'); + +$SOAPServer = new SoapServer(APP_ROOT."soap/test.wsdl.php?".microtime()); +$SOAPServer->addFunction("myTest"); +$SOAPServer->handle(); + +// WSDL Chache auf aus +ini_set("soap.wsdl_cache_enabled", "0"); + + +function myTest($foo) +{ + if($foo=='foo') + return 'OK'; + else + return new SoapFault("Server", 'bar'); +} + +?> + + diff --git a/soap/test.wsdl.php b/soap/test.wsdl.php new file mode 100644 index 000000000..a63a4cba6 --- /dev/null +++ b/soap/test.wsdl.php @@ -0,0 +1,48 @@ +"; +?> + + + + + + + + + + + + + + + + + + + + + + + " /> + + + + + + + + + + + + "/> + + + diff --git a/soap/test_client.php b/soap/test_client.php new file mode 100644 index 000000000..c39c68453 --- /dev/null +++ b/soap/test_client.php @@ -0,0 +1,83 @@ + + + + + + + + + Test-Client + + + + + +
+ + +
+ +
'; + try + { + $response = $client->myTest('foo'); + var_dump($response); + } + catch(SoapFault $fault) + { + echo "SOAP Fault: (faultcode: ".$fault->faultcode.", faultstring: ".$fault->faultstring.")", E_USER_ERROR; + } + +} + +?> + +