From: Chris Cormack Date: Wed, 2 Oct 2013 22:17:52 +0000 (+1300) Subject: Fixing a typo and getting the correct itemnumber now X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c3e61d206205e535644684941b6c374a23b30c8f;p=working%2FNCIPServer.git Fixing a typo and getting the correct itemnumber now Signed-off-by: Chris Cormack --- diff --git a/lib/NCIP/Handler.pm b/lib/NCIP/Handler.pm index fc179eb..32367f1 100644 --- a/lib/NCIP/Handler.pm +++ b/lib/NCIP/Handler.pm @@ -26,7 +26,7 @@ sub new { my $namespace = shift; my $type = shift; my $subclass = __PACKAGE__ . "::" . $type; - my $self = bless { type => $type, namspace => $namespace }, $subclass; + my $self = bless { type => $type, namespace => $namespace }, $subclass; return $self; } diff --git a/lib/NCIP/Handler/LookupItem.pm b/lib/NCIP/Handler/LookupItem.pm index fd51551..e931bec 100644 --- a/lib/NCIP/Handler/LookupItem.pm +++ b/lib/NCIP/Handler/LookupItem.pm @@ -28,9 +28,12 @@ sub handle { my $self = shift; my $xmldoc = shift; if ($xmldoc) { + # Given our xml document, lets find the itemid my ($item_id) = - $xmldoc->getElementsByTagNameNS( $self->namespace(), 'ItemId' ); - my $item = NCIP::Item->new( { itemid => $item_id } ); + $xmldoc->getElementsByTagNameNS( $self->namespace(), + 'ItemIdentifierValue' ); + my $item = NCIP::Item->new( { itemid => $item_id->textContent() } ); + warn $item->itemid(); } return $self->type; }