=head1 NAME XML::Compile::SOAP::Tester - test SOAP without daemon =head1 INHERITANCE =head1 SYNOPSIS # Do this BEFORE the client SOAP handlers are compiled! use XML::Compile::SOAP::Tester (); my $tester = XML::Compile::SOAP::Tester->new(@options); my $action = pack_type $my_ns, 'GetStockPrice'; sub get_stock_price(@) {...} # # with WSDL # use XML::Compile::WSDL11 (); my $wsdl = XML::Compile::WSDL11->new('my_wsdl.xml'); my $call = $wsdl->compileClient($action); $tester->fromWSDL($wsdl); $tester->addCallback($action, \&get_stock_price); my $answer = $call->($query); # # without WSDL # use XML::Compile::Util 'pack_type'; use XML::Compile::SOAP11::Client (); use XML::Compile::SOAP11::Server (); my $client = XML::Compile::SOAP11::Client->new; my $call = $client->compileRequest(...); my $server = XML::Compile::SOAP11::Server->new; my $answer = $server->compileAnswer( ... \&get_stock_price); $tester->actionCallback($my_action, $answer, $server); my $answer = $call->($query); =head1 DESCRIPTION Once you have instantiated this object, all compiled client calls will get re-routed to methods within the object. This is useful for debugging and regression tests. =head1 METHODS XML::Compile::SOAP::Tester-EB(OPTIONS) =over 4 Option --Default callbacks {} . callbacks => HASH | ARRAY =over 4 The HASH contains pairs of action-uri to code reference. Each pair is used to call L. The ARRAY contains two elements: a string C, C, or L object as first, and the HASH as second. To be precise: when only a HASH is passed, it is the same as an ARRAY with C and that HASH. =back =back =head2 Attributes $obj-EB(ACTION, CODE, ['SOAP11'|'SOAP12'|SOAP|'ANY']) =over 4 Change the callback of an ACTION to the CODE reference. By default, all known (ANY) soap versions will be affected. Callback changes to undefined actions are ignored. =back =head2 Run the server $obj-EB(OPTIONS) =over 4 Fake a request to a remote server. Which information is passed as the OPTIONS depends partially on the protocol. =back =head1 SEE ALSO This module is part of XML-Compile-SOAP distribution version 0.77, built on August 15, 2008. Website: F All modules in this suite: L, L, L, L, L, L, L. Please post questions or ideas to the mailinglist at F For life contact with other developers, visit the C<#xml-compile> channel on C. =head1 LICENSE Copyrights 2007-2008 by Mark Overmeer. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F