File: XSD_unsupported.t

package info (click to toggle)
libsoap-wsdl-perl 3.004-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,600 kB
  • sloc: perl: 8,433; xml: 1,769; java: 19; makefile: 15
file content (30 lines) | stat: -rw-r--r-- 793 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use Test::More tests => 2;
use File::Basename qw(dirname);
use File::Spec;

my $path = File::Spec->rel2abs( dirname __FILE__ );

use_ok qw(SOAP::WSDL::Generator::Template::XSD);

use SOAP::WSDL::Expat::WSDLParser;

my $parser = SOAP::WSDL::Expat::WSDLParser->new();
my $definitions = $parser->parse_file(
    "$path/../../../acceptance/wsdl/generator_unsupported_test.wsdl"
);

my $generator = SOAP::WSDL::Generator::Template::XSD->new({
    definitions => $definitions,
    silent => 1,
});

{
    # currently, there is no completely unsupported XML schema
    # idiom (at least none which is detected properly)
    # TODO update WSDL and add some (there sure are)
    my $code = "";
    $generator->set_output(\$code);
    eval { $generator->generate_typelib() };
    eval $code;
}
ok ! $@;