apply use strict and fix issues
This commit is contained in:
parent
e6626cef69
commit
b742d316b3
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
use strict;
|
||||||
#
|
#
|
||||||
# ==========================================================================
|
# ==========================================================================
|
||||||
#
|
#
|
||||||
|
@ -196,7 +197,7 @@ sub discover
|
||||||
To => { value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' },
|
To => { value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
# print $result . "\n";
|
print $result . "\n" if $verbose;
|
||||||
|
|
||||||
interpret_messages($svc_discover, \%services, @responses);
|
interpret_messages($svc_discover, \%services, @responses);
|
||||||
@responses = ();
|
@responses = ();
|
||||||
|
@ -206,17 +207,17 @@ sub discover
|
||||||
if($verbose) {
|
if($verbose) {
|
||||||
print "Probing for SOAP 1.2\n"
|
print "Probing for SOAP 1.2\n"
|
||||||
}
|
}
|
||||||
$svc_discover = WSDiscovery10::Interfaces::WSDiscovery::WSDiscoveryPort->new({
|
my $svc_discover = WSDiscovery10::Interfaces::WSDiscovery::WSDiscoveryPort->new({
|
||||||
# no_dispatch => '1',
|
# no_dispatch => '1',
|
||||||
});
|
});
|
||||||
$svc_discover->set_soap_version('1.2');
|
$svc_discover->set_soap_version('1.2');
|
||||||
|
|
||||||
# copies of the same Probe message must have the same MessageID.
|
# copies of the same Probe message must have the same MessageID.
|
||||||
# This is not a copy. So we generate a new uuid.
|
# This is not a copy. So we generate a new uuid.
|
||||||
$uuid = $uuid_gen->create_str();
|
my $uuid = $uuid_gen->create_str();
|
||||||
|
|
||||||
# Everyone else, like the nodejs onvif code and odm only ask for NetworkVideoTransmitter
|
# Everyone else, like the nodejs onvif code and odm only ask for NetworkVideoTransmitter
|
||||||
$result = $svc_discover->ProbeOp(
|
my $result = $svc_discover->ProbeOp(
|
||||||
{ # WSDiscovery::Types::ProbeType
|
{ # WSDiscovery::Types::ProbeType
|
||||||
xmlattr => { 'xmlns:dn' => 'http://www.onvif.org/ver10/network/wsdl', },
|
xmlattr => { 'xmlns:dn' => 'http://www.onvif.org/ver10/network/wsdl', },
|
||||||
Types => 'dn:NetworkVideoTransmitter', # QNameListType
|
Types => 'dn:NetworkVideoTransmitter', # QNameListType
|
||||||
|
@ -228,10 +229,10 @@ sub discover
|
||||||
To => { value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' },
|
To => { value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
# print $result . "\n";
|
print $result . "\n" if $verbose;
|
||||||
|
interpret_messages($svc_discover, \%services, @responses);
|
||||||
} # end if doing soap 1.2
|
} # end if doing soap 1.2
|
||||||
|
|
||||||
interpret_messages($svc_discover, \%services, @responses);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue