function process($serviceUrl, $redirectHtml = "") { global $output, $serviceRoot; if ($output == "html") { if ($redirectHtml == "") { print "Service not available"; } else { header("Location: " . $redirectHtml); } } else { $xml = readData($serviceUrl, true); if ($output == "xml") { header("Content-type: text/xml"); return envelopeXml($xml, $serviceRoot); } else { return $xml; } } }
function get_titles($type, $param) { global $country, $applServer, $output, $transformer, $serviceRoot, $databasePath; $xslName = ''; $serviceUrl = "http://" . $applServer . "/cgi-bin/wxis.exe/webservices/wxis/?IsisScript=list.xis&database=" . $databasePath . "title/title&gizmo=GIZMO_XML"; $XML = readData($serviceUrl, true); // die($serviceUrl); $serviceXML .= '<collection name="' . $country . '" uri="http://' . $applServer . '">'; $serviceXML .= '<indicators>'; $serviceXML .= '<journalTotal>' . getIndicators("journalTotal") . '</journalTotal>'; $serviceXML .= '<articleTotal>' . getIndicators("articleTotal") . '</articleTotal>'; $serviceXML .= '<issueTotal>' . getIndicators("issueTotal") . '</issueTotal>'; $serviceXML .= '<citationTotal>' . getIndicators("citationTotal") . '</citationTotal>'; $serviceXML .= '</indicators>'; $serviceXML .= $XML; $serviceXML .= '</collection>'; if ($output == "xml") { header("Content-type: text/xml"); return envelopeXml($serviceXML, $serviceRoot); } else { return $serviceXML; } return $serviceXML; }