Files
zoneminder/onvif/proxy/lib/WSNotification/Elements/Header.pm
root e6be9210c5 fixes bug with zmonvif-trigger.pl (Perl) :
zmonvif-trigger.pl is a Perl script that is supposed to monitor and forward
onvif events to ZM . Currently this does not wok as :
SOAP requests need to have a header containing "Action"	"To" and "UIID" fields
as per ONVIF specifications  (tested with Reolink rlc-831A)
This patch fixes that (creates proper SOAP headers ) .
IT now works ( tested with Reolink rlc-831A)
2023-07-02 10:32:28 +02:00

56 lines
1.2 KiB
Perl

package WSNotification::Elements::Header;
use strict;
use warnings;
__PACKAGE__->_set_element_form_qualified(0);
sub get_xmlns { 'http://schemas.xmlsoap.org/soap/envelope/' };
our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;
sub __get_attr_class {
return $XML_ATTRIBUTE_CLASS;
}
use Class::Std::Fast::Storable constructor => 'none';
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
use Data::Dumper;
Class::Std::initialize();
{ # BLOCK to scope variables
my %Action_of :ATTR(:get<Action>);
my %MessageID_of :ATTR(:get<MessageID>);
my %ReplyTo_of :ATTR(:get<ReplyTo>);
my %To_of :ATTR(:get<To>);
__PACKAGE__->_factory(
[ qw( Action MessageID ReplyTo To ) ],
{
'Action' => \%Action_of,
'MessageID' => \%MessageID_of,
'ReplyTo' => \%ReplyTo_of,
'To' => \%To_of,
},
{
'Action' => 'WSNotification::Elements::Action',
'MessageID' => 'WSNotification::Elements::MessageID',
'ReplyTo' => 'WSNotification::Elements::ReplyTo',
'To' => 'WSNotification::Elements::To',
},
{
'Action' => '',
'MessageID' => '',
'ReplyTo' => '',
'To' => '',
}
);
} # end BLOCK
1;