Handle there being no services in the response
This commit is contained in:
parent
ec5e6b392b
commit
1b5448ede4
|
@ -117,7 +117,9 @@ sub get_service_urls {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if ( $result ) {
|
if ( $result ) {
|
||||||
foreach my $svc ( @{ $result->get_Service() } ) {
|
my $services = $result->get_Service();
|
||||||
|
if ( $services ) {
|
||||||
|
foreach my $svc ( @{ $services } ) {
|
||||||
my $short_name = $namespace_map{$svc->get_Namespace()};
|
my $short_name = $namespace_map{$svc->get_Namespace()};
|
||||||
my $url_svc = $svc->get_XAddr()->get_value();
|
my $url_svc = $svc->get_XAddr()->get_value();
|
||||||
if ( defined $short_name && defined $url_svc ) {
|
if ( defined $short_name && defined $url_svc ) {
|
||||||
|
@ -125,6 +127,7 @@ sub get_service_urls {
|
||||||
$self->set_service($short_name, 'url', $url_svc);
|
$self->set_service($short_name, 'url', $url_svc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#} else {
|
#} else {
|
||||||
#print "No results from GetServices: $result\n";
|
#print "No results from GetServices: $result\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue