function update($id, $sdo) { SCA::$logger->log("Entering with params ID: " . $id . " SDO: " . $sdo); //TODO: need to make sure these are properly checked and errors are passed around as appropriate. try { $xmldas = SDO_DAS_XML::Create('Atom1.0.xsd'); //Does not mind if a non-existent type is specified for the second parameter. $doc = $xmldas->createDocument('http://www.w3.org/2005/Atom', 'entryType', $sdo); $xmldas->saveFile($doc, "Contact/{$id}.xml"); return true; } catch (Exception $e) { SCA::$logger->log("caught exception: " . $e->getMessage()); throw new SCA_NotFoundException(); } }