Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/xampp/perl/vendor/lib/SOAP/Transport/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/xampp/perl/vendor/lib/SOAP/Transport/LOOPBACK.pm
# ======================================================================
#
# Copyright (C) 2007 Martin Kutter.
# Part of SOAP-Lite, Copyright (C) 2000-2001 Paul Kulchenko
#  (paulclinger@yahoo.com)
# You may distribute/modify this file under the same terms as perl itself.
#
# $ID: $
#
# ======================================================================

package SOAP::Transport::LOOPBACK;
use strict;

package SOAP::Transport::LOOPBACK::Client;
use strict;

use vars qw(@ISA);
use SOAP::Lite;
@ISA = qw(SOAP::Client);

sub new {
    return $_[0] if ref $_[0];
    return bless {}, $_[0];
}

sub send_receive {
    my($self, %parameters) = @_;

    $self->code(200);
    $self->message('OK');
    $self->is_success(1);
    $self->status('200 OK');

    return $parameters{envelope};
}

1;

__END__

=pod

=head1 NAME

SOAP::Transport::LOOPBACK - Test loopback transport backend (Client only)

=head1 DESCRIPTION

SOAP::Transport::LOOPBACK is a test transport backend for SOAP::Lite.

It just returns the XML request as response, thus allowing to test the
complete application stack of client applications from the front end down to
the transport layer without actually sending data over the wire.

Using this transport backend is triggered by setting a loopback:// URL.

Sending requests through this transport backend alway succeeds with the
following states:

 status: 200 OK
 code: 200
 message: OK

=head1 COPYRIGHT

Copyright (C) 2007 Martin Kutter. All rights reserved.

This file is part of SOAP-Lite, Copyright (C) 2000-2001 Paul Kulchenko.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=head1 AUTHOR

Martin Kutter E<lt>martin.kutter fen-net.deE<gt>

=cut