-------------------------------
"; $guiList = mb_validateInput($_REQUEST["guiList"]); $url = mb_validateInput($_REQUEST["xml_file"]); $myWfsFactory = new UniversalWfsFactory(); if ($_REQUEST["auth_type"] == 'basic' || $_REQUEST["auth_type"] == 'digest') { $auth = array(); $auth['username'] = $_REQUEST["username"]; $auth['password'] = $_REQUEST["password"]; $auth['auth_type'] = $_REQUEST["auth_type"]; } if (isset($auth)) { echo "auth set"; echo $auth['username']."
"; echo $auth['password']."
"; echo $auth['auth_type']."
"; $myWfs = $myWfsFactory->createFromUrl($url, $auth); //store the authentication information in the object $myWfs->auth = $auth; if (isset($myWfs->auth)) { $e = new mb_exception("ows auth set"); } //TODO //$myWfs = $myWfsFactory->createFromUrl($url,$auth); /*$result = $mywms->createObjFromXML($xml, $auth); if ($result['success']) { $mywms->writeObjInDB($gui_id, $auth); } else { echo $result['message']; die(); }*/ } else { $myWfs = $myWfsFactory->createFromUrl($url); if (is_null($myWfs)) { echo "WFS could not be uploaded."; die; } /*$result = $mywms->createObjFromXML($xml); if ($result['success']) { $mywms->writeObjInDB($gui_id); } else { echo $result['message']; die(); }*/ } $e = new mb_exception($myWfs->auth['username']); $myWfs->insertOrUpdate(); // link WFS to GUIs in $guiList $guiArray = explode(",", $guiList); foreach ($guiArray as $appName) { $currentApp = new gui($appName); $currentApp->addWfs($myWfs); } echo $myWfs; ?>