From b345b01a2072c09148f7845d8ecac8535fbc4202 Mon Sep 17 00:00:00 2001 From: Jason MacWilliams Date: Fri, 8 Jun 2012 17:10:18 -0300 Subject: [PATCH] updated createDQCEditForm to use fedora_item instead of calling __soap:getDatastreamDissemination directly, now the request is error filtered --- formClass.inc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/formClass.inc b/formClass.inc index fc3b1748..06d840de 100644 --- a/formClass.inc +++ b/formClass.inc @@ -817,15 +817,12 @@ class formClass { * @return string */ function createQDCEditForm($pid, $dsid, $client, &$form_state) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $dsid = empty($dsid) ? 'QDC' : $dsid; - try { - $params = array('pid' => "$pid", 'dsID' => "$dsid", 'asOfDateTime' => ""); - $object = $client->__soapCall('getDatastreamDissemination', array('parameters' => $params)); - } catch (Exception $e) { - return array(); - } - $content = $object->dissemination->stream; - $content = trim($content); + + $item = new fedora_item($pid); + $content = trim($item->get_datastream_dissemination($dsid)); + $doc = new DOMDocument(); if (!$doc->loadXML($content)) { echo "error loading xml";