home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _04fb366ac47181658cd0ef8405a39e65 < prev    next >
Text File  |  2004-06-01  |  2KB  |  79 lines

  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. # $Id: LOCAL.pm,v 1.3 2001/08/11 19:09:57 paulk Exp $
  8. #
  9. # ======================================================================
  10.  
  11. package SOAP::Transport::LOCAL;
  12.  
  13. use strict;
  14. use vars qw($VERSION);
  15. $VERSION = sprintf("%d.%s", map {s/_//g; $_} q$Name: release-0_55-public $ =~ /-(\d+)_([\d_]+)/);
  16.  
  17. # ======================================================================
  18.  
  19. package SOAP::Transport::LOCAL::Client;
  20.  
  21. use vars qw(@ISA);
  22. @ISA = qw(SOAP::Client SOAP::Server);
  23.  
  24. sub new { 
  25.   my $self = shift;
  26.  
  27.   unless (ref $self) {
  28.     my $class = ref($self) || $self;
  29.     my(@params, @methods);
  30.     while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) }
  31.     $self = $class->SUPER::new(@params);
  32.     $self->is_success(1);     # it's difficult to fail in this module
  33.     $self->dispatch_to(@INC);
  34.     while (@methods) { my($method, $params) = splice(@methods,0,2);
  35.       $self->$method(ref $params eq 'ARRAY' ? @$params : $params) 
  36.     }
  37.   }
  38.   return $self;
  39. }
  40.  
  41. sub send_receive {
  42.   my($self, %parameters) = @_;
  43.   my($envelope, $endpoint, $action) = 
  44.     @parameters{qw(envelope endpoint action)};
  45.  
  46.   SOAP::Trace::debug($envelope);
  47.   my $response = $self->SUPER::handle($envelope);
  48.   SOAP::Trace::debug($response);
  49.  
  50.   $response;
  51. }
  52.  
  53. # ======================================================================
  54.  
  55. 1;
  56.  
  57. __END__
  58.  
  59. =head1 NAME
  60.  
  61. SOAP::Transport::LOCAL - Client side no-transport support for SOAP::Lite
  62.  
  63. =head1 SYNOPSIS
  64.  
  65. =head1 DESCRIPTION
  66.  
  67. =head1 COPYRIGHT
  68.  
  69. Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.
  70.  
  71. This library is free software; you can redistribute it and/or modify
  72. it under the same terms as Perl itself.
  73.  
  74. =head1 AUTHOR
  75.  
  76. Paul Kulchenko (paulclinger@yahoo.com)
  77.  
  78. =cut
  79.