Hi,
I am facing issue while validating the data against the structure $def. Even if the data for BS_INFO_CALLED_NUM_FIELD_REF(string)not matching with the data type, the output showing success parsing. Will you please check what is the issue and why the validation is not happing.
$def = {
root => [
{ name => 'XDRAttributes', type => 'XDR' },
],
complexTypes => {
XDR => [
{ name => 'BS_INFO_CALLED_NUM_FIELD_REF', type => 'integer', minLength =>5, maxLength => 38 },
{ name => 'BS_INFO_DIAL_DIGITS_FIELD_REF', type => 'integer', minLength =>0, maxLength => 38 },
{ name => 'BUSINESS_INFO_BS_ID', type => 'integer', minLength =>0, maxLength => 38 },
{ name => 'BUSINESS_INFO_BS_VERSION', type => 'integer', minLength =>0, maxLength => 38 },
],
},
};
$data = {
XDRAttributes => {
BS_INFO_CALLED_NUM_FIELD_REF => 'hhffl',
}
};
my $validator = Data::Validate::XSD->new( $def );
$validator->setStrict( 1 );
my $errors = $validator->validate( $data );
warn Dumper($errors) if $errors;
BR/
Amarendra
[oracle@io11840a SRM-Application-1.01]$ perl -v
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 25 registered patches, see perl -V for more detail)
Copyright 1987-2012, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
[oracle@io11840a SRM-Application-1.01]$ uname -a
Linux io11840a.sis-emea.com 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux