2 use NCIP::Configuration;
7 use base qw(Class::Accessor);
18 my $nicp = NCIP->new($config_dir);
26 my $class = ref $proto || $proto;
27 my $config_dir = shift;
29 my $config = NCIP::Configuration->new($config_dir);
30 $self->{config} = $config;
31 return bless $self, $class;
35 =head2 process_request()
37 my $response = $ncip->process_request($xml);
45 my $request_type = $self->handle_initiation($xml);
46 unless ($request_type) {
48 # We have invalid xml, or we can't figure out what kind of request this is
52 "<HTML> <HEAD> <TITLE>Hello There</TITLE> </HEAD> <BODY> <H1>Hello You Big JERK!</H1> Who would take this book seriously if the first eaxample didn't say \"hello world\"? </BODY> </HTML>";
57 =head2 handle_initiation
61 sub handle_initiation {
66 $dom = XML::LibXML->load_xml( string => $xml );
69 warn "Invalid xml, caught error: $_";
72 return ('lookup_item');