line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EWS::Client::Role::SOAP; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
572
|
$EWS::Client::Role::SOAP::VERSION = '1.143070'; |
4
|
|
|
|
|
|
|
} |
5
|
1
|
|
|
1
|
|
5
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4366
|
use XML::Compile::WSDL11; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use XML::Compile::SOAP11; |
9
|
|
|
|
|
|
|
use XML::Compile::Transport::SOAPHTTP; |
10
|
|
|
|
|
|
|
use File::ShareDir (); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has server_version => ( |
13
|
|
|
|
|
|
|
is => 'ro', |
14
|
|
|
|
|
|
|
isa => 'Str', |
15
|
|
|
|
|
|
|
default => 'Exchange2007_SP1', |
16
|
|
|
|
|
|
|
required => 0, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has use_negotiated_auth => ( |
20
|
|
|
|
|
|
|
is => 'ro', |
21
|
|
|
|
|
|
|
isa => 'Any', |
22
|
|
|
|
|
|
|
default => 0, |
23
|
|
|
|
|
|
|
required => 0, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has transporter => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa => 'XML::Compile::Transport::SOAPHTTP', |
29
|
|
|
|
|
|
|
lazy_build => 1, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _build_transporter { |
33
|
|
|
|
|
|
|
my $self = shift; |
34
|
|
|
|
|
|
|
my $addr = $self->server . '/EWS/Exchange.asmx'; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
if (not $self->use_negotiated_auth) { |
37
|
|
|
|
|
|
|
$addr = sprintf '%s:%s@%s', |
38
|
|
|
|
|
|
|
$self->username, $self->password, $addr; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $t = XML::Compile::Transport::SOAPHTTP->new( |
42
|
|
|
|
|
|
|
address => 'https://'. $addr); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
if ($self->use_negotiated_auth) { |
45
|
|
|
|
|
|
|
$t->userAgent->credentials($self->server.':443', '', |
46
|
|
|
|
|
|
|
$self->username, $self->password); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
return $t; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
has wsdl => ( |
53
|
|
|
|
|
|
|
is => 'ro', |
54
|
|
|
|
|
|
|
isa => 'XML::Compile::WSDL11', |
55
|
|
|
|
|
|
|
lazy_build => 1, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub _build_wsdl { |
59
|
|
|
|
|
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
XML::Compile->addSchemaDirs( $self->schema_path ); |
62
|
|
|
|
|
|
|
my $wsdl = XML::Compile::WSDL11->new('ews-services.wsdl'); |
63
|
|
|
|
|
|
|
$wsdl->importDefinitions('ews-types.xsd'); |
64
|
|
|
|
|
|
|
$wsdl->importDefinitions('ews-messages.xsd'); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
return $wsdl; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has schema_path => ( |
70
|
|
|
|
|
|
|
is => 'ro', |
71
|
|
|
|
|
|
|
isa => 'Str', |
72
|
|
|
|
|
|
|
lazy_build => 1, |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub _build_schema_path { |
76
|
|
|
|
|
|
|
my $self = shift; |
77
|
|
|
|
|
|
|
return File::ShareDir::dist_dir('EWS-Client'); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
no Moose::Role; |
81
|
|
|
|
|
|
|
1; |
82
|
|
|
|
|
|
|
|