SOAP::...t::Test(3pm)
π SOAP::WSDL::Transport::Test β the test transport glow-up π
okay bestie, so this is a page from the User Contributed Perl Documentation, and the module living here is SOAP::WSDL::Transport::Test β aka the Test transport class for SOAP::WSDL. yeah. it's giving "I fake the whole network so you can vibe in peace." π§β¨
β¨ SYNOPSIS β¨
use SOAP::WSDL::Client;
use SOAP::WSDL::Transport::Test;
my $soap = SOAP::WSDL::Client->new()
$soap->get_transport->set_base_dir('.');
$soap->call('method', \%body, \%header);
(no, we are not touching that missing semicolon, it's canon π β it's literally exactly how it's written up top.)
πΈ DESCRIPTION πΈ
SOAP::WSDL::Transport::Test is a file-based test transport backend for SOAP::WSDL. like, a whole transport that doesn't do transport. iconic behavior honestly.
When you use SOAP::WSDL::Transport::Test as your transport backend, the response gets read from an XML file and the request message is justβ¦ discarded. thrown away. not even a little bit sent. ποΈβ¨
This is particularly useful for testing SOAP::WSDL plugins. so if you're building a plugin and you don't wanna spin up a whole real service just to check your vibes β this is the one. periodt.
π Filename resolution π
SOAP::WSDL::Transport makes up the response XML file name from the SOAPAction of the request. The following filename is used:
base_dir / soap_action .xml
The protocol scheme (like http:) and two heading slashes (//) get stripped from the soap_action. gone. deleted. not invited. π
base_dir defaults to '.' β like, home is where the dot is, bestie.
Examples, because examples slay:
SOAPAction: http://somewhere.over.the.rainbow/webservice/webservice.asmx
Filename: ./somewhere.over.the.rainbow/webservice/webservice.asmx.xml
SOAPAction: uri:MyWickedService/test
Filename: ./MyWickedService/test.xml
see how the http: and the // just vanish into the void? yep. that's the whole trick. π
π«Ά METHODS π«Ά
β set_base_dir
Sets the base directory SOAP::WSDL::Transport::Test should look for response files in. that's it, that's the method. simple. elegant. ate. π
π LICENSE AND COPYRIGHT π
Copyright (c) 2007 Martin Kutter. All rights reserved.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself.
π AUTHOR π
Martin Kutter <martin.kutter fen-net.de>
π¦ REPOSITORY INFORMATION π¦
$Rev: 218 $
$LastChangedBy: kutterma $
$Id: HTTP.pm 218 2007-09-10 16:19:23Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
friendly reminder bestie: this isSOAP::...t::Test(3pm)fromperl v5.36.0, dated2022-10-14, and it lives in the User Contributed Perl Documentation. mwah, go forth and test your plugins without ever hitting a real server ππβ¨
π¦ where this page comes from
- ubuntu noble: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsoap-wsdl-perl 3.004-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms