File: Template.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 (41 lines) | stat: -rw-r--r-- 804 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
31
32
33
34
35
36
37
38
39
40
41
use strict;
use warnings;
use Test::More tests => 2;
use Template;
use File::Basename;
use File::Spec;
use SOAP::WSDL::Expat::WSDLParser;
use SOAP::WSDL::Generator::Template::XSD;

my $path = dirname __FILE__;

my $parser = SOAP::WSDL::Expat::WSDLParser->new();

$parser->parse_file("$path/../../../acceptance/wsdl/006_sax_client.wsdl");
#"$path/../../../../example/wsdl/globalweather.xml");
my $definitions = $parser->get_data();

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


$generator->generate_typemap({
    NO_POD => 1,
    output => \$output,
});

ok eval $output;
print $@ if $@;

#print $output;

$output = q{};
$generator->generate_interface({
    NO_POD => 1,
    output => \$output,
});

ok eval $output;
print $@ if $@;