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