diff --git a/onvif/modules/lib/ONVIF/Serializer/Base.pm b/onvif/modules/lib/ONVIF/Serializer/Base.pm index 7bab331cf..adbb173c6 100644 --- a/onvif/modules/lib/ONVIF/Serializer/Base.pm +++ b/onvif/modules/lib/ONVIF/Serializer/Base.pm @@ -97,8 +97,11 @@ sub serialize { my $soap_prefix = $opt->{ namespace }->{ $SOAP_NS }; - # envelope start with namespaces - my $xml = "<$soap_prefix\:Envelope "; + # XML starts with header + my $xml = "\n"; + + # envelope starts with namespaces + $xml .= "<$soap_prefix\:Envelope "; while (my ($uri, $prefix) = each %{ $opt->{ namespace } }) {