| 1 | # ====================================================================== | ||||||||||
| 2 | # | ||||||||||
| 3 | # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) | ||||||||||
| 4 | # SOAP::Lite is free software; you can redistribute it | ||||||||||
| 5 | # and/or modify it under the same terms as Perl itself. | ||||||||||
| 6 | # | ||||||||||
| 7 | # ====================================================================== | ||||||||||
| 8 | |||||||||||
| 9 | package SOAP::Transport::LOCAL; | ||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 2 | our $VERSION = '1.27'; # VERSION | |||||||||
| 14 | |||||||||||
| 15 | # ====================================================================== | ||||||||||
| 16 | |||||||||||
| 17 | package SOAP::Transport::LOCAL::Client; | ||||||||||
| 18 | |||||||||||
| 19 | 2 | ▶ | use SOAP::Lite; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | |||||||||||
| 21 | 2 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 2 | our @ISA = qw(SOAP::Client SOAP::Server); | |||||||||
| 23 | |||||||||||
| 24 | 38 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=6 SCAR=17.9
| |||||||||||
| 25 | 38 | my $class = shift; | |||||||||
| 26 | 38 | ▶ | return $class if ref $class; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 3 | my @method_from; | |||||||||
| 28 | 3 | ▶ | while (@_) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 4 | ▶ | if ($class->can($_[0])) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 3 | push(@method_from, shift() => shift); | |||||||||
| 31 | } | ||||||||||
| 32 | else | ||||||||||
| 33 | { | ||||||||||
| 34 | # ignore unknown arguments | ||||||||||
| 35 | 1 | shift; | |||||||||
| 36 | } | ||||||||||
| 37 | } | ||||||||||
| 38 | 3 | my $self = $class->SUPER::new(); | |||||||||
| 39 | 3 | $self->is_success(1); # it's difficult to fail in this module | |||||||||
| 40 | 3 | $self->dispatch_to(@INC); | |||||||||
| 41 | 3 | ▶ | while (@method_from) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 3 | my($method, $param_ref) = splice(@method_from,0,2); | |||||||||
| 43 | 3 | ▶ | $self->$method(ref $param_ref eq 'ARRAY' | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | ? @$param_ref | ||||||||||
| 45 | : $param_ref) | ||||||||||
| 46 | } | ||||||||||
| 47 | 3 | return $self; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 1 | ▶ | sub send_receive { | ||||||||
|
Subroutine
send_receive: called CC=1 SCAR=0.0
| |||||||||||
| 51 | 1 | my ($self, %parameters) = @_; | |||||||||
| 52 | my ($envelope, $endpoint, $action) = | ||||||||||
| 53 | 1 | @parameters{qw(envelope endpoint action)}; | |||||||||
| 54 | |||||||||||
| 55 | 1 | SOAP::Trace::debug($envelope); | |||||||||
| 56 | 1 | my $response = $self->SUPER::handle($envelope); | |||||||||
| 57 | 1 | SOAP::Trace::debug($response); | |||||||||
| 58 | |||||||||||
| 59 | 1 | return $response; | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | # ====================================================================== | ||||||||||
| 63 | |||||||||||
| 64 | 2 | 1; | |||||||||
| 65 | |||||||||||
| 66 | __END__ | ||||||||||