Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.9 KiB

  1. # ======================================================================
  2. #
  3. # Copyright (C) 2000-2001 Paul Kulchenko ([email protected])
  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: SOAP::Transport::LOCAL.pm,v 0.50 2001/04/18 11:45:14 $
  8. #
  9. # ======================================================================
  10. package SOAP::Transport::LOCAL;
  11. use strict;
  12. use vars qw($VERSION);
  13. $VERSION = '0.50';
  14. # ======================================================================
  15. package SOAP::Transport::LOCAL::Client;
  16. use vars qw(@ISA);
  17. @ISA = qw(SOAP::Client SOAP::Server);
  18. sub new {
  19. my $self = shift;
  20. unless (ref $self) {
  21. my $class = ref($self) || $self;
  22. my(@params, @methods);
  23. while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) }
  24. $self = $class->SUPER::new(@params);
  25. $self->is_success(1); # it's difficult to fail in this module
  26. $self->dispatch_to(@INC);
  27. while (@methods) { my($method, $params) = splice(@methods,0,2);
  28. $self->$method(ref $params eq 'ARRAY' ? @$params : $params)
  29. }
  30. }
  31. return $self;
  32. }
  33. sub send_receive {
  34. my($self, %parameters) = @_;
  35. my($envelope, $endpoint, $action) =
  36. @parameters{qw(envelope endpoint action)};
  37. SOAP::Trace::debug($envelope);
  38. my $response = $self->SUPER::handle($envelope);
  39. SOAP::Trace::debug($response);
  40. $response;
  41. }
  42. # ======================================================================
  43. 1;
  44. __END__
  45. =head1 NAME
  46. SOAP::Transport::LOCAL - Client side no-transport support for SOAP::Lite
  47. =head1 SYNOPSIS
  48. =head1 DESCRIPTION
  49. =head1 COPYRIGHT
  50. Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.
  51. This library is free software; you can redistribute it and/or modify
  52. it under the same terms as Perl itself.
  53. =head1 AUTHOR
  54. Paul Kulchenko (paulclinger@yahoo.com)
  55. =cut