line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1011
|
use FindBin; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
4
|
1
|
|
|
1
|
|
5
|
use lib $FindBin::Bin.'/../3rd/lib/perl5'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
123
|
use lib $FindBin::Bin.'/../lib'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
109
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
7
|
1
|
|
|
1
|
|
464
|
use Mojolicious::Lite; |
|
1
|
|
|
|
|
874
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
plugin 'SOAP::Server' => { |
10
|
|
|
|
|
|
|
wsdl => $FindBin::Bin.'/nameservice.wsdl', |
11
|
|
|
|
|
|
|
xsds => [$FindBin::Bin.'/nameservice.xsd'], |
12
|
|
|
|
|
|
|
controller => SoapCtrl->new, |
13
|
|
|
|
|
|
|
endPoint => '/SOAP' |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
app->start; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package SoapCtrl; |
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
19988
|
use Mojo::Base -base; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
21
|
1
|
|
|
1
|
|
88
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
22
|
1
|
|
|
1
|
|
5
|
use XML::Compile::Util qw/pack_type/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
172
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub getCountries { |
25
|
|
|
|
|
|
|
return { |
26
|
1
|
|
|
1
|
|
8
|
country => [qw(Switzerland Germany)] |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub getNamesInCountry { |
31
|
2
|
|
|
2
|
|
6
|
my ($self,$server,$params,$c) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#warn Dumper $params; |
34
|
2
|
|
|
|
|
6
|
my $name = $params->{parameters}{country}; |
35
|
2
|
|
|
|
|
20
|
$c->log->debug("Test Message"); |
36
|
2
|
100
|
|
|
|
64
|
if ($name eq 'Lock') { |
37
|
1
|
|
|
|
|
9
|
die { |
38
|
|
|
|
|
|
|
status => 401, |
39
|
|
|
|
|
|
|
text => 'Unauthorized' |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
# return { |
42
|
|
|
|
|
|
|
# _RETURN_CODE => 401, |
43
|
|
|
|
|
|
|
# _RETURN_TEXT => 'Unauthorized', |
44
|
|
|
|
|
|
|
# }; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
return { |
48
|
1
|
|
|
|
|
12
|
name => [qw(A B C),$name] |
49
|
|
|
|
|
|
|
}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|