1234567891011121314151617181920212223242526272829 |
- <?php
- if ($_GET['class'] && (in_array($_GET['class'], $WSClasses) || in_array($_GET['class'], $WSStructures))) {
- $WSHelper = new WSHelper("http://schema.flowdat.com", $_GET['class']);
- $WSHelper->actor = "http://schema.flowdat.com";
- $WSHelper->use = SOAP_ENCODED;
- $WSHelper->classNameArr = $WSClasses;
- $WSHelper->structureMap = $WSStructures;
- $WSHelper->setPersistence(SOAP_PERSISTENCE_REQUEST);
- $dirname = "/tmp/cache/wsdl";
- if (!realpath($dirname)) {
- $dirname = sys_get_temp_dir();
- }
- $cache_dir = realpath($dirname);
- if (!is_dir($cache_dir)) {
- mkdir($dirname, 0777, true);
- }
- $WSHelper->setWSDLCacheFolder($dirname . '/');
- try {
- $WSHelper->handle();
- //possible db transaction commit
- } catch (\Exception $e) {
- //possible db transaction rollback
- $WSHelper->fault("SERVER", $e->getMessage() . "\n" . $e->getTraceAsString(), "", $e->__toString() . "\n" . $e->getTraceAsString());
- }
- } else {
- header('Location:'.$_SERVER['REQUEST_URI'] . '?class=' . $WSClasses[0]);
- die("No valid class selected");
- }
|