line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
997
|
use FindBin; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
5
|
use lib $FindBin::Bin.'/../3rd/lib/perl5'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
409
|
use lib $FindBin::Bin.'/../lib'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
6
|
1
|
|
|
1
|
|
106
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
55
|
|
7
|
1
|
|
|
1
|
|
417
|
use Mojolicious::Lite; |
|
1
|
|
|
|
|
913
|
|
|
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
|
|
20049
|
use Mojo::Base -base; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
21
|
1
|
|
|
1
|
|
95
|
use Data::Dumper; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
22
|
1
|
|
|
1
|
|
6
|
use XML::Compile::Util qw/pack_type/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
210
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub getCountries { |
25
|
|
|
|
|
|
|
return { |
26
|
1
|
|
|
1
|
|
11
|
country => [qw(Switzerland Germany)] |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub getNamesInCountry { |
31
|
2
|
|
|
2
|
|
7
|
my ($self,$server,$params,$c) = @_; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#warn Dumper $params; |
34
|
2
|
|
|
|
|
6
|
my $name = $params->{parameters}{country}; |
35
|
2
|
|
|
|
|
22
|
$c->log->debug("Test Message"); |
36
|
2
|
100
|
|
|
|
67
|
if ($name eq 'Lock') { |
37
|
1
|
|
|
|
|
10
|
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
|
|
|
|
|
|
|
|