'<?xml version="1.0" encoding="utf-8"?> <ArrayOfDeviceInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="https://netinfo.ti.citigroup.net/"> <DeviceInformation> <DeviceId>73405</DeviceId> <DeviceName>rrdc-test-2811 Test</DeviceName> <IPAddress>196.185.254.196</IPAddress> <Status>Operational</Status> <autoReady>0</autoReady> <LBCode>RDC</LBCode> <REMSCode>13609</REMSCode> <BuildingName>Dale Data Centre</BuildingName> <Address>55 Jack Street1</Address> <City>City</City> <PostalCode>SE13 7EY</PostalCode> <County /> <Country>United Kingdom</Country> <Region>WESTERN EUROPE</Region> </DeviceInformation> </ArrayOfDeviceInformation>'
my $CreateVTWS = "https://notis-devel.eur.nsroot.net/NOTIS/anonaccess/WorkingHours.asmx/GetDevicesByLoopBackIP?DeviceLoopbackIP=196.185.254.196"; printLog( "$CreateVTWS\n" ); my $agent = LWP::UserAgent->new; eval { $response = $agent->get( $CreateVTWS ); }; if ($@) { printLog( "An error occurred ($@)\n"); printLog( Data::Dumper->Dumper($response)); die "Calling NetInfo failed."; } my $content = $response->content; print Dumper($content) ."\n"; my $xmlResp = XMLin($content); print Dumper($xmlResp) ."\n"; print $xmlResp->{DeviceInformation}->{DeviceName} ."\n";
Error Output:
"Not an ARRAY reference at"
This post has been edited by JackOfAllTrades: 22 May 2012 - 02:09 PM