return undef;
}
+# Returns the path to the IDL file. Useful for public-only
+# clients, like Apache clients.
+sub get_idl_path {
+ my $class = shift;
+ my $service = shift || 'open-ils.actor'; # generally a safe bet
+ return $class->simplereq(
+ $service, 'opensrf.open-ils.fetch_idl.file');
+}
+
+
1;
use Error qw/:try/;
use OpenSRF::System;
use OpenSRF::Utils::SettingsClient;
+use OpenILS::Application::AppUtils;
use CGI;
my $bs_config;
}
$xsl_file = $sclient->config_value(dirs => 'xsl')."/$xsl_file";
- my $idl_file = $sclient->config_value("IDL");
+ my $idl_file = OpenILS::Application::AppUtils->get_idl_path;
my $xslt = XML::LibXSLT->new();
use CGI;
use OpenSRF::System;
-use OpenSRF::Utils::SettingsClient;
use OpenSRF::Utils::Logger qw/$logger/;
use OpenILS::Utils::Fieldmapper;
use OpenILS::Application::AppUtils;
sub child_init {
OpenSRF::System->bootstrap_client(config_file => $bootstrap);
- my $idl = OpenSRF::Utils::SettingsClient->new->config_value("IDL");
+ my $idl = $U->get_idl_path;
Fieldmapper->import(IDL => $idl);
OpenILS::Utils::CStoreEditor->init;
return Apache2::Const::OK;
sub child_init {
OpenSRF::System->bootstrap_client( config_file => $bootstrap );
- my $idl = OpenSRF::Utils::SettingsClient->new->config_value("IDL");
+ my $idl = $U->get_idl_path;
Fieldmapper->import(IDL => $idl);
$supercat = OpenSRF::AppSession->create('open-ils.supercat');
use Unicode::Normalize;
use OpenILS::Utils::Fieldmapper;
use OpenSRF::Utils::Logger qw/$logger/;
+use OpenILS::Application::AppUtils;
use MARC::Record;
use MARC::File::XML ( BinaryEncoding => 'UTF-8' );
sub child_init {
OpenSRF::System->bootstrap_client( config_file => $bootstrap );
- Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
+ Fieldmapper->import(IDL => OpenILS::Application::AppUtils->get_idl_path);
return Apache2::Const::OK;
}
use OpenSRF::Utils::Cache;
use OpenSRF::Utils::Logger qw/$logger/;
use OpenSRF::Utils::SettingsClient;
+use OpenILS::Application::AppUtils;
use RPC::XML qw/smart_encode/;
use RPC::XML::Parser;
OpenSRF::AppSession->ingress('xmlrpc');
OpenSRF::System->bootstrap_client( config_file => $bs_config );
my $sclient = OpenSRF::Utils::SettingsClient->new();
- my $idl = $sclient->config_value("IDL");
+ my $idl = OpenILS::Application::AppUtils->get_idl_path;
$services = $sclient->config_value("xml-rpc", "allowed_services", "service");
$services = ref $services ? $services : [ $services ];
$logger->debug("XML-RPC: allowed services @$services");