SOAP-Lite-1.19/000755 000770 000024 00000000000 12567356463 013363 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/bin/000755 000770 000024 00000000000 12567356463 014133 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/Changes000644 000770 000024 00000121420 12567356463 014656 0ustar00phredstaff000000 000000 # # Revision history for Perl extension SOAP::Lite. # The contents of this file provides a change history for the SOAP::Lite Perl module. New features are designated with a '+' and bug fixes with a '!'. Numbers in square brackets are sourceforge tracker IDs from https://sourceforge.net/tracker/?group_id=66000&atid=513017 Numbers with # are CPANRT tracker IDs from http://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite ----------------------------------------------------------------------- THIS RELEASE ----------------------------------------------------------------------- 1.19 August 26, 2015 ! #106665 Correct the version manually, no autoversioning, and the maintainer screwed up 1.18 August 25, 2015 ! Fix a couple of cases where undefined values were being passed to functions [github/redhotpenguin] ! Do not set content_length for compressed request [github/bor] ! Add test for check return of send_receive(), add titles for some tests [github/bor] 1.17 July 30, 2015 ! #106051 Fix utf8 encoding for CGI test (thanks cpan/ETHER for tips) 1.16 July 23, 2015 ! Fix empty release. Note to self - do not release code when wife is in early labor 1.15 July 21, 2015 + Preventing "billion laughs" exponential entity expansion attack [github/thilo-fester] 1.14 March 24, 2015 + Add header and body tags [@bubi6608] ! Fixed typo in trace logging example [@oschwald] + Converted the dist from using ExtUtils::MakeMaker to using Dist::Zilla [@mvuets] ! Cleaned up prereqs [@mvuets] ! Cleaned up author and release tests [@mvuets] 1.13 December 30, 2014 ! Fixed undefined value error when using bugzilla's xmlrpc.cgi (bugzilla's API) [dbeusee] 1.12 November 26, 2014 ! #100557 Redefined sub in SOAP::Lite::Deserializer::XMLSchema2001 1.11 February 21, 2014 ! #93080 bug when SOAP::Lite is trying to parse WSDL definition by https with custom settings 1.10 January 23, 2014 ! Fixed uninitialized warning when Context-Length is not set [github/dbeusee] ! avoid string eval in as_base64 [github/otrosien] ! #88915 warnings issued with using importing with +trace 1.09 January 14, 2013 ! #92025 tighten multipart content-type matching [dmn@debian.org] 1.08 November 8, 2013 ! #15703 add no_index for examples to prevent CPAN pollution [githumb.com/sergeyromanov] 1.07 November 7, 2013 ! #89948 Remove warning when Content-Id is not present 1.06 August 21, 2013 ! #87935 skip all MIME-Parser tests if it is not installed ! #87787 Use of uninitialized value $ns in Lite.pm 1.05 August 18, 2013 ! #87848 Fix manifest, fix invalid http version from release blunder 1.04 August 9, 2013 ! #87605 Skip XML::Parser::Lite tests if it is missing [github.com/omega] 1.03 August 4, 2013 ! #87195 Remove DIME::Tools dep until we can work around its issues 1.02 July 30, 2013 ! #87421 1.01 release blew out xml versions. mea culpa. 1.01 July 29, 2013 ! #84168 Test t/02-payload.t fails under Perl 5.17.10 ! #87127 TEST.pl removed from MANIFEST ! revert #85713 - various reports of environment failures 1.0 July 16, 2013 ! #85713 SOAP::Transport::HTTP, 500 error skips parsing of response ! No more Windows 98 client support. Wait, wut? ! Merge SOAP::Transport::TCP back into SOAP::Lite (for now) ! #82416: xop href cid: URI encoded support reported by Michael R. Davis (mrdvt92) ! #85208 bad test plan ! #83750 different headers for mod_perl vs mod_perl2 [Mithun Bhattacharya] 0.716 May 10, 2013 ! #17275 Client unable to detect fatal SOAP failure (e.g. unable to connect to host) ! #81471 Force array context for correct Apache header parsing in SOAP::Transport::HTTP ! #45611 deserializing SOAP message with composite attachment raises exception ! #84168 Test t/02-payload.t fails under Perl 5.17.10 ! #85098 Monkey patch for LWP::Protocol confuses the toolchain ! #78692 / #84724 / #83715 Sending large object (many levels deep) throws error Incorrect parameter ! #78502 t/08-schema.t noisy under 5.17.2 (unescaped left brace in regex is deprecated) ! #78608 Documentation for "+trace" ! #78639 Spelling error reported by Debian tools 0.715 ! #75938 Change to warning / add configuration variable to allow XML tags starting with /xml/i ! #76902 Missing info in "SSL CERTIFICATE AUTHENTICATION" documentation ! #74577 work around/fixes for success with MS WS https/compressed ! #74308 SOAP-Lite fails for operations with period in name ! #73802 client did not set the encoding of the soap-envelope to 'iso-8859-1' in HTTP-request ! #75019 HTTP server doesn't process PIPE signal ! #72836 Processing a SOAP 1.2 request breaks the next SOAP 1.1 response ! #70381 SOAP-Lite performance ! #53375 comments after ! #63693 Uninitalized value (again) ! #37360 Use of uninitialized variables in SOAP tests ! fixed encoding in xmlrpc keys ! #15176 problems with SOAP::Header ->value 0.714 Moved SOAP::Transport::TCP into SOAP-Transport-TPC distribution ! #70329 - not generating attributes properly (deleting id attribute) 0.713 ! #52637 error sending a request in perl 5.10.0 containing utf-8 data using the string data type ! #48775 Small bug in SOAP::Packager ! #51178 Emailing: SOAP-Lite-0.710.10.patch ! #55962 Spelling errors ! #52015 defined(%hash) deprecated in Perl 5.11 ! #63693 Uninitalized value ! #65655 Assignment of shift to list ! #58538 regression from 0.710.08 soap:Client,Application failed during request deserialization ! #64250 Bleadperl v5.13.7-297-g558b442 breaks SOAP::Lite 0.712 ! #68088 XML::Parser::Lite fails tests under perl 5.14 RC1 ! #69825 Bug in SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm 0.712 ! #57409 SOAP::Lite installation problem ! #52015 defined(%hash) deprecated in Perl 5.11 ! #39546 use of version.pm ! #52637 error sending a request in perl 5.10.0 containing utf-8 data using the string data type ! #55962 Spelling errors 0.712 SOAP::Transport::JABBER, SOAP::Transport::MQ and SOAP::Tranport::FTP are now in their own distributions. ! [2790747] Bugtracker specification in META.yml missing ! #45997: Inconsistency in SOAP::Serializer documentation ! #55618: HTTP_TRANSFER_ENCODING can be undefined in SOAP/Transpo ! [2946245] / #54106 Only last Cookie Set ! #50178: Win32 isuue with IO::SessionData and IO::SessionSet ! #41527: SOAP::Lite 0.69 with Apache2 HTTP Server module and mod_perl 2 returns 500 Internal 0.710.10 ! #49981: UDDI::Lite version not parsable by cpanplus (again) 0.710.09 ! #46444: use SOAP::Lite::Deserializer::XMLSchemaSOAP1_2 missing ! #37151: Strawberry perl 5.10 - Tests fail and then later hang ! #49981: UDDI::Lite version not parsable by cpanplus ! #49011: Fails to install under strawberry perl ! [2825166] In Constant DEFAULT_HTTP_CONTENT_TYPE ! [2832939] chunked client requests are returned 411(Length Required) ! [2860559] serious utf8 bug ! #44568 Tracing unavailable when SOAP::Lite is used as a server ! #44195 submitting patches / mention Nginx transport module in documentation ! [2777361] SOAP 1.2 Content-Type rejected ! #41937 ([patch] enable more tests) ! #39101: Apache2::Const::HTTP_BAD_REQUEST not defined ! #39672: serialization and autotype 'off' ! #41348: t/SOAP/Transport/HTTP/CGI.t failing on 5.6.x ! #20569: XMLRPC::Lite "wrong element 'nil'" exception on '' + require Task::Weaken + better META.yml generated (Alexandr Ciornii) 0.710.08 - Jul 13 2008 ! [ 2015071 ] HTTP header is no more accessible The HTTP header can be pre-filled again. Now, the HTTP header is cloned from a (possibly user defined) header for every request ! #37358: Test Failure in Strawberry perl - IO::SessionData ! #37359: Test Failure in Strawberry perl - IO::SessionSet ! [ 2005296 ] CPANTS says META.yml broken ! [ 2005288 ] CPANTS: has_humanreadable_license not ok ! #37040: Memory leak when calling WS using wsdl SOAP::Transport::HTTP->new() was leaking two scalars per call 0.710.07 ! [ 1963995 ] > not deserialized in result ! [ 1833218 ] < and > not deserialized in faultstring/detail ! [ 1959329 ] Incorrect Content-Type while sending requests with no parts ! [ 1945385 ] Incorrect starting part detection for Multipart/Related 0.710.06 ! #36477 SOAP::Lite Envelope not stripped down for XMLRPC ! #36455 XMLRPC::Transport::HTTP::CGI generates extra params 0.710.05 ! got version number right, finally. Thanks to Graham Barr, Andreas J. Koenig and Matt S Trout (in alphabetical order) for support 0.071.04 ! updated version number and fixed declaring version, so that perl 5.6.2 can parse it, too ! fixed memory leaks with XMLRPC::Lite v0.71.03 ! #35041: SOAP::Lite Passes Decoded Strings to LWP ! #35133: Version Unparsable by ExtUtils::MakeMaker ! #33973: KeepAlive fails to function ! #33773: redefined warnings ! #34514: Subclasses of XMLRPC::Serializer misbehave because of a "ref" call in SOAP::Lite (actually fixed in 0.71.01, but I forgot to add it to Changes) 0.71.02 ! [1942233] Memory leak in 0.69 && 0.71 0.71.01 ! #34515: Printing UTF-8 through SOAP::Transport::HTTP throws a warning ! Version numbers updated ! [1904955] Subclassing XMLRPC::Serializer broken 0.71 Feb 2008 - bumped up version. Just curious about commit e-mail. 0.70_08 Feb 25 2008 - bumped up version - accidentally uploaded a ppm to CPAN 0.70_07 Feb 25 2008 + Added additional callbacks to XML::Parser::Lite and made it work under (at least) perl5.6.2, 5.8.7, 5.8.8 and 5.10. Thanks to Adam Leggett. ! Fixes failing test on 5.10. The mechanism for determining whether a class is loaded in SOAP::Server has been changed to the following: Assume loaded if - the class is main - the class implements the required method - the corresponding module (file) exists in %INC This is still error prone - if you know a better algorithm, please help me out. 0.70_06 Feb 16 2008 ! Fixes failing test without FCGI installed 0.70_05 Feb 13 2008 ! Fixes #32971 Undefined subroutine &Apache::Constant::BAD_REQUEST called ! Fixes [ 1867264 ] [PATCH] handle empty complexTypes correctly ! Fixes #32810: [PATCH] handle empty complexTypes correctly (duplicate) ! Fixes [ 1864481 ] XML::Parser::Lite documentation is incomplete + Fixes [ 747302 ] Make tainting work with XML::Parser::Lite + Fixes [ 1864480 ] Make XML::Parser::Lite's private subs private ! Fixes [ uncategorized ] bad XML::Parser::Lite behaviour under perl 5.8 0.70_04 Jan 02 2008 ! Fixes #32008: Failed t/03-server.t tests 2-5 under Perl 5.10 on Mac OS X 10.3.9 ! Fixes [ 1855575 ] "P" autotyped as xsd:duration ! Fixes [ 1842314 ] Expect: 100-Continue does not work with Apache::SOAP ! Fixes #13140 unable to use local file as WSDL service description file Acually there is no bug, but just a missing comment in the examples... 0.70_03 Nov 18 2007 ! Fixes [ 1816906 ] 7/06_modules.t fails with Apache 1.27 ! Fixes [ 1414914 ] longs are serialized into xsd:int by default - ! Fixes [ 1833803 ] int numbers serialized as long ! Fixes #21113: sending xml files using SOAP::Transport::HTTP::CGI (actually trapped a documentation error) ! Fixes #3677: Line > 1000 characters breaks perl parser ! Fixes #11797: SOAP::Transport::HTTP::CGI returns HTTP response headers terminated by "\n" instead of "\r\n" ! Fixed #24211: strings with leading zero mistreated as int ! Fixed #25668: cannot build SOAP::Lite with mod_perl 1.29 ! Fixed #16897: SOAP::Lite 0.66 fails with UNIVERSAL::use ! Fixed #30741: SOAP::Transport::HTTP::Apache 0.70_02 Nov 08 2007 ! Fixed [ 1828412 ] SOAP::Lite serializes faults with wrong element order, thanks to Tom Fischer. ! Fixed [ 1073360 ] Failure to read() long requests under mod_perl (fixed for mod_perl before thanks to JT Justman, now fixed for CGI, too). ! Fixed #30339: envelope subroutine() in XMLRPC/Lite.pm incorrectly requires method parameter for a response envelope ! Fixed #26408: SOAP::Transport::HTTP needs to call extract_cookies when dealing with a cookie jar ! Fixed #22730 test failure on bleedperl ! Fixed #30271 Don't give strings with utf8 flag set to MIME::Base64::encode_base64(). ! Fixed [ 1816907 ] t/01_core.t fails on 5.6.x ! Fixed #24810 missing prerequisite LWP::UserAgent 0.70_01 Oct 18 2007 + Added LOOPBACK test transport backend. + Added more core tests ! Fixed #14052: 'use base' pragma no longer works for SOAP::Lite ! Fixed #27032: Some debugging-aid patches ! Fixed #22732: Documentation error for use_prefix() ! Fixed [ 1044270 ] Suppress type for array when autotyping off ! Fixed [ 1665916 ] encode_scalar needs "no strict 'refs'"? ! Fixed [ 1481017 ] Typo on CPAN's documentation ! Fixed [ 1750846 ] Error with ENV{EXPECT} ! Fixed [ 887015 ] Memory Leak ! Fixed [ 1700326 ] encode_data called incorrectly in envelope ! Fixed [ 1612405 ] Incorrect deserialization of arrays/vectors ! Fixed [ 1204279 ] Boolean serialization error and added test ! Fixed [ 1569418 ] anyURI Serialization problem 0.68 July 6 2006 ! Patched support for mod_perl Apache2 (thanks to JT Justman) ! Fixed bug where SOAP::SOM objects were not properly detected, serialized and returned (thanks chris at prather dot o r g) ! Fixed bug with default_ns and ns functions so that they serialized XML properly. + Started to add experimental DIME support - possible impacts to MIME support as well 0.65-beta7 May 12 2005 + Added default_ns and ns to replace the confusing use of uri() and use_prefex() 0.65-beta6 June 3 2005 ! Fixed bug resulting in XMLRPC requests to be serialized using the doc/literal serializer if serializing arrays 0.65-beta5 May 6 2005 ! Fixed critical bug which prevented all XMLRPC servers from working 0.65-beta4 Apr 3 2005 ! Fixed bug 1160881 - HTTP headers are now terminated by \r\n for compatibility with .NET and compliance with HTTP spec. ! Fixed 1158666 - stubmaker.pl no longer call deprecated subroutine + stubmaker.pl got a lot of enhancements - now has help and version output, run time options, etc. See 'man stubmaker.pl' for more. + Classes generated by stub_maker.pl now have a special subroutine called 'want_som.' When set to 1, the stub class will return a SOAP::SOM object for every request. ! Fixed bug 1149427 - now capable of returning SOAP::SOM objects from generated stub classes. 0.65-beta3 Mon Oct 25 2004 + SOAP::Lite will only warn you once when you call a doc/literal service + Added SOAP::Schema->cache_dir() and SOAP::Schema->cache_ttl(), which control how code stubs generated from WSDLs are cached to prevent constant reparsing of WSDL files. ! Tested SOAP::Lite against Google, Salesforce, and FedEx. So far, clients can successfully call these service providers (at least some of their operations) - testing does not provide 100% coverage of their APIs. 0.65-beta2.1 Mon Oct 25 2004 + Fixed bug in unit tests in which MIME::Tools was not properly detected resulting in failed unit tests for some users. + Fixed some documentation issues (speling, etc). 0.65-beta2 Mon Oct 25 2004 ** WARNING ** substantial changes have been made to SOAP::Lite in this release in regards to how it manages attachments. The changes may introduce instabilities into your software that relies on this functionality. Please test your software with 0.65 prior to moving it to a production environment. + Added ReleaseNotes.txt + Added section REPORTING BUGS to pod comments + Deprecated SOAP::Lite->schema removed + Deprecated SOAP::Lite->on_debug removed + Deprecated SOAP::Schema->schema in favor of SOAP::Schema->schema_url + Added SOAP::Schema->useragent - which returns the LWP::UserAgent instance that will be used when accessing WSDLs via the SOAP::Lite->service call. This is helpful when access to a WSDL requires authentication, etc. + Made changes that allow messages to be constructed using a NULL body: + Added constant OBJS_BY_REF_KEEPALIVE which defaults to 600 - this is so that services can configure how long to cache objects marked as persistent using SOAP::Server::Object->objects_by_reference() + Added the ability for a user to modify the UserAgent class used by SOAP::Transport::HTTP::Client, updated Transport.pm's documentation to reflect this. Added $SOAP::Transport::HTTP::Client::USERAGENT_CLASS variable as a means of setting this. + Added initial DIME support + SOAP Packager package/unpackage now take in a context variable as input because DIME needs to know what version of SOAP you are using. + Refactored and rewrote README + Renamed SOAP::Schema->stub() to SOAP::Schema->generate_stub. This populates a private variable called C with the autogenerate Perl code. + Added SOAP::Schema->stub() which returns the autogenerated Perl code used internally by SOAP::Lite. This can be helpful for debugging SOAP::Lite's utilization of WSDL, as well as helpful to developers working on S::L's WSDL support. 0.65-beta1 Mon Oct 18 15:55:00 2004 + Made SOAP::Serializer->readable actually produce readable XML! ! Fixed bug 747312 - Made XML Schema 2001 the default schema + Changed typelookup of base64 to base64Binary to conform with 2001 schema + Added support for [almost] all XML Schema 2001 built-in datatypes + Added register_ns subroutine to SOAP::Serializer + Added find_prefix subroutine to SOAP::Serializer + Added use_prefix subroutine to SOAP::Serializer + Added a necessary set of initial subroutinues to support wsdl2perl project + Added format_datetime to SOAP::Utils + Documented SOAP::SOM->parts + Added SOAP::SOM->is_multipart + Properly escaped characters to facilitate emacs syntax highlighting + Ran podchecker to validate all POD comments ! Fixed bug 749636 - changed a croak to a warn to enable socket timeouts in SOAP::Transport::TCP::Server + Added support for UDDI 2/3 + Majorly revamped product documentation thanks to the kind contribution made by O'Reilly. Appendix B from "Programming Web Services with Perl" has been completely integrated. + To better segment SOAP::Lite documentation, many modules have been added that contain documentation only. For those who loved the old documentation, it can be found in lib/OldDocs/SOAP/*.pm and lib/OldDocs/SOAP/Transport/*.pm ! Fix a bug in which doclit style arrays were not being deserialized properly. IOW, Repeated elements were not made into an array, only the last occurring value was recorded. + Added the ability for a SOAP Client to gain direct access to the HTTP::Request and HTTP::Response objects. + Changed default envelope namespace prefix from SOAP-ENV to soap + Changed default encoding namespace prefix from SOAP-ENC to soapenc + Reachitected MIME support to decouple MIME layer from transport layer. This only impacts the HTTP layer since that is the only transport in SOAP::Lite that supports attachments. + Creation of SOAP::Packager - decoupled in an extensible way the packaging of parts (a.k.a. attachments). This is used for encoding and decoding. This enables a more seemless addition of DIME support. Changes were made throughout SOAP::Lite to accomodate this functionality. - a call "context" was added to SOAP::Server and SOAP::Deserializer so that those classes could have access to the global SOAP::Packager instance - deprecated many function calls and packages having to do with attachment support - fixed several of the SOAP::*::new() methods so that they don't inadvertantly reinitialize themselves and destroy precious context information in the process + Gave developers direct access to MIME::Parser object so that they can optimize its use. See the following URL to optimize it for memory consumption, parsing speed, disk utilization, etc: http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm#OPTIMIZING_YOUR_PARSER + Added a context variable to SOAP::Serializer and SOAP::Deserializer so that they have mechanisms for getting instance data from the calling context. The value of context is either SOAP::Lite or SOAP::Server depending upon the role the service is playing in the transaction. Contexts are initialized when a call is made, and destroyed when a call is completed. + Greater than character '>' has been added to list of characters that will be automatically escaped. This is not a requirement by the XML spec, it is a MAY, but I am doing it after seeing a minority of people report a compatibility problem. - Removed deprecated methods: SOAP::Serializer::namespace and encodingspace + Added SOAP::Serializer::encodingStyle method which allows users to set the URI for default encodingStyle. + Added initial support for literal encoding style. EXPERIMENTAL + Added some true constant values representing various SOAP namespace URIs + Added SOAP::Constants::SUPPORTED_ENCODING_STYLES for better tracking of the set of encoding styles that the toolkit can [de]serialize ! Fixed bug 840172 - "Makefile.PL --noprompt flag broken," now fixed + Updated SOAP 1.2 URIs to the latest (TODO - maintain support for older ones) + Added HTTPS support for HTTP::Server Daemon class - thanks to Nils Sowen for this contribution ----------------------------------------------------------------------- PREVIOUS RELEASES ----------------------------------------------------------------------- 0.60 Mon Aug 18 12:10:27 2003 + Merged SOAP::MIME into SOAP::Lite's core + Cleaned up the UI for the Makefile.PL script - it now detects and indicated whether certain Perl modules have been detected. The table displaying installation preferences has been substantially cleaned up, the code is much more modular and relies on a simple data structure representing potential module dependencies. + Made the Makefile.PL script iterative - meaning, the user will be continually be presented with their preferences until they explicity choose to accept them and continue (bug 747295) + Differentiate between xsd:int and xsd:long to fix interoperability bug with Java Web services ! Fixed MIME interoperability bug with Apache Axis - Axis' MIME parser requires that MIME boundaries are terminiated by a CRLF character where the MIME::Tools package only outputs a CR character. A patch was integrated into the MIME::Tools module which allows SOAP::Lite to specify its own MIME Boundary delimiter ! SOAP Faultcodes are now properly typed a xsd:QName, whereas before they were xsd:string - to be honest, they are left untyped so that toolkits can serialize them according to the schema (bug 747283) ! Fixed documentation error around turning on a trace for multiple "channels" (bug 747310) ! Disabled SOAPStruct (bug 747316) ! Fixed XML::Parser::Expat vulnerability (bug 747265) ! Added item in TROUBLESHOOTING section explaining that there is a bug in Perl 5.8 that prevents +autodispatch from working properly. The workaround is to use dispatch_from instead (bug 747290) ! Fixed warning when autodispatched call has no parameters (bug 747286) ! Fixed warning when empty SOAPAction specified (bug 747278) ! Turned off HTTP keep alive patch by default, however users can now turn on the patch by setting the constant PATCH_HTTP_KEEPALIVE to 1 (bug 747281) ! Removed dependency on the URI module for non-HTTP transports (bug 747306) 0.55 Mon Apr 15 22:20:39 2002 ! fixed security vulnerability with fully qualified method names (thanks to Randal Schwartz, Ilya Martynov and many others) ! fixed problem with TCP transport and SSL (thanks to Chris Hurd) ! fixed TCP transport to specify correct length with utf8 strings (thanks to Robin Fuller) ! fixed incorrect encoding when parameters list includes undefined values (thanks to Chris Radcliff) ! updated 'xmlsoap' prefix (thanks to Pierre Denis) ! updated MIME parser to accept messages that start with 'From' (thanks to Chris Davies) + added check for TCP transport on Mac (thanks to Robin Fuller) + added check for shutdown() method on AIX (thanks to Jos Clijmans) + added check for blocking() method in TCP transport (thanks to Jos Clijmans) + optimized parsing strings with entity encoding (thanks to Mathieu Longtin) + added check for entity size for CGI transport ($SOAP::Constant::MAX_CONTENT_SIZE) (thanks to J. Klunder) + added example (google.pl) + updated tests and examples with new endpoints 0.52 Mon Oct 18 21:20:19 2001 ! fixed content_type returned under mod_perl with 500 SERVER ERROR status (thanks to Geoffrey Young and Scott Hutton) ! fixed problem with multiple bindings in WSDL file generated by MS SOAP toolkit ! fixed handling of boolean type in 1999 Schema and hexBinary type in 2001 Schema ! fixed warning and problem with WOULDBLOCK state in IO::SessionData (thanks to Marty Pauley) ! fixed miscalculation in position within sparse arrays ! fixed problem with URI when methods of SOAP::Data are called in certain order (thanks to Taras Shkvarchuk) ! fixed CRLF problem in CGI module on Windows platform under IIS (thanks to Werner Ackerl) ! fixed hex and hexBinary datatypes generation ! fixed content-length calculation when payload has multibyte utf8 characters ! fixed problem with XMLRPC and nested packages with more than two levels (thanks to Leonid Gernovski) ! fixed (again) memory leak in SOAP::Parser (thanks to Craig Johnston) + updated Jabber interface for new format of 'use Net::Jabber ...' does not work with Net::Jabber 1.022 and later + updated XMLRPC::Lite to not detect value as float for 'NaN' and 'INF' strings + updated XMLRPC::Lite to return 200OK on errors + updated XMLRPC do not specify charset in content-type + updated Makefile.PL to allow configuration from command line (thanks to Dana Powers) + updated publishing API tests for UDDI server to call a new server (GLUE) + changed close() to shutdown() in Daemon transport (thanks to Sean Meisner) + added support for HTTP_proxy and HTTP_proxy_* in WSDL access (thanks to Stephen Shortland) + added XMLRPC support in COM interface. XMLRPC client and server can be created using COM interface + added DO_NOT_PROCESS_XML_IN_MIME option for MIME parts with text/xml content type + modified deserialization algorithm that allows to properly deserialize SOAP1.2 messages when default is set to SOAP1.1 and vice versa + added fault in XMLRPC::Lite for incorrect datatypes specified by user (thanks to Paul Prescod) + added option to not generate XML declaration + added encoding for ']]>' (thanks to Matt Sergeant and James Amrhein) + added '\r' => ' ' conversion in strings + added complaint on incorrect simple types + added byNameOrOrder and byName functions for SOAP::Server::Parameters (thanks to Matt Stum) + added handling relative locations in in WSDL + added stringification of SOAP::Fault (thanks to Tim Jenness) + added documentation for SSL certificate authentication + added more examples (terraserver.pl, joke.pl, weblog.pl) + added more tests 0.51 Tue Jul 18 15:15:14 2001 ! fixed memory leak in SOAP::Parser (thanks to Ryan Adams and Michael Brown) ! fixed skipping undef elements in arrays under Perl 5.005 (thanks to Arne Georg Gleditsch) ! fixed warning from undefined type in out parameters (thanks to Jrg Ziefle) ! fixed autovivification warnings on 5.7.x (thanks to Igor Pechersky) ! fixed tests on 64bit systems (thanks to Gurusamy Sarathy) ! fixed installation problem with long filenames on MacOS (thanks to Alex Harper) ! fixed POP3 server (thanks to Kevin Hutchinson) ! number of fixes in XMLRPC::Lite o fixed requirement (thanks to Matthew Krenzer and Dana Powers) o fixed empty slot skipping (thanks to Jon Udell) o fixed serialization of "0"/""/undef values (thanks to Michael E. Gage) o fixed autodispatch (thanks to Craig Kelley) + added support for SOAP 1.2 (spec is still in draft, implementation is subject to change) + added extended array support (only in deserializer) sparse arrays multidimensional arrays (deserialized as array of arrays) partially transmitted arrays + modified XML::Parser::Lite to work on Perl 5.005 (thanks to John Gotts) fixed handling empty attributes as undef fixed minors (thanks to Duncan Cameron) + modified deserializer to work with different schemas (1999/2001) + added JABBER transport + added MQ transport + added mod_xmlrpc transport (Apache::XMLRPC::Lite) + added TCP over SSL transport + added non-blocking TCP multiserver + included FastCGI transport (thanks to Marko Asplund) + added support for APOP authentication in POP3 transport + added Encoding parameter for MAILTO transport (to choose base64/binary) + added 'autoresult' option (thanks to Mathieu Longtin) + added support for import directive in WSDL + added support for short (tModel) WSDL service descriptions + added support for multiple services/ports and allowed non-SOAP bindings in WSDL + added full search example UDDI->WSDL->SOAP (fullsearch.pl) + added charset in response message for HTTP transport + modified SOAPsh/XMLRPCsh to return all parameters (thanks to Chris Davies) + modified dispatch for XMLRPC server to work exactly as for SOAP server examples included in examples/XMLRPC directory + added example with Inline::C module (inline.daemon). Dispatch to C, C++, assembler, Java, Python and Tcl :). Thanks to Brian Ingerson for his Inline module. + all transport are available for both SOAP::Lite and XMLRPC::Lite: HTTP (daemon, CGI, mod_perl), SMTP/POP3, TCP, IO, JABBER, MQ + updated INCOMPATIBILITY section in README file + tested on Perl 5.00503, 5.6.0, 5.6.1, 5.7.1 and 5.7.2 + added SOAP Cookbook (http://cookbook.soaplite.com/) + added server scripts for MQ and JABBER transports + added roundtrip example for JABBER transport + updated documentation and added new examples + added more tests (more than 700 for now) 0.50 Wed Apr 18 11:45:14 2001 ! fixed tests on Windows platform ! fixed authInfo in UDDI publishing interface ! fixed mod_soap (Apache::SOAP) on Perl 5.005/5.004 ! fixed namespace prefix on arrays of arrays ! modified Content-encoding from 'compress' to 'deflate' + added XML::Parser::Lite, regexp-based XML parser used automatically when XML::Parser is not available + added examples of custom serialization and deserialization (XML::DOM) + added XMLRPC::Lite (XMLRPC client and server interface) all transports and features of SOAP::Lite should be available + added XMLRPC interactive shell (XMLRPCsh.pl) + added dispatching based on URI and SOAPAction (dispatch_with) + added dispatching to object (in addition to class/method) + added dispatch from specific class(es) (dispatch_from) + added limited support for mustUnderstand and actor attributes + added SOAP::Fault class for customization of returning Fault message + added charset in HTTP header for requests + added check for namespace and types resolving + added namespaces declarations from WSDL interface + added INCOMPATIBILITY section in README file + added live tests/examples for UDDI publishing interface + added live tests/examples for basic authentication + added XMLRPC server code that validates with Userland's validator + added more examples, tests and documentation 0.47 Wed Feb 21 17:11:12 2001 ! fixed lack of parameter in MAILTO transport ! fixed minimal version of COM interface to not require absent modules + added compression for HTTP transport + added mod_soap interface, add SOAP server functionality with couple of lines in .htaccess or httpd.conf file + added proper serialization of circular multiple references + significantly redesigned handling types and URIs ! incompatibilities with ApacheSOAP clients may occur + added handling PIPE and INT signals in Daemon server implementation + changed return from autodispatched calls: result() in scalar context and paramsall() in list context + redesigned tests and split on core and optional for smooth CPAN installation + added examples for cookie-based authorization + added examples in C# and PerlScript for COM interface + added more documentation for COM interface + updated documentation and added new examples 0.46 Wed Jan 31 16:30:24 2001 ! fixed SOAP:: prefix with SOAP::Lite objects ! fixed documentation installation on Unix ! changed interface of schema() method. Use service() instead + added COM interface single dll (standalone or minimal version, downloadable separately) doesn't require ROPE.dll, MSXML.dll or listener.asp tested on Windows 98/2K, and should work on Windows 9x/Me/NT/2K ASP and daemon server implementations examples in VB/VBS, Excel/VBA, JavaScript, Perl and ASP + added parsing multipart/form-data SOAP server can accept SOAP requests directly from web form examples are provided (examples/forms/*) + added Map type for hash encoding. Tested with ApacheSOAP + added function that maps classes to URI (maptype) + allowed multiple ports in WSDL + tested object interoperability with Apache SOAP + optimized internal functions 0.45 Tue Jan 16 00:38:04 2001 ! fixed interoperability problem with incorrect Array prefix for Apache SOAP + added interoperability tests for Apache SOAP + added interoperability tests with MS SOAP, 4s4c and Lucin implementations + added attachment parsing (singlepart/multipart MIME) Content-ID and Content-Location are supported text/xml fragments are supported and parsed all implementations support MIME encoded messages + added IO server implementation (for pipes, mail handlers, FTP and file processing) + added FTP client implementation + added global settings, shareable between objects + allowed empty URI and non-prefixed method (documentation included) + added tests for xml, xml with headers, single and multipart MIME + updated documentation and added examples + more that 300 tests in test suite 0.44 Tue Dec 12 23:52:12 2000 ! fixed mod_perl server to return '500 Server Error' in case of error ! fixed CGI server to work under PerlIS and PerlEx (thanks to Murray Nesbitt) + tested publishing API for UDDI::Lite, examples provided (thanks to Petr Janata for access to UDDI server and provided help) + added bi-directional TCP client/server, examples and tests provided + enabled de/serializer overloading on server side (in addition to client) + added optimization for objects-by-reference + added ForkingDaemon server implementation (thanks to Peter Fraenkel) + added SOAP::Custom::XML for XML processing, examples and tests provided + added SOAP::Test as simple test framework + added documentation for UDDI publishing API + redesigned examples and tests (~240 tests for now) 0.43 Tue Nov 28 01:47:02 2000 ! fixed bug in UDDI interface that made UDDI client almost useless ! fixed Makefile.PL ! tests confirmed that memory leak is gone + changed syntax for UDDI client to more flexible/convenient + added limited support for WSDL schemas. Dynamic and stub access supported + added script for stub generation (stubmaker.pl) + optimized code on server side + object interface for SOAP, UDDI and schemas are supported consistently + allowed manipulation of method's attributes and namespaces + added attributes encoding ('&', '<' and '"' are encoded) + updated documentation (thanks to Robert Barta who basically did this work) + added more examples and tests (154 for now) 0.42 Tue Nov 14 23:14:18 2000 + added UDDI client (UDDI::Lite) with documentation + added M-POST functionality in HTTP::Client + added redirect (3??) functionality in HTTP::Client + added session cache for M-POSTs and redirects + added conversion of all objects to o-b-r in parameters + changed passing envelope into method + allowed \x0d and \x0a in strings (will not do base64 encode) + added die with object that allows to specify complex Fault detail + optimized XML encoding + allowed function call with autodispatch + improved syntax for 'use SOAP::Lite' + added soap.tcp example for TCP server implementation + added tests with Microsoft implementation + added documentation and tests (145 for now) 0.41 Tue Oct 31 01:24:51 2000 ! fixed memory leak on server side ! fixed die on absence of HTTP::* modules on server side ! fixed working with keep-alive connections (added test with Xmethods) + changed autotyping from double to float + added support for proxy authorization (thanks to Murray Nesbitt) + added TCP client/server implementation + added benchmark for all implementations except smtp/pop3 + added SOAP::Trace for detail logging on client/server side + added examples/tests for Apache::Registry implementations + added more examples, documentation and tests (127 for now) 0.40 Sun Oct 15 18:20:55 2000 ! fixed die in mailto: protocol if you don't have URI::URL installed ! fixed misbehavior on Mac platform (thanks to Carl K. Cunningham) + added default namespace processing [xmlns] (thanks to Petr Janata) + added objects-by-reference, simple garbage collection and activation + added full access to envelope on server side + added versionMismatch reaction + added local: protocol for local binding without any transport + added examples for objects-by-reference: persistent/session iterators and chat (40 lines on server and 25 lines on client side) 0.39 Sun Oct 8 22:55:20 2000 ! fixed incompatibility with Perl 5.005 + added interactive Makefile.PL for CPAN installation 0.38 Thu Oct 5 22:06:20 2000 ! fixed namespace for base64 encoding ! fixed security problem on server side, upgrade is highly recommended + added HTTPS/SSL support + added SMTP client implementation + added POP3 server implementation + added support for Basic/Digest server authentication + added support for header(s) on client/server side with SOAP::Header + added Array and SOAPStruct for interoperability with ApacheSOAP + added generic class for server support SOAP::Server + added Actor attribute + added more examples, documentation and tests (88 for now) 0.36 Sun Sep 24 20:12:10 2000 ! fixed output parameters autobinding + added mod_perl server implementation + added recognizing all simple types mentioned in specification + added support for 'hex' type + added more documentation (twice as much as before) + added more tests (74 for now) 0.35 Sun Sep 17 23:57:10 2000 ! fixed minors (Response instead of Respond, server will map client's URI) + cleaned HTTP::Server internals (will go to SOAP::Server in the future) + test.pl won't abort on transport errors. Failed test will be skipped + added daemon server implementation + added cgi/daemon server implementation examples + added deserialization into blessed reference + added dynamic/static class/method binding + added output parameters matching based on signature (name/type) + added real object transferring back and forth (see example of Chatbot::Eliza, fixed for CODE references) + added more interoperability with on_action on client and server side + added new events (on_action, on_fault, on_nonserialized) + added global class settings with 'use SOAP::Lite ...' + added code for returning application errors on server + added autodispatch + added SOAP prefix to method calls + added more documentation + added more tests (54 for now) + added more examples (Chatbot::Eliza, My::PingPong) 0.32 Sun Sep 10 23:27:10 2000 ! fixed warnings with -w ! fixed blessed reference serialization. Assigned type has top priority + added working with current node in SOAP::SOM + SOAP::SOM::valueof returns nodeset + SOAP::SOM::match returns boolean in boolean context + added raw xml accepting and output + added UserAgent parameters to SOAP::Transport (understands timeout) + added better diagnostic on transport errors in test.pl + added 'method', 'fault', 'freeform' types of Envelope + added server implementation + added CGI interface to server implementation + added My::Examples.pm as example of loaded class for SOAP server + added more tests (47 for now) 0.31 Wed Sep 6 00:36:15 2000 + added expressions to SOAP::SOM->match method + added deserialization of circular references + added tests for deserialization + added documentation 0.3 Mon Sep 4 00:59:04 2000 + first public beta version + added live SOAP calls + added test suite (25 tests) + added documentation + added interactive shell (SOAPsh.pl) 0.2 Mon Aug 24 19:34:24 2000 - next stable version; works with public test servers 0.1 Mon Aug 11 23:12:02 2000 - first version; serialization part only SOAP-Lite-1.19/Debian_CPANTS.txt000644 000770 000024 00000356615 12567356463 016376 0ustar00phredstaff000000 000000 debian_pkg, CPAN_dist, CPAN_vers, N_bugs, N_patches "cpan-listchanges", "cpan-listchanges", "0.05", "0", "0" "cpanminus", "App-cpanminus", "1.4006", "0", "0" "dh-make-perl", "https://alioth.debian.org/frs/download.php/3502/dh-make-perl_0.72.orig.tar.gz", "0.72", "12", "0" "eekboek", "http://www.eekboek.nl/dl/EekBoek-2.00.03.tar.gz", "2.00.03", "2", "0" "gearman-server", "Gearman-Server", "1.11", "1", "1" "get-flash-videos", "http://googlecode.debian.net/p/get-flash-videos/App-get_flash_videos-1.24.tar.gz", "1.24", "0", "3" "jifty", "Jifty", "0.91117", "1", "1" "kephra", "Kephra", "not-uploaded", "0", "0" "libacme-bleach-perl", "Acme-Bleach", "1.12", "0", "1" "libacme-damn-perl", "Acme-Damn", "0.04", "0", "0" "libacme-eyedrops-perl", "Acme-EyeDrops", "1.55", "0", "0" "libacme-poe-knee-perl", "Acme-POE-Knee", "1.10", "0", "1" "libalgorithm-c3-perl", "Algorithm-C3", "0.08", "0", "0" "libalgorithm-diff-perl", "Algorithm-Diff", "1.19.02", "0", "2" "libalgorithm-diff-xs-perl", "Algorithm-Diff-XS", "0.04", "0", "0" "libalgorithm-merge-perl", "Algorithm-Merge", "0.08", "0", "1" "libalgorithm-munkres-perl", "Algorithm-Munkres", "0.08", "0", "0" "libalgorithm-permute-perl", "Algorithm-Permute", "0.12", "0", "0" "libalias-perl", "Alias", "2.32", "0", "0" "libaliased-perl", "aliased", "0.30", "0", "0" "libalien-wxwidgets-perl", "Alien-wxWidgets", "0.51", "0", "1" "libalzabo-perl", "Alzabo", "0.92", "0", "0" "libamazon-sqs-simple-perl", "Amazon-SQS-Simple", "1.06", "0", "0" "libany-moose-perl", "Any-Moose", "0.14", "0", "1" "libanydata-perl", "AnyData", "0.10", "0", "3" "libanyevent-dbi-perl", "AnyEvent-DBI", "2.1", "0", "1" "libanyevent-http-perl", "AnyEvent-HTTP", "2.11", "0", "0" "libanyevent-irc-perl", "AnyEvent-IRC", "0.96", "0", "1" "libanyevent-perl", "AnyEvent", "5.340", "0", "0" "libanyevent-redis-perl", "AnyEvent-Redis", "0.23", "0", "0" "libapache-asp-perl", "Apache-ASP", "2.61", "1", "2" "libapache-authenhook-perl", "Apache-AuthenHook", "2.00-04", "0", "0" "libapache-authznetldap-perl", "Apache-AuthzNetLDAP", "0.07", "0", "2" "libapache-configfile-perl", "Apache-ConfigFile", "1.18", "0", "4" "libapache-db-perl", "Apache-DB", "0.14", "0", "1" "libapache-dbi-perl", "Apache-DBI", "1.10", "0", "3" "libapache-dbilogger-perl", "Apache-DBILogger", "0.93", "0", "1" "libapache-htgroup-perl", "Apache-Htgroup", "1.23", "1", "0" "libapache-session-perl", "Apache-Session", "1.89", "0", "1" "libapache-session-wrapper-perl", "Apache-Session-Wrapper", "0.34", "0", "0" "libapache-sessionx-perl", "Apache-SessionX", "2.01", "2", "2" "libapache2-authcassimple-perl", "Apache2-AuthCASSimple", "0.10", "1", "0" "libapache2-authcookie-perl", "Apache-AuthCookie", "3.18", "0", "1" "libapache2-authenntlm-perl", "Apache2-AuthenNTLM", "0.02", "0", "0" "libapache2-mod-perl2", "http://perl.apache.org/dist/mod_perl-2.0.5.tar.gz", "2.0.5", "11", "11" "libapache2-reload-perl", "Apache-Reload", "0.11", "1", "1" "libapp-cli-perl", "App-CLI", "0.313", "0", "2" "libapp-cmd-perl", "App-Cmd", "0.311", "0", "0" "libapp-control-perl", "App-Control", "1.02", "0", "0" "libapp-daemon-perl", "App-Daemon", "0.11", "0", "0" "libapp-nopaste-perl", "App-Nopaste", "0.28", "0", "0" "libapp-options-perl", "App-Options", "1.12", "0", "0" "libapp-rad-perl", "App-Rad", "1.04", "0", "0" "libapp-repl-perl", "App-REPL", "0.012", "0", "0" "libarch-perl", "Arch", "0.5.2", "0", "0" "libarchive-any-perl", "Archive-Any", "0.0932", "0", "0" "libarchive-ar-perl", "Archive-Ar", "1.14", "0", "0" "libarchive-zip-perl", "Archive-Zip", "1.30", "2", "3" "libarray-compare-perl", "Array-Compare", "2.01", "0", "0" "libarray-diff-perl", "Array-Diff", "0.07", "0", "0" "libarray-printcols-perl", "Array-PrintCols", "2.1", "0", "0" "libarray-unique-perl", "Array-Unique", "0.08", "0", "0" "libasa-perl", "asa", "0.02", "0", "0" "libaspect-perl", "Aspect", "0.96", "0", "0" "libastro-fits-cfitsio-perl", "Astro-FITS-CFITSIO", "1.05", "2", "0" "libastro-fits-header-perl", "Astro-FITS-Header", "3.03", "0", "1" "libasync-interrupt-perl", "Async-Interrupt", "1.05", "0", "0" "libasync-mergepoint-perl", "Async-MergePoint", "0.03", "0", "0" "libaudio-cd-perl", "http://www.vanhemert.co.uk/disc-cover.html/files/Audio-CD-0.05.tar.gz", "0.05", "0", "1" "libaudio-ecasound-perl", "Audio-Ecasound", "1.01", "1", "1" "libaudio-file-perl", "Audio-File", "0.11", "1", "1" "libaudio-flac-decoder-perl", "Audio-FLAC-Decoder", "0.3", "1", "2" "libaudio-flac-header-perl", "Audio-FLAC-Header", "2.4", "0", "0" "libaudio-moosic-perl", "Audio-Moosic", "0.10", "1", "0" "libaudio-mpd-common-perl", "Audio-MPD-Common", "1.110550", "0", "0" "libaudio-mpd-perl", "Audio-MPD", "1.110560", "0", "0" "libaudio-musepack-perl", "Audio-Musepack", "1.0.1", "0", "0" "libaudio-rpld-perl", "Audio-RPLD", "0.003", "0", "1" "libaudio-scan-perl", "Audio-Scan", "0.87", "0", "0" "libaudio-wav-perl", "Audio-Wav", "0.12", "0", "1" "libaudio-wma-perl", "Audio-WMA", "1.3", "0", "0" "libauth-yubikey-decrypter-perl", "Auth-Yubikey_Decrypter", "0.07", "0", "0" "libauth-yubikey-webclient-perl", "Auth-Yubikey_WebClient", "2.00", "0", "0" "libauthen-bitcard-perl", "Authen-Bitcard", "0.89", "0", "1" "libauthen-captcha-perl", "Authen-Captcha", "1.023", "0", "2" "libauthen-cas-client-perl", "Authen-CAS-Client", "0.05", "0", "0" "libauthen-dechpwd-perl", "Authen-DecHpwd", "2.005", "0", "0" "libauthen-krb5-admin-perl", "Authen-Krb5-Admin", "0.11", "0", "2" "libauthen-krb5-perl", "Krb5", "1.9", "0", "3" "libauthen-krb5-simple-perl", "Authen-Krb5-Simple", "0.42", "0", "0" "libauthen-ntlm-perl", "NTLM", "1.08", "0", "1" "libauthen-pam-perl", "Authen-PAM", "0.16", "0", "0" "libauthen-passphrase-perl", "Authen-Passphrase", "0.007", "0", "0" "libauthen-radius-perl", "RadiusPerl", "0.20", "0", "3" "libauthen-sasl-cyrus-perl", "Authen-SASL-Cyrus", "0.13-server", "0", "7" "libauthen-sasl-perl", "Authen-SASL", "2.1500", "0", "1" "libauthen-simple-cdbi-perl", "Authen-Simple-CDBI", "0.2", "0", "0" "libauthen-simple-dbi-perl", "Authen-Simple-DBI", "0.2", "0", "0" "libauthen-simple-dbm-perl", "Authen-Simple-DBM", "0.2", "0", "0" "libauthen-simple-http-perl", "Authen-Simple-HTTP", "0.2", "0", "0" "libauthen-simple-kerberos-perl", "Authen-Simple-Kerberos", "0.1", "0", "0" "libauthen-simple-ldap-perl", "Authen-Simple-LDAP", "0.2", "0", "0" "libauthen-simple-net-perl", "Authen-Simple-Net", "0.2", "0", "0" "libauthen-simple-pam-perl", "Authen-Simple-PAM", "0.2", "0", "0" "libauthen-simple-passwd-perl", "Authen-Simple-Passwd", "0.6", "0", "0" "libauthen-simple-perl", "Authen-Simple", "0.4", "0", "0" "libauthen-simple-radius-perl", "Authen-Simple-RADIUS", "0.1", "0", "0" "libauthen-simple-smb-perl", "Authen-Simple-SMB", "0.1", "0", "0" "libauthen-smb-perl", "Authen-Smb", "0.91", "0", "1" "libauthen-tacacsplus-perl", "Authen-TacacsPlus", "0.20", "0", "0" "libautobox-core-perl", "autobox-Core", "1.2", "0", "0" "libautobox-list-util-perl", "autobox-List-Util", "20090629", "0", "0" "libautobox-perl", "autobox", "2.72", "0", "1" "libautodie-perl", "autodie", "2.10", "0", "0" "libautovivification-perl", "autovivification", "0.09", "0", "0" "libb-hooks-endofscope-perl", "B-Hooks-EndOfScope", "0.08", "0", "0" "libb-hooks-op-annotation-perl", "B-Hooks-OP-Annotation", "0.44", "0", "0" "libb-hooks-op-check-perl", "B-Hooks-OP-Check", "0.18", "0", "0" "libb-hooks-op-ppaddr-perl", "B-Hooks-OP-PPAddr", "0.03", "0", "0" "libb-hooks-parser-perl", "B-Hooks-Parser", "0.09", "0", "0" "libb-keywords-perl", "B-Keywords", "1.09", "0", "0" "libb-perlreq-perl", "rpm-build-perl", "0.74", "0", "1" "libb-utils-perl", "B-Utils", "0.13", "0", "0" "libbarcode-code128-perl", "Barcode-Code128", "2.01", "0", "1" "libbenchmark-progressbar-perl", "Benchmark-ProgressBar", "0.00001", "0", "0" "libbenchmark-timer-perl", "Benchmark-Timer", "0.7102", "0", "0" "libbiblio-citation-parser-perl", "Biblio-Citation-Parser", "1.10", "0", "1" "libbiblio-endnotestyle-perl", "Biblio-EndnoteStyle", "0.05", "0", "0" "libbio-asn1-entrezgene-perl", "unknown", "1.091", "0", "0" "libbio-primerdesigner-perl", "Bio-PrimerDesigner", "0.07", "0", "0" "libbio-scf-perl", "Bio-SCF", "1.03", "1", "0" "libbit-vector-minimal-perl", "Bit-Vector-Minimal", "1.3", "0", "0" "libbit-vector-perl", "Bit-Vector", "7.1", "1", "0" "libboolean-perl", "boolean", "0.26", "0", "0" "libboulder-perl", "Boulder", "1.30", "0", "2" "libbrowser-open-perl", "Browser-Open", "0.03", "0", "0" "libbsd-resource-perl", "BSD-Resource", "1.2904", "0", "0" "libbusiness-isbn-data-perl", "Business-ISBN-Data", "20081208", "0", "1" "libbusiness-isbn-perl", "Business-ISBN", "2.05", "0", "0" "libbusiness-issn-perl", "Business-ISSN", "0.91", "0", "0" "libbusiness-onlinepayment-ippay-perl", "Business-OnlinePayment-IPPay", "0.06", "0", "1" "libbusiness-onlinepayment-openecho-perl", "Business-OnlinePayment-OpenECHO", "0.03", "0", "0" "libbusiness-onlinepayment-payflowpro-perl", "Business-OnlinePayment-PayflowPro", "1.01", "0", "0" "libbusiness-onlinepayment-paymentech-perl", "Business-OnlinePayment-PaymenTech", "2.04", "0", "0" "libbusiness-onlinepayment-perl", "Business-OnlinePayment", "3.01", "0", "1" "libbusiness-paypal-api-perl", "Business-PayPal-API", "0.69", "0", "0" "libbusiness-tax-vat-validation-perl", "Business-Tax-VAT-Validation", "0.20", "0", "0" "libc-scan-perl", "C-Scan", "not-uploaded", "0", "0" "libcache-cache-perl", "Cache-Cache", "1.06", "0", "0" "libcache-fastmmap-perl", "Cache-FastMmap", "1.36", "0", "0" "libcache-historical-perl", "Cache-Historical", "0.05", "0", "0" "libcache-memcached-managed-perl", "Cache-Memcached-Managed", "0.20", "0", "1" "libcache-memcached-perl", "Cache-Memcached", "1.29", "0", "1" "libcache-mmap-perl", "Cache-Mmap", "0.11", "0", "0" "libcache-simple-timedexpiry-perl", "Cache-Simple-TimedExpiry", "0.27", "0", "1" "libcairo-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Cairo-1.070.tar.gz", "1.070", "0", "1" "libcalendar-simple-perl", "Calendar-Simple", "1.21", "0", "0" "libcaptcha-recaptcha-perl", "Captcha-reCAPTCHA", "0.94", "0", "0" "libcapture-tiny-perl", "Capture-Tiny", "0.10", "0", "0" "libcarp-always-perl", "Carp-Always", "0.09", "0", "0" "libcarp-assert-more-perl", "Carp-Assert-More", "1.12", "0", "0" "libcarp-assert-perl", "Carp-Assert", "0.20", "0", "0" "libcarp-clan-perl", "Carp-Clan", "6.04", "0", "0" "libcarp-clan-share-perl", "Carp-Clan-Share", "0.013", "0", "0" "libcarp-datum-perl", "Carp-Datum", "0.1.3", "0", "1" "libcatalyst-action-rest-perl", "Catalyst-Action-REST", "0.90", "0", "0" "libcatalyst-controller-actionrole-perl", "Catalyst-Controller-ActionRole", "not-uploaded", "0", "0" "libcatalyst-devel-perl", "Catalyst-Devel", "1.31", "0", "0" "libcatalyst-engine-apache-perl", "Catalyst-Engine-Apache", "1.16", "0", "0" "libcatalyst-engine-psgi-perl", "Catalyst-Engine-PSGI", "0.12", "0", "1" "libcatalyst-manual-perl", "Catalyst-Manual", "5.8007", "0", "0" "libcatalyst-model-cdbi-perl", "Catalyst-Model-CDBI", "0.12", "0", "0" "libcatalyst-perl", "Catalyst-Runtime", "5.80032", "0", "0" "libcatalyst-plugin-server-perl", "Catalyst-Plugin-Server", "not-uploaded", "0", "1" "libcatalyst-plugin-session-store-memcached-perl", "Catalyst-Plugin-Session-Store-Memcached", "not-uploaded", "0", "0" "libcatalyst-view-tt-perl", "Catalyst-View-TT", "0.36", "0", "0" "libcatalystx-leakchecker-perl", "CatalystX-LeakChecker", "0.06", "0", "0" "libcddb-file-perl", "CDDB-File", "1.05", "0", "0" "libcddb-get-perl", "CDDB_get", "2.27", "1", "0" "libcddb-perl", "CDDB", "1.220", "0", "1" "libcdk-perl", "ftp://invisible-island.net/cdk/cdk-perl-20031210.tgz", "4.9.10", "0", "3" "libcgi-ajax-perl", "CGI-Ajax", "0.707", "0", "0" "libcgi-application-perl", "CGI-Application", "4.31", "0", "0" "libcgi-application-plugin-ajaxupload-perl", "CGI-Application-Plugin-AJAXUpload", "0.0.3", "0", "0" "libcgi-application-plugin-anytemplate-perl", "CGI-Application-Plugin-AnyTemplate", "0.18", "0", "1" "libcgi-application-plugin-authentication-perl", "CGI-Application-Plugin-Authentication", "0.20", "0", "0" "libcgi-application-plugin-authorization-perl", "CGI-Application-Plugin-Authorization", "0.07", "0", "1" "libcgi-application-plugin-tt-perl", "CGI-Application-Plugin-TT", "1.05", "0", "1" "libcgi-application-server-perl", "CGI-Application-Server", "0.062", "0", "0" "libcgi-cookie-splitter-perl", "CGI-Cookie-Splitter", "0.02", "1", "0" "libcgi-formalware-perl", "CGI-Formalware", "1.13", "0", "0" "libcgi-formbuilder-source-yaml-perl", "CGI-FormBuilder-Source-YAML", "1.0.8", "0", "0" "libcgi-minimal-perl", "CGI-Minimal", "not-uploaded", "0", "1" "libcgi-pm-perl", "CGI", "3.53", "0", "2" "libcgi-session-driver-memcached-perl", "CGI-Session-Driver-memcached", "0.04", "0", "0" "libcgi-session-expiresessions-perl", "CGI-Session-ExpireSessions", "1.12", "0", "0" "libcgi-session-perl", "CGI-Session", "4.43", "1", "1" "libcgi-session-serialize-yaml-perl", "CGI-Session-Serialize-yaml", "4.26", "0", "0" "libcgi-simple-perl", "CGI-Simple", "1.113", "0", "2" "libcgi-ssi-perl", "CGI-SSI", "0.92", "0", "1" "libcgi-untaint-date-perl", "CGI-Untaint-date", "1.00", "0", "0" "libcgi-untaint-email-perl", "CGI-Untaint-email", "0.03", "0", "0" "libcgi-untaint-perl", "CGI-Untaint", "1.26", "0", "0" "libcgi-uploader-perl", "CGI-Uploader", "2.17", "0", "1" "libcgi-validop-perl", "CGI-ValidOp", "0.56", "0", "0" "libcgi-xml-perl", "CGI-XML", "0.1", "0", "1" "libcgi-xmlapplication-perl", "CGI-XMLApplication", "1.1.3", "0", "0" "libcgi-xmlform-perl", "CGI-XMLForm", "0.10", "0", "1" "libchart-clicker-perl", "Chart-Clicker", "2.67", "0", "0" "libchart-gnuplot-perl", "Chart-Gnuplot", "0.15", "0", "0" "libchart-perl", "Chart", "2.4.1", "2", "2" "libcheck-isa-perl", "Check-ISA", "0.04", "0", "0" "libchemistry-elements-perl", "Chemistry-Elements", "1.07", "0", "1" "libchi-perl", "CHI", "0.47", "0", "2" "libchild-perl", "Child", "0.009", "0", "0" "libclass-accessor-children-perl", "Class-Accessor-Children", "0.02", "0", "0" "libclass-accessor-classy-perl", "Class-Accessor-Classy", "0.9.1", "0", "0" "libclass-accessor-grouped-perl", "Class-Accessor-Grouped", "0.10002", "1", "0" "libclass-accessor-lvalue-perl", "Class-Accessor-Lvalue", "0.11", "0", "0" "libclass-accessor-named-perl", "Class-Accessor-Named", "0.008", "0", "0" "libclass-accessor-perl", "Class-Accessor", "0.34", "0", "0" "libclass-adapter-perl", "Class-Adapter", "1.07", "0", "0" "libclass-autouse-perl", "Class-Autouse", "2.00", "0", "1" "libclass-base-perl", "Class-Base", "0.03", "0", "0" "libclass-c3-adopt-next-perl", "Class-C3-Adopt-NEXT", "0.12", "0", "0" "libclass-c3-componentised-perl", "Class-C3-Componentised", "1.0009", "0", "2" "libclass-c3-perl", "Class-C3", "0.23", "0", "1" "libclass-c3-xs-perl", "Class-C3-XS", "0.13", "0", "0" "libclass-container-perl", "Class-Container", "0.12", "0", "0" "libclass-data-accessor-perl", "Class-Data-Accessor", "0.04004", "0", "0" "libclass-data-inheritable-perl", "Class-Data-Inheritable", "0.08", "0", "0" "libclass-date-perl", "Class-Date", "1.1.10", "0", "0" "libclass-dbi-abstractsearch-perl", "Class-DBI-AbstractSearch", "0.07", "0", "1" "libclass-dbi-asform-perl", "Class-DBI-AsForm", "2.42", "0", "2" "libclass-dbi-fromcgi-perl", "Class-DBI-FromCGI", "1.00", "0", "0" "libclass-dbi-fromform-perl", "Class-DBI-FromForm", "0.04", "1", "0" "libclass-dbi-lite-perl", "Class-DBI-Lite", "1.019", "0", "0" "libclass-dbi-loader-perl", "Class-DBI-Loader", "0.34", "0", "0" "libclass-dbi-loader-relationship-perl", "Class-DBI-Loader-Relationship", "1.2", "0", "1" "libclass-dbi-mysql-perl", "Class-DBI-mysql", "1.00", "0", "1" "libclass-dbi-pager-perl", "Class-DBI-Pager", "0.08", "0", "0" "libclass-dbi-perl", "Class-DBI", "3.0.17", "2", "0" "libclass-dbi-pg-perl", "Class-DBI-Pg", "0.09", "0", "1" "libclass-dbi-plugin-abstractcount-perl", "Class-DBI-Plugin-AbstractCount", "0.08", "0", "0" "libclass-dbi-plugin-pager-perl", "Class-DBI-Plugin-Pager", "0.561", "0", "1" "libclass-dbi-plugin-perl", "Class-DBI-Plugin", "0.03", "0", "0" "libclass-dbi-plugin-retrieveall-perl", "Class-DBI-Plugin-RetrieveAll", "1.04", "0", "0" "libclass-dbi-plugin-type-perl", "Class-DBI-Plugin-Type", "0.02", "0", "0" "libclass-dbi-sqlite-perl", "Class-DBI-SQLite", "0.11", "0", "0" "libclass-dbi-sweet-perl", "Class-DBI-Sweet", "0.10", "0", "1" "libclass-default-perl", "Class-Default", "1.51", "0", "0" "libclass-factory-perl", "Class-Factory", "1.06", "0", "0" "libclass-factory-util-perl", "Class-Factory-Util", "1.7", "0", "0" "libclass-field-perl", "Class-Field", "0.15", "0", "0" "libclass-gomor-perl", "Class-Gomor", "1.02", "0", "1" "libclass-handle-perl", "Class-Handle", "1.07", "0", "0" "libclass-inner-perl", "Class-Inner", "0.200001", "0", "0" "libclass-insideout-perl", "Class-InsideOut", "1.10", "0", "1" "libclass-inspector-perl", "Class-Inspector", "1.25", "0", "1" "libclass-isa-perl", "Class-ISA", "0.36", "0", "0" "libclass-load-perl", "Class-Load", "0.06", "0", "0" "libclass-loader-perl", "Class-Loader", "2.03", "0", "0" "libclass-makemethods-perl", "Class-MakeMethods", "1.01", "0", "1" "libclass-meta-perl", "Class-Meta", "0.63", "0", "1" "libclass-method-modifiers-perl", "Class-Method-Modifiers", "1.06", "0", "0" "libclass-methodmaker-perl", "Class-MethodMaker", "2.15", "1", "1" "libclass-mixinfactory-perl", "Class-MixinFactory", "0.92", "0", "0" "libclass-mop-perl", "Class-MOP", "1.12", "0", "0" "libclass-multimethods-perl", "Class-Multimethods", "1.70", "0", "1" "libclass-objecttemplate-perl", "Class-ObjectTemplate", "0.7", "1", "0" "libclass-ooorno-perl", "Class-OOorNO", "0.011", "0", "0" "libclass-perl", "CLASS", "1.00", "0", "0" "libclass-prototyped-perl", "Class-Prototyped", "1.11", "0", "3" "libclass-returnvalue-perl", "Class-ReturnValue", "0.55", "0", "0" "libclass-singleton-perl", "Class-Singleton", "1.4", "0", "0" "libclass-spiffy-perl", "Class-Spiffy", "0.15", "1", "0" "libclass-std-fast-perl", "Class-Std-Fast", "0.0.8", "0", "0" "libclass-std-perl", "Class-Std", "0.0.9", "0", "0" "libclass-std-utils-perl", "Class-Std-Utils", "0.0.3", "0", "0" "libclass-throwable-perl", "Class-Throwable", "0.10", "0", "0" "libclass-unload-perl", "Class-Unload", "0.07", "0", "0" "libclass-whitehole-perl", "Class-WhiteHole", "0.04", "0", "0" "libclass-xsaccessor-perl", "Class-XSAccessor", "1.11", "0", "0" "libclone-fast-perl", "Clone-Fast", "0.93", "0", "2" "libclone-perl", "Clone", "0.31", "1", "0" "libclone-pp-perl", "Clone-PP", "1.02", "0", "0" "libclutter-perl", "Clutter", "1.002", "1", "1" "libcoat-perl", "Coat", "0.334", "1", "1" "libcoat-persistent-perl", "Coat-Persistent", "0.223", "0", "2" "libcolor-calc-perl", "Color-Calc", "1.071", "0", "0" "libcolor-library-perl", "Color-Library", "0.02", "0", "0" "libcolor-palette-perl", "Color-Palette", "0.091400", "0", "0" "libcommon-sense-perl", "common-sense", "3.4", "0", "0" "libcompress-bzip2-perl", "Compress-Bzip2", "2.09", "0", "2" "libcompress-raw-bzip2-perl", "Compress-Raw-Bzip2", "2.035", "0", "0" "libcompress-raw-zlib-perl", "Compress-Raw-Zlib", "2.035", "0", "1" "libconfig-any-perl", "Config-Any", "0.20", "0", "0" "libconfig-apacheformat-perl", "Config-ApacheFormat", "1.2", "0", "1" "libconfig-augeas-perl", "Config-Augeas", "0.701", "0", "0" "libconfig-auto-perl", "Config-Auto", "0.34", "0", "0" "libconfig-autoconf-perl", "Config-AutoConf", "0.16", "0", "0" "libconfig-file-perl", "Config-File", "1.50", "0", "0" "libconfig-gitlike-perl", "Config-GitLike", "1.05", "0", "1" "libconfig-grammar-perl", "Config-Grammar", "1.10", "0", "0" "libconfig-ini-perl", "Config-INI", "0.016", "0", "0" "libconfig-inihash-perl", "Config-IniHash", "3.01.01", "0", "0" "libconfig-jfdi-perl", "Config-JFDI", "0.065", "0", "0" "libconfig-json-perl", "Config-JSON", "1.5100", "0", "0" "libconfig-merge-perl", "Config-Merge", "1.01", "0", "0" "libconfig-model-approx-perl", "Config-Model-Approx", "1.003", "0", "0" "libconfig-model-backend-augeas-perl", "Config-Model-Backend-Augeas", "0.109", "0", "0" "libconfig-model-cursesui-perl", "Config-Model-CursesUI", "1.104", "0", "0" "libconfig-model-itself-perl", "Config-Model-Itself", "1.224", "0", "1" "libconfig-model-openssh-perl", "Config-Model-OpenSsh", "1.217", "0", "1" "libconfig-model-perl", "Config-Model", "1.244", "1", "1" "libconfig-model-tkui-perl", "Config-Model-TkUI", "1.324", "0", "0" "libconfig-mvp-perl", "Config-MVP", "2.200001", "0", "1" "libconfig-mvp-reader-ini-perl", "Config-MVP-Reader-INI", "2.101461", "0", "0" "libconfig-pit-perl", "Config-Pit", "0.04", "0", "0" "libconfig-scoped-perl", "Config-Scoped", "0.12", "0", "0" "libconfig-std-perl", "Config-Std", "0.9", "0", "0" "libconfig-yaml-perl", "Config-YAML", "1.42", "0", "1" "libconfigreader-perl", "ConfigReader", "0.5", "0", "2" "libconfigreader-simple-perl", "ConfigReader-Simple", "1.28", "0", "0" "libcontext-preserve-perl", "Context-Preserve", "0.01", "0", "0" "libcontextual-return-perl", "Contextual-Return", "0.003001", "0", "0" "libconvert-ascii-armour-perl", "Convert-ASCII-Armour", "1.4", "0", "0" "libconvert-asn1-perl", "Convert-ASN1", "0.22", "1", "0" "libconvert-binary-c-perl", "Convert-Binary-C", "0.76", "0", "1" "libconvert-binhex-perl", "Convert-BinHex", "1.119", "1", "1" "libconvert-color-perl", "Convert-Color", "0.07", "0", "0" "libconvert-nls-date-format-perl", "Convert-NLS_DATE_FORMAT", "0.02", "0", "0" "libconvert-pem-perl", "Convert-PEM", "0.08", "1", "0" "libcoro-perl", "Coro", "5.372", "0", "2" "libcoy-perl", "Coy", "0.06", "0", "1" "libcpan-changes-perl", "CPAN-Changes", "0.17", "0", "0" "libcpan-checksums-perl", "CPAN-Checksums", "2.03", "0", "0" "libcpan-distnameinfo-perl", "CPAN-DistnameInfo", "0.12", "0", "0" "libcpan-inject-perl", "CPAN-Inject", "1.13", "0", "0" "libcpan-meta-perl", "CPAN-Meta", "2.110930", "0", "0" "libcpan-meta-yaml-perl", "CPAN-Meta-YAML", "0.003", "0", "0" "libcpan-mini-perl", "CPAN-Mini", "1.111003", "0", "0" "libcpan-uploader-perl", "CPAN-Uploader", "0.103000", "0", "0" "libcpandb-perl", "CPANDB", "0.14", "0", "0" "libcps-perl", "CPS", "0.11", "0", "0" "libcrypt-blowfish-perl", "Crypt-Blowfish", "2.12", "0", "1" "libcrypt-cbc-perl", "Crypt-CBC", "2.30", "1", "0" "libcrypt-des-perl", "Crypt-DES", "2.05", "0", "0" "libcrypt-dh-gmp-perl", "Crypt-DH-GMP", "0.00009", "0", "1" "libcrypt-generatepassword-perl", "Crypt-GeneratePassword", "0.03", "0", "0" "libcrypt-mysql-perl", "Crypt-MySQL", "0.04", "0", "0" "libcrypt-openssl-bignum-perl", "Crypt-OpenSSL-Bignum", "0.04", "1", "0" "libcrypt-openssl-dsa-perl", "Crypt-OpenSSL-DSA", "0.13", "0", "3" "libcrypt-openssl-random-perl", "Crypt-OpenSSL-Random", "0.04", "0", "2" "libcrypt-openssl-rsa-perl", "Crypt-OpenSSL-RSA", "0.25", "0", "1" "libcrypt-openssl-x509-perl", "Crypt-OpenSSL-X509", "1.8.2", "0", "0" "libcrypt-rijndael-perl", "Crypt-Rijndael", "1.08", "0", "1" "libcrypt-saltedhash-perl", "Crypt-SaltedHash", "0.06", "0", "0" "libcrypt-simple-perl", "Crypt-Simple", "0.06", "0", "0" "libcrypt-twofish-perl", "Crypt-Twofish", "2.12", "0", "0" "libcss-dom-perl", "CSS-DOM", "0.14", "0", "0" "libcss-minifier-perl", "CSS-Minifier", "0.01", "0", "0" "libcss-minifier-xs-perl", "CSS-Minifier-XS", "0.07", "0", "0" "libcss-packer-perl", "CSS-Packer", "1.000001", "0", "0" "libcss-squish-perl", "CSS-Squish", "0.09", "0", "0" "libcss-tiny-perl", "CSS-Tiny", "1.19", "0", "0" "libcurses-perl", "Curses", "1.28", "0", "2" "libcurses-ui-perl", "Curses-UI", "0.9607", "2", "2" "libcurses-ui-poe-perl", "Curses-UI-POE", "not-uploaded", "0", "0" "libcurses-widgets-perl", "CursesWidgets", "1.997", "0", "2" "libcvs-perl", "Cvs", "0.07", "0", "1" "libdancer-perl", "Dancer", "1.3040", "0", "1" "libdancer-plugin-database-perl", "Dancer-Plugin-Database", "1.23", "0", "1" "libdanga-socket-perl", "Danga-Socket", "1.61", "0", "0" "libdata-alias-perl", "Data-Alias", "1.14", "0", "0" "libdata-amf-perl", "Data-AMF", "0.09", "0", "0" "libdata-dump-perl", "Data-Dump", "1.19", "0", "0" "libdata-dump-streamer-perl", "Data-Dump-Streamer", "2.31", "0", "1" "libdata-dumper-concise-perl", "Data-Dumper-Concise", "2.020", "0", "0" "libdata-dumper-simple-perl", "Data-Dumper-Simple", "0.11", "0", "0" "libdata-entropy-perl", "Data-Entropy", "0.007", "0", "0" "libdata-float-perl", "Data-Float", "0.011", "0", "0" "libdata-flow-perl", "Data-Flow", "1.02", "0", "0" "libdata-format-html-perl", "Data-Format-HTML", "0.5", "0", "1" "libdata-formvalidator-constraints-datetime-perl", "Data-FormValidator-Constraints-DateTime", "1.11", "0", "1" "libdata-formvalidator-perl", "Data-FormValidator", "4.66", "0", "0" "libdata-hexdumper-perl", "Data-Hexdumper", "2.01", "0", "0" "libdata-ical-perl", "Data-ICal", "0.16", "1", "0" "libdata-integer-perl", "Data-Integer", "0.004", "0", "0" "libdata-javascript-perl", "Data-JavaScript", "1.13", "0", "0" "libdata-miscellany-perl", "Data-Miscellany", "1.100850", "0", "0" "libdata-optlist-perl", "Data-OptList", "0.107", "0", "1" "libdata-pageset-perl", "Data-Pageset", "1.05", "0", "1" "libdata-parsebinary-perl", "Data-ParseBinary", "not-uploaded", "0", "2" "libdata-password-perl", "Data-Password", "1.07", "0", "1" "libdata-peek-perl", "Data-Peek", "0.32", "0", "0" "libdata-phrasebook-loader-yaml-perl", "Data-Phrasebook-Loader-YAML", "0.09", "0", "1" "libdata-phrasebook-perl", "Data-Phrasebook", "0.31", "0", "1" "libdata-random-perl", "Data-Random", "0.05", "0", "4" "libdata-report-perl", "Data-Report", "0.10", "0", "0" "libdata-section-perl", "Data-Section", "0.101621", "0", "0" "libdata-serializer-perl", "Data-Serializer", "0.57", "0", "0" "libdata-show-perl", "Data-Show", "0.001002", "0", "0" "libdata-showtable-perl", "Data-ShowTable", "3.3", "0", "2" "libdata-sorting-perl", "Data-Sorting", "0.9", "0", "2" "libdata-stag-perl", "Data-Stag", "0.11", "1", "4" "libdata-stream-bulk-perl", "Data-Stream-Bulk", "0.08", "0", "0" "libdata-structure-util-perl", "Data-Structure-Util", "0.15", "0", "0" "libdata-transformer-perl", "Data-Transformer", "0.04", "0", "0" "libdata-treedumper-perl", "Data-TreeDumper", "0.37", "0", "3" "libdata-treedumper-renderer-dhtml-perl", "Data-TreeDumper-Renderer-DHTML", "0.09", "0", "2" "libdata-types-perl", "Data-Types", "0.08", "0", "0" "libdata-uuid-libuuid-perl", "Data-UUID-LibUUID", "0.05", "0", "0" "libdata-validate-email-perl", "Data-Validate-Email", "0.04", "1", "1" "libdata-validate-ip-perl", "Data-Validate-IP", "0.14", "0", "0" "libdata-visitor-perl", "Data-Visitor", "0.27", "0", "0" "libdata-walk-perl", "Data-Walk", "1.00", "1", "1" "libdate-calc-perl", "Date-Calc", "6.0", "0", "1" "libdate-calc-xs-perl", "Date-Calc-XS", "not-uploaded", "0", "0" "libdate-convert-perl", "DateConvert", "0.16", "0", "0" "libdate-hijri-perl", "Date_Hijri", "0.02", "0", "0" "libdate-ical-perl", "Date-ICal", "1.72", "0", "0" "libdate-leapyear-perl", "Date-Leapyear", "1.72", "0", "0" "libdate-manip-perl", "Date-Manip", "6.23", "5", "1" "libdate-pcalc-perl", "Date-Pcalc", "6.1", "0", "1" "libdate-simple-perl", "Date-Simple", "3.03.03", "1", "1" "libdatetime-astro-sunrise-perl", "DateTime-Astro-Sunrise", "0.01.01", "1", "4" "libdatetime-event-ical-perl", "DateTime-Event-ICal", "0.10", "0", "1" "libdatetime-event-recurrence-perl", "DateTime-Event-Recurrence", "0.16", "0", "0" "libdatetime-event-sunrise-perl", "DateTime-Event-Sunrise", "0.0501", "0", "0" "libdatetime-format-builder-perl", "DateTime-Format-Builder", "0.8000", "0", "0" "libdatetime-format-dateparse-perl", "DateTime-Format-DateParse", "0.05", "0", "0" "libdatetime-format-db2-perl", "DateTime-Format-DB2", "0.05", "0", "0" "libdatetime-format-dbi-perl", "DateTime-Format-DBI", "0.040", "0", "0" "libdatetime-format-flexible-perl", "DateTime-Format-Flexible", "0.19", "0", "0" "libdatetime-format-http-perl", "DateTime-Format-HTTP", "0.40", "0", "0" "libdatetime-format-ical-perl", "DateTime-Format-ICal", "0.09", "0", "0" "libdatetime-format-iso8601-perl", "DateTime-Format-ISO8601", "0.06", "0", "0" "libdatetime-format-mail-perl", "DateTime-Format-Mail", "0.3001", "0", "0" "libdatetime-format-mysql-perl", "DateTime-Format-MySQL", "0.04", "0", "0" "libdatetime-format-natural-perl", "DateTime-Format-Natural", "0.95", "0", "1" "libdatetime-format-oracle-perl", "DateTime-Format-Oracle", "0.05", "0", "0" "libdatetime-format-pg-perl", "DateTime-Format-Pg", "0.16005", "0", "0" "libdatetime-format-sqlite-perl", "DateTime-Format-SQLite", "0.11", "0", "0" "libdatetime-format-strptime-perl", "DateTime-Format-Strptime", "1.5000", "0", "0" "libdatetime-format-w3cdtf-perl", "DateTime-Format-W3CDTF", "0.06", "0", "0" "libdatetime-locale-perl", "DateTime-Locale", "0.45", "0", "0" "libdatetime-perl", "DateTime", "0.7000", "0", "0" "libdatetime-set-perl", "DateTime-Set", "0.30", "0", "0" "libdatetime-timezone-perl", "DateTime-TimeZone", "1.34", "1", "0" "libdatetimex-easy-perl", "DateTimeX-Easy", "0.089", "0", "0" "libdb-file-lock-perl", "DB_File-Lock", "0.05", "0", "1" "libdbd-csv-perl", "DBD-CSV", "0.3100", "0", "1" "libdbd-excel-perl", "DBD-Excel", "0.06", "0", "2" "libdbd-mock-perl", "DBD-Mock", "1.39", "0", "0" "libdbd-mysql-perl", "DBD-mysql", "4.019", "2", "2" "libdbd-odbc-perl", "DBD-ODBC", "1.29", "0", "1" "libdbd-oracle-perl", "DBD-Oracle", "1.28", "0", "1" "libdbd-pg-perl", "DBD-Pg", "2.18.1", "0", "2" "libdbd-sqlite2-perl", "DBD-SQLite2", "0.33", "0", "1" "libdbd-sqlite3-perl", "DBD-SQLite", "1.31", "1", "2" "libdbd-xbase-perl", "DBD-XBase", "0.241", "0", "4" "libdbi-perl", "DBI", "1.616", "5", "3" "libdbicx-testdatabase-perl", "DBICx-TestDatabase", "0.04", "0", "0" "libdbix-abstract-perl", "DBIx-Abstract", "1.006", "0", "3" "libdbix-class-candy-perl", "DBIx-Class-Candy", "0.002000", "0", "0" "libdbix-class-cursor-cached-perl", "DBIx-Class-Cursor-Cached", "1.001001", "0", "0" "libdbix-class-datetime-epoch-perl", "DBIx-Class-DateTime-Epoch", "0.07", "0", "0" "libdbix-class-deploymenthandler-perl", "DBIx-Class-DeploymentHandler", "not-uploaded", "0", "0" "libdbix-class-dynamicdefault-perl", "DBIx-Class-DynamicDefault", "0.03", "0", "0" "libdbix-class-encodedcolumn-perl", "DBIx-Class-EncodedColumn", "0.00011", "0", "2" "libdbix-class-fixtures-perl", "DBIx-Class-Fixtures", "not-uploaded", "0", "0" "libdbix-class-helpers-perl", "DBIx-Class-Helpers", "not-uploaded", "0", "0" "libdbix-class-inflatecolumn-ip-perl", "DBIx-Class-InflateColumn-IP", "0.02001", "0", "0" "libdbix-class-introspectablem2m-perl", "DBIx-Class-IntrospectableM2M", "0.001001", "0", "0" "libdbix-class-perl", "DBIx-Class", "0.08127", "0", "2" "libdbix-class-resultset-recursiveupdate-perl", "DBIx-Class-ResultSet-RecursiveUpdate", "not-uploaded", "0", "0" "libdbix-class-schema-loader-perl", "DBIx-Class-Schema-Loader", "0.07010", "0", "0" "libdbix-class-timestamp-perl", "DBIx-Class-TimeStamp", "0.12", "0", "0" "libdbix-contextualfetch-perl", "DBIx-ContextualFetch", "1.03", "0", "0" "libdbix-oo-perl", "DBIx-OO", "0.0.9", "0", "1" "libdbix-password-perl", "DBIx-Password", "1.9", "0", "2" "libdbix-recordset-perl", "DBIx-Recordset", "0.26", "0", "6" "libdbix-safe-perl", "DBIx-Safe", "1.2.5", "0", "0" "libdbix-searchbuilder-perl", "DBIx-SearchBuilder", "1.59", "1", "1" "libdbix-sequence-perl", "DBIx-Sequence", "1.5", "1", "0" "libdbix-simple-perl", "DBIx-Simple", "1.32", "0", "0" "libdbix-xml-rdb-perl", "DBIx-XML_RDB", "0.05", "0", "0" "libdbix-xmlmessage-perl", "DBIx-XMLMessage", "0.05", "0", "0" "libdbm-deep-perl", "DBM-Deep", "2.0002", "0", "1" "libdebug-client-perl", "Debug-Client", "0.11", "0", "1" "libdebug-trace-perl", "Debug-Trace", "0.04", "0", "0" "libdevel-argnames-perl", "Devel-ArgNames", "0.03", "0", "0" "libdevel-backtrace-perl", "Devel-Backtrace", "0.12", "0", "0" "libdevel-bt-perl", "Devel-bt", "0.05", "1", "0" "libdevel-caller-ignorenamespaces-perl", "Devel-Caller-IgnoreNamespaces", "1.0", "0", "0" "libdevel-caller-perl", "Devel-Caller", "2.05", "0", "1" "libdevel-calltrace-perl", "Devel-CallTrace", "1.2", "0", "0" "libdevel-checklib-perl", "Devel-CheckLib", "0.93", "0", "0" "libdevel-cover-perl", "Devel-Cover", "0.77", "0", "4" "libdevel-cycle-perl", "Devel-Cycle", "1.11", "0", "0" "libdevel-declare-perl", "Devel-Declare", "0.006004", "0", "0" "libdevel-dprof-perl", "Devel-DProf", "20110228.00", "0", "0" "libdevel-dumpvar-perl", "Devel-Dumpvar", "0.04", "1", "0" "libdevel-ebug-perl", "Devel-ebug", "0.49", "0", "2" "libdevel-findref-perl", "Devel-FindRef", "1.422", "0", "0" "libdevel-gdb-perl", "Devel-GDB", "2.02", "0", "1" "libdevel-globaldestruction-perl", "Devel-GlobalDestruction", "0.03", "0", "0" "libdevel-leak-perl", "Devel-Leak", "0.03", "0", "0" "libdevel-lexalias-perl", "Devel-LexAlias", "0.04", "1", "0" "libdevel-nytprof-perl", "Devel-NYTProf", "4.06", "0", "2" "libdevel-partialdump-perl", "Devel-PartialDump", "0.15", "0", "0" "libdevel-patchperl-perl", "Devel-PatchPerl", "0.36", "0", "0" "libdevel-profile-perl", "Devel-Profile", "1.05", "0", "0" "libdevel-ptkdb-perl", "Devel-ptkdb", "1.1091", "0", "1" "libdevel-refactor-perl", "Devel-Refactor", "0.05", "0", "0" "libdevel-refcount-perl", "Devel-Refcount", "0.09", "0", "0" "libdevel-repl-perl", "Devel-REPL", "1.003012", "0", "2" "libdevel-simpletrace-perl", "Devel-SimpleTrace", "0.08", "0", "0" "libdevel-size-perl", "Devel-Size", "0.77", "0", "1" "libdevel-stacktrace-ashtml-perl", "Devel-StackTrace-AsHTML", "0.11", "0", "0" "libdevel-stacktrace-perl", "Devel-StackTrace", "1.2700", "0", "0" "libdevel-trace-perl", "Devel-Trace", "not-uploaded", "0", "1" "libdevice-cdio-perl", "Device-Cdio", "0.2.4", "1", "7" "libdevice-serialport-perl", "Device-SerialPort", "1.04", "0", "0" "libdevice-usb-perl", "Device-USB", "0.35", "0", "3" "libdigest-bubblebabble-perl", "Digest-BubbleBabble", "0.02", "0", "0" "libdigest-crc-perl", "Digest-CRC", "0.16", "0", "0" "libdigest-hmac-perl", "Digest-HMAC", "1.02", "0", "0" "libdigest-jhash-perl", "Digest-JHash", "0.06", "0", "0" "libdigest-md2-perl", "Digest-MD2", "2.03", "0", "0" "libdigest-md4-perl", "Digest-MD4", "1.5.dfsg", "0", "1" "libdigest-md5-file-perl", "Digest-MD5-File", "0.07", "0", "0" "libdigest-md6-perl", "Digest-MD6", "not-uploaded", "0", "0" "libdigest-perl", "Digest", "1.16", "0", "0" "libdigest-sha-perl", "Digest-SHA", "5.62", "0", "0" "libdigest-sha1-perl", "Digest-SHA1", "2.13", "2", "0" "libdir-purge-perl", "Dir-Purge", "1.02", "0", "0" "libdir-self-perl", "Dir-Self", "0.10", "0", "0" "libdirectory-scratch-perl", "Directory-Scratch", "0.14", "0", "0" "libdist-zilla-perl", "Dist-Zilla", "4.200006", "0", "0" "libdist-zilla-plugin-changelogfromgit-perl", "Dist-Zilla-Plugin-ChangelogFromGit", "0.002", "0", "0" "libdist-zilla-plugin-git-perl", "Dist-Zilla-Plugin-Git", "1.110500", "0", "0" "libdist-zilla-plugin-podspellingtests-perl", "Dist-Zilla-Plugin-PodSpellingTests", "1.103491", "0", "0" "libdist-zilla-plugin-podweaver-perl", "Dist-Zilla-Plugin-PodWeaver", "3.101641", "0", "0" "libdist-zilla-plugin-prepender-perl", "Dist-Zilla-Plugin-Prepender", "1.103470", "0", "0" "libdist-zilla-plugin-run-perl", "Dist-Zilla-Plugin-Run", "0.005", "0", "2" "libdist-zilla-plugins-cjm-perl", "Dist-Zilla-Plugins-CJM", "3.05", "0", "0" "libdpkg-log-perl", "DPKG-Log", "1.20", "0", "1" "libdublincore-record-perl", "DublinCore-Record", "0.03", "0", "0" "libelixirfm-perl", "http://qa.debian.org/watch/sf.php/elixir-fm/ElixirFM-1.1.976-Perl.tar.gz", "1.1.976", "0", "0" "libemail-abstract-perl", "Email-Abstract", "3.004", "0", "0" "libemail-address-perl", "Email-Address", "1.892", "1", "1" "libemail-date-format-perl", "Email-Date-Format", "1.002", "0", "0" "libemail-date-perl", "Email-Date", "1.103", "0", "0" "libemail-filter-perl", "Email-Filter", "1.032", "0", "0" "libemail-folder-perl", "Email-Folder", "0.855", "0", "0" "libemail-localdelivery-perl", "Email-LocalDelivery", "0.217", "0", "1" "libemail-messageid-perl", "Email-MessageID", "1.402", "0", "0" "libemail-mime-contenttype-perl", "Email-MIME-ContentType", "1.014", "0", "0" "libemail-mime-createhtml-perl", "Email-MIME-CreateHTML", "1.030", "0", "0" "libemail-mime-encodings-perl", "Email-MIME-Encodings", "1.313", "0", "0" "libemail-mime-perl", "Email-MIME", "1.907", "0", "0" "libemail-outlook-message-perl", "Email-Outlook-Message", "0.910", "0", "0" "libemail-received-perl", "Email-Received", "1.00", "0", "0" "libemail-send-io-perl", "Email-Send-IO", "2.200", "1", "0" "libemail-send-perl", "Email-Send", "2.198", "0", "2" "libemail-sender-perl", "Email-Sender", "0.110001", "0", "0" "libemail-sender-transport-smtp-tls-perl", "Email-Sender-Transport-SMTP-TLS", "0.07", "0", "0" "libemail-simple-perl", "Email-Simple", "2.100", "1", "0" "libemail-thread-perl", "Email-Thread", "0.711", "0", "0" "libemail-valid-loose-perl", "Email-Valid-Loose", "0.05", "0", "0" "libemail-valid-perl", "Email-Valid", "0.184", "0", "1" "libembperl-perl", "Embperl", "2.3.0", "1", "10" "libencode-arabic-perl", "http://qa.debian.org/watch/sf.php/encode-arabic/Encode-Arabic-1.9.tar.gz", "1.9", "0", "1" "libencode-detect-perl", "Encode-Detect", "1.01", "0", "0" "libencode-hanextra-perl", "Encode-HanExtra", "0.23", "0", "1" "libencode-imaputf7-perl", "Encode-IMAPUTF7", "1.05", "0", "0" "libencode-jis2k-perl", "Encode-JIS2K", "0.02", "0", "0" "libencode-locale-perl", "Encode-Locale", "1.02", "0", "1" "libencode-perl", "Encode", "2.42", "0", "1" "libend-perl", "End", "2009040201", "0", "0" "libenv-path-perl", "Env-Path", "0.18", "0", "0" "libenv-ps1-perl", "Env-PS1", "0.06", "0", "0" "libenv-sanctify-perl", "Env-Sanctify", "1.02", "0", "0" "libev-perl", "EV", "not-uploaded", "0", "1" "libeval-closure-perl", "Eval-Closure", "0.05", "0", "0" "libevent-perl", "Event", "1.15", "0", "1" "libevent-rpc-perl", "Event-RPC", "1.01", "0", "2" "libexception-class-dbi-perl", "Exception-Class-DBI", "1.00", "0", "0" "libexception-class-perl", "Exception-Class", "1.31", "0", "0" "libexception-class-trycatch-perl", "Exception-Class-TryCatch", "1.12", "0", "0" "libexception-handler-perl", "Exception-Handler", "1.004", "0", "0" "libexpect-simple-perl", "Expect-Simple", "0.04", "2", "0" "libexporter-lite-perl", "Exporter-Lite", "0.02", "0", "0" "libexporter-renaming-perl", "Exporter-Renaming", "1.19", "0", "0" "libexporter-tidy-perl", "Exporter-Tidy", "0.07", "0", "0" "libextutils-cbuilder-perl", "ExtUtils-CBuilder", "0.280202", "0", "1" "libextutils-cchecker-perl", "ExtUtils-CChecker", "0.07", "0", "0" "libextutils-command-perl", "ExtUtils-Command", "1.17", "0", "0" "libextutils-depends-perl", "ExtUtils-Depends", "0.304", "0", "0" "libextutils-f77-perl", "ExtUtils-F77", "1.17", "0", "0" "libextutils-install-perl", "ExtUtils-Install", "1.54", "2", "0" "libextutils-libbuilder-perl", "ExtUtils-LibBuilder", "0.04", "0", "0" "libextutils-parsexs-perl", "ExtUtils-ParseXS", "2.220600", "0", "0" "libextutils-pkgconfig-perl", "ExtUtils-PkgConfig", "1.12", "0", "0" "libextutils-xsbuilder-perl", "ExtUtils-XSBuilder", "0.28", "0", "2" "libextutils-xspp-perl", "ExtUtils-XSpp", "0.1601", "0", "0" "libfax-hylafax-client-perl", "Fax-Hylafax-Client", "1.02", "0", "0" "libfcgi-perl", "FCGI", "0.71", "1", "1" "libfcgi-procmanager-perl", "FCGI-ProcManager", "0.19", "0", "0" "libfeed-find-perl", "Feed-Find", "0.07", "0", "1" "libfile-basedir-perl", "File-BaseDir", "0.03", "0", "1" "libfile-bom-perl", "File-BOM", "0.14", "0", "0" "libfile-changenotify-perl", "File-ChangeNotify", "0.20", "0", "0" "libfile-chmod-perl", "File-chmod", "0.32", "0", "0" "libfile-copy-link-perl", "File-Copy-Link", "0.112", "0", "0" "libfile-copy-recursive-perl", "File-Copy-Recursive", "0.38", "1", "0" "libfile-counterfile-perl", "File-CounterFile", "1.04", "0", "0" "libfile-countlines-perl", "File-CountLines", "0.0.3", "0", "0" "libfile-desktopentry-perl", "File-DesktopEntry", "0.04", "1", "1" "libfile-dircompare-perl", "File-DirCompare", "0.6", "0", "0" "libfile-find-object-perl", "File-Find-Object", "0.2.1", "0", "0" "libfile-find-object-rule-perl", "File-Find-Object-Rule", "0.0300", "0", "0" "libfile-find-rule-perl", "File-Find-Rule", "0.32", "1", "1" "libfile-find-rule-perl-perl", "File-Find-Rule-Perl", "1.10", "0", "1" "libfile-find-rule-vcs-perl", "File-Find-Rule-VCS", "1.08", "0", "0" "libfile-finder-perl", "File-Finder", "0.53", "0", "0" "libfile-flock-perl", "File-Flock", "2008.01", "0", "0" "libfile-fnmatch-perl", "File-FnMatch", "0.02", "0", "0" "libfile-fu-perl", "File-Fu", "0.0.7", "0", "2" "libfile-homedir-perl", "File-HomeDir", "0.97", "0", "0" "libfile-libmagic-perl", "File-LibMagic", "0.96", "0", "1" "libfile-listing-perl", "File-Listing", "6.01", "0", "0" "libfile-localizenewlines-perl", "File-LocalizeNewlines", "1.11", "0", "0" "libfile-mimeinfo-perl", "File-MimeInfo", "0.15", "4", "0" "libfile-mmagic-xs-perl", "File-MMagic-XS", "0.09006", "0", "0" "libfile-modified-perl", "File-Modified", "0.07", "0", "0" "libfile-next-perl", "File-Next", "1.06", "1", "0" "libfile-path-expand-perl", "File-Path-Expand", "1.02", "0", "0" "libfile-path-perl", "File-Path", "2.08", "1", "0" "libfile-pid-perl", "File-Pid", "1.01", "0", "1" "libfile-policy-perl", "File-Policy", "1.005", "0", "0" "libfile-pushd-perl", "File-pushd", "1.00", "0", "0" "libfile-queue-perl", "File-Queue", "1.01a", "0", "0" "libfile-read-perl", "File-Read", "0.0801", "0", "0" "libfile-readbackwards-perl", "File-ReadBackwards", "1.04", "0", "0" "libfile-remove-perl", "File-Remove", "1.48", "0", "0" "libfile-scan-perl", "File-Scan", "1.43", "0", "2" "libfile-sharedir-install-perl", "File-ShareDir-Install", "0.03", "0", "0" "libfile-sharedir-par-perl", "File-ShareDir-PAR", "0.06", "0", "1" "libfile-slurp-unicode-perl", "File-Slurp-Unicode", "0.7.1", "0", "0" "libfile-spec-perl", "PathTools", "3.3300", "0", "0" "libfile-sync-perl", "File-Sync", "0.09", "0", "0" "libfile-temp-perl", "File-Temp", "0.22", "1", "0" "libfile-touch-perl", "File-Touch", "0.08", "0", "0" "libfile-type-webimages-perl", "File-Type-WebImages", "1.01", "0", "0" "libfile-userconfig-perl", "File-UserConfig", "0.06", "0", "0" "libfile-util-perl", "File-Util", "3.27", "0", "0" "libfile-which-perl", "File-Which", "1.08", "0", "1" "libfile-wildcard-perl", "File-Wildcard", "0.11", "0", "0" "libfilehandle-fmode-perl", "FileHandle-Fmode", "0.11", "0", "0" "libfilehandle-unget-perl", "FileHandle-Unget", "0.1623", "0", "1" "libfilesys-df-perl", "Filesys-Df", "0.92", "1", "0" "libfilesys-notify-simple-perl", "Filesys-Notify-Simple", "0.07", "0", "0" "libfilesys-smbclient-perl", "Filesys-SmbClient", "3.1", "1", "1" "libfilter-crypto-perl", "Filter-Crypto", "not-uploaded", "0", "0" "libfilter-eof-perl", "Filter-EOF", "0.04", "0", "0" "libfilter-template-perl", "Filter-Template", "1.040", "0", "0" "libfinance-bank-ie-permanenttsb-perl", "Finance-Bank-IE-PermanentTSB", "0.4", "0", "0" "libfinance-streamer-perl", "unknown", "1.10", "0", "0" "libfind-lib-perl", "Find-Lib", "1.01", "0", "0" "libflickr-api-perl", "Flickr-API", "1.01", "0", "1" "libflickr-upload-perl", "Flickr-Upload", "1.32", "0", "2" "libfont-afm-perl", "Font-AFM", "1.20", "0", "0" "libfont-freetype-perl", "Font-FreeType", "0.03", "1", "2" "libfont-ttf-perl", "Font-TTF", "0.48", "0", "2" "libforest-perl", "Forest", "0.09", "0", "1" "libforks-perl", "forks", "0.34", "1", "1" "libformat-human-bytes-perl", "Format-Human-Bytes", "0.05", "0", "0" "libformvalidator-simple-perl", "FormValidator-Simple", "0.28", "0", "0" "libfortune-perl", "Fortune", "0.2", "0", "0" "libfreezethaw-perl", "FreezeThaw", "0.5001", "0", "1" "libfrontier-rpc-perl", "Frontier-RPC", "0.07b4", "3", "2" "libgd-barcode-perl", "GD-Barcode", "1.15", "0", "0" "libgd-securityimage-perl", "GD-SecurityImage", "1.68", "0", "0" "libgd-svg-perl", "GD-SVG", "0.33", "0", "0" "libgearman-client-async-perl", "Gearman-Client-Async", "0.94", "2", "0" "libgearman-client-perl", "Gearman", "1.11", "1", "2" "libgeo-coder-googlev3-perl", "Geo-Coder-Googlev3", "not-uploaded", "0", "0" "libgeo-google-mapobject-perl", "Geo-Google-MapObject", "0.06", "0", "0" "libgeo-ipfree-perl", "Geo-IPfree", "1.110450", "0", "0" "libgeo-metar-perl", "Geo-METAR", "1.15", "0", "4" "libgeo-osm-tiles-perl", "Geo-OSM-Tiles", "0.04", "0", "0" "libgeography-countries-perl", "Geography-Countries", "2009041301", "0", "0" "libgeometry-primitive-perl", "Geometry-Primitive", "0.22", "0", "0" "libgetopt-argvfile-perl", "Getopt-ArgvFile", "1.11", "0", "0" "libgetopt-declare-perl", "Getopt-Declare", "1.14", "0", "0" "libgetopt-euclid-perl", "Getopt-Euclid", "0.2.2", "1", "0" "libgetopt-long-descriptive-perl", "Getopt-Long-Descriptive", "0.090", "0", "0" "libgetopt-lucid-perl", "Getopt-Lucid", "0.19", "0", "0" "libgetopt-tabular-perl", "Getopt-Tabular", "0.3", "0", "1" "libgetopt-usaginator-perl", "Getopt-Usaginator", "0.0012", "0", "0" "libgit-wrapper-perl", "Git-Wrapper", "0.014", "0", "0" "libgitalist-perl", "Gitalist", "not-uploaded", "0", "0" "libglib-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Glib-1.223.tar.gz", "1.223", "0", "5" "libgnome2-canvas-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gnome2-Canvas-1.002.tar.gz", "1.002", "0", "2" "libgnome2-gconf-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gnome2-GConf-1.044.tar.gz", "1.044", "0", "1" "libgnome2-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gnome2-1.042.tar.gz", "1.042", "1", "0" "libgnome2-vfs-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gnome2-VFS-1.081.tar.gz", "1.081", "0", "1" "libgnome2-wnck-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gnome2-Wnck-0.16.tar.gz", "0.16", "0", "1" "libgnupg-interface-perl", "GnuPG-Interface", "0.44", "5", "0" "libgnupg-perl", "GnuPG", "0.17", "0", "0" "libgoo-canvas-perl", "Goo-Canvas", "0.06", "0", "1" "libgps-point-perl", "GPS-Point", "0.17", "0", "1" "libgraph-easy-as-svg-perl", "Graph-Easy-As_svg", "0.23", "0", "0" "libgraph-easy-perl", "Graph-Easy", "0.70", "1", "0" "libgraph-readwrite-perl", "Graph-ReadWrite", "2.00", "0", "0" "libgraph-writer-graphviz-perl", "Graph-Writer-GraphViz", "0.10", "0", "1" "libgraphics-color-perl", "Graphics-Color", "0.27", "0", "0" "libgraphics-colornames-www-perl", "Graphics-ColorNames-WWW", "1.12", "0", "0" "libgraphics-gnuplotif-perl", "Graphics-GnuplotIF", "1.6", "0", "0" "libgraphics-libplot-perl", "Graphics-Libplot", "2.2.2", "0", "1" "libgraphics-primitive-driver-cairo-perl", "Graphics-Primitive-Driver-Cairo", "0.43", "0", "1" "libgraphics-primitive-perl", "Graphics-Primitive", "0.53", "0", "1" "libgravatar-url-perl", "Gravatar-URL", "1.04", "0", "0" "libgssapi-perl", "GSSAPI", "0.28", "0", "0" "libgstreamer-interfaces-perl", "GStreamer-Interfaces", "0.06", "0", "0" "libgstreamer-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/GStreamer-0.15.tar.gz", "0.15", "0", "6" "libgtk2-ex-entry-pango-perl", "Gtk2-Ex-Entry-Pango", "0.09", "0", "0" "libgtk2-ex-podviewer-perl", "Gtk2-Ex-PodViewer", "0.18", "0", "0" "libgtk2-ex-printdialog-perl", "Gtk2-Ex-PrintDialog", "0.03", "0", "1" "libgtk2-ex-simple-list-perl", "Gtk2-Ex-Simple-List", "0.50", "1", "0" "libgtk2-ex-volumebutton-perl", "Gtk2-Ex-VolumeButton", "0.07", "0", "0" "libgtk2-gladexml-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gtk2-GladeXML-1.007.tar.gz", "1.007", "0", "0" "libgtk2-gladexml-simple-perl", "Gtk2-GladeXML-Simple", "0.32", "0", "0" "libgtk2-imageview-perl", "Gtk2-ImageView", "0.05", "0", "0" "libgtk2-mozembed-perl", "Gtk2-MozEmbed", "0.08", "1", "3" "libgtk2-notify-perl", "Gtk2-Notify", "0.05", "0", "1" "libgtk2-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gtk2-1.223.tar.gz", "1.223", "0", "3" "libgtk2-sourceview2-perl", "Gtk2-SourceView2", "0.10", "0", "0" "libgtk2-spell-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gtk2-Spell-1.03.tar.gz", "1.03", "0", "1" "libgtk2-trayicon-perl", "http://qa.debian.org/watch/sf.php/gtk2-perl/Gtk2-TrayIcon-0.06.tar.gz", "0.06", "0", "0" "libgtk2-traymanager-perl", "Gtk2-TrayManager", "0.05", "0", "0" "libgtk2-unique-perl", "Gtk2-Unique", "0.05", "0", "1" "libgtk2-webkit-perl", "Gtk2-WebKit", "not-uploaded", "0", "0" "libguard-perl", "Guard", "1.02", "0", "0" "libhash-asobject-perl", "Hash-AsObject", "0.13", "0", "0" "libhash-case-perl", "Hash-Case", "1.006", "0", "0" "libhash-fieldhash-perl", "Hash-FieldHash", "0.10", "0", "0" "libhash-flatten-perl", "Hash-Flatten", "1.19", "0", "0" "libhash-merge-simple-perl", "Hash-Merge-Simple", "0.051", "0", "0" "libhash-moreutils-perl", "Hash-MoreUtils", "0.02", "0", "0" "libhash-multivalue-perl", "Hash-MultiValue", "0.08", "0", "0" "libhash-withdefaults-perl", "Hash-WithDefaults", "0.04", "0", "0" "libhook-lexwrap-perl", "Hook-LexWrap", "0.24", "0", "1" "libhook-wrapsub-perl", "Hook-WrapSub", "0.03", "0", "0" "libhtml-autopagerize-perl", "HTML-AutoPagerize", "0.01", "0", "0" "libhtml-calendarmonthsimple-perl", "HTML-CalendarMonthSimple", "1.25", "0", "0" "libhtml-clean-perl", "HTML-Clean", "0.8", "0", "5" "libhtml-copy-perl", "HTML-Copy", "1.30", "0", "0" "libhtml-display-perl", "HTML-Display", "0.39", "0", "0" "libhtml-encoding-perl", "HTML-Encoding", "0.61", "0", "0" "libhtml-fillinform-perl", "HTML-FillInForm", "2.00", "0", "0" "libhtml-form-perl", "HTML-Form", "6.00", "0", "0" "libhtml-format-perl", "HTML-Format", "2.05", "1", "0" "libhtml-formattext-withlinks-perl", "HTML-FormatText-WithLinks", "0.14", "0", "0" "libhtml-formfu-model-dbic-perl", "HTML-FormFu-Model-DBIC", "0.09000", "0", "2" "libhtml-formfu-perl", "HTML-FormFu", "0.09003", "0", "4" "libhtml-formhandler-model-dbic-perl", "HTML-FormHandler-Model-DBIC", "not-uploaded", "0", "0" "libhtml-formhandler-perl", "HTML-FormHandler", "not-uploaded", "0", "0" "libhtml-highlight-perl", "HTML-Highlight", "0.20", "0", "1" "libhtml-html5-parser-perl", "HTML-HTML5-Parser", "0.103", "0", "0" "libhtml-lint-perl", "HTML-Lint", "2.06", "2", "0" "libhtml-mason-perl", "HTML-Mason", "1.44", "6", "2" "libhtml-packer-perl", "HTML-Packer", "1.000", "0", "0" "libhtml-parser-perl", "HTML-Parser", "3.68", "0", "2" "libhtml-prototype-perl", "HTML-Prototype", "1.48", "0", "4" "libhtml-rewriteattributes-perl", "HTML-RewriteAttributes", "0.04", "0", "0" "libhtml-scrubber-perl", "HTML-Scrubber", "0.09", "2", "0" "libhtml-selector-xpath-perl", "HTML-Selector-XPath", "0.07", "0", "0" "libhtml-simpleparse-perl", "HTML-SimpleParse", "0.12", "0", "0" "libhtml-stream-perl", "HTML-Stream", "1.60", "0", "0" "libhtml-strip-perl", "HTML-Strip", "1.06", "0", "1" "libhtml-stripscripts-parser-perl", "HTML-StripScripts-Parser", "1.03", "0", "0" "libhtml-stripscripts-perl", "HTML-StripScripts", "1.05", "0", "0" "libhtml-tableextract-perl", "HTML-TableExtract", "2.10", "0", "1" "libhtml-tagcloud-perl", "HTML-TagCloud", "0.36", "0", "0" "libhtml-tagfilter-perl", "HTML-TagFilter", "1.03", "0", "0" "libhtml-tagset-perl", "HTML-Tagset", "3.20", "1", "1" "libhtml-template-compiled-perl", "HTML-Template-Compiled", "0.95", "0", "1" "libhtml-template-dumper-perl", "HTML-Template-Dumper", "0.1", "0", "2" "libhtml-template-expr-perl", "HTML-Template-Expr", "0.07", "0", "1" "libhtml-template-perl", "HTML-Template", "2.9", "0", "3" "libhtml-template-pluggable-perl", "HTML-Template-Pluggable", "0.17", "0", "1" "libhtml-template-pro-perl", "HTML-Template-Pro", "0.9503", "0", "0" "libhtml-tidy-perl", "HTML-Tidy", "1.50", "0", "2" "libhtml-tiny-perl", "HTML-Tiny", "1.05", "0", "1" "libhtml-toc-perl", "HTML-Toc", "1.12", "0", "0" "libhtml-tree-perl", "HTML-Tree", "4.2", "0", "1" "libhtml-treebuilder-xpath-perl", "HTML-TreeBuilder-XPath", "0.12", "0", "0" "libhtml-widget-perl", "HTML-Widget", "1.11", "0", "4" "libhtml-widgets-navmenu-perl", "HTML-Widgets-NavMenu", "1.0600", "0", "1" "libhtml-wikiconverter-dokuwiki-perl", "HTML-WikiConverter-DokuWiki", "0.53", "0", "0" "libhtml-wikiconverter-kwiki-perl", "HTML-WikiConverter-Kwiki", "0.51", "0", "0" "libhtml-wikiconverter-markdown-perl", "HTML-WikiConverter-Markdown", "0.02", "2", "0" "libhtml-wikiconverter-mediawiki-perl", "HTML-WikiConverter-MediaWiki", "0.59", "0", "0" "libhtml-wikiconverter-moinmoin-perl", "HTML-WikiConverter-MoinMoin", "0.53", "1", "0" "libhtml-wikiconverter-oddmuse-perl", "HTML-WikiConverter-Oddmuse", "0.52", "0", "0" "libhtml-wikiconverter-perl", "HTML-WikiConverter", "0.68", "2", "2" "libhtml-wikiconverter-phpwiki-perl", "HTML-WikiConverter-PhpWiki", "0.51", "0", "0" "libhtml-wikiconverter-pmwiki-perl", "HTML-WikiConverter-PmWiki", "0.51", "0", "0" "libhtml-wikiconverter-snipsnap-perl", "HTML-WikiConverter-SnipSnap", "0.50", "0", "0" "libhtml-wikiconverter-tikiwiki-perl", "HTML-WikiConverter-TikiWiki", "0.50", "0", "0" "libhtml-wikiconverter-usemod-perl", "HTML-WikiConverter-UseMod", "0.50", "0", "0" "libhtml-wikiconverter-wakkawiki-perl", "HTML-WikiConverter-WakkaWiki", "0.50", "0", "0" "libhtml-wikiconverter-wikkawiki-perl", "HTML-WikiConverter-WikkaWiki", "0.50", "0", "0" "libhttp-async-perl", "HTTP-Async", "0.09", "0", "1" "libhttp-body-perl", "HTTP-Body", "1.11", "0", "0" "libhttp-browserdetect-perl", "HTTP-BrowserDetect", "1.24", "0", "0" "libhttp-cookies-perl", "HTTP-Cookies", "6.00", "1", "0" "libhttp-daemon-perl", "HTTP-Daemon", "6.00", "1", "0" "libhttp-date-perl", "HTTP-Date", "6.00", "0", "0" "libhttp-exception-perl", "HTTP-Exception", "0.03001", "0", "0" "libhttp-lite-perl", "HTTP-Lite", "2.3", "0", "0" "libhttp-message-perl", "HTTP-Message", "6.01", "2", "0" "libhttp-negotiate-perl", "HTTP-Negotiate", "6.00", "0", "0" "libhttp-oai-perl", "HTTP-OAI", "3.24", "0", "0" "libhttp-parser-perl", "HTTP-Parser", "0.06", "0", "0" "libhttp-parser-xs-perl", "HTTP-Parser-XS", "0.12", "0", "0" "libhttp-proxy-perl", "HTTP-Proxy", "0.24", "1", "3" "libhttp-recorder-perl", "HTTP-Recorder", "0.05", "0", "0" "libhttp-request-ascgi-perl", "HTTP-Request-AsCGI", "1.2", "0", "0" "libhttp-request-params-perl", "HTTP-Request-Params", "1.01", "0", "0" "libhttp-response-encoding-perl", "HTTP-Response-Encoding", "0.05", "0", "0" "libhttp-server-simple-mason-perl", "HTTP-Server-Simple-Mason", "0.14", "0", "1" "libhttp-server-simple-perl", "HTTP-Server-Simple", "0.44", "1", "1" "libhttp-server-simple-psgi-perl", "HTTP-Server-Simple-PSGI", "0.14", "0", "0" "libhttp-server-simple-recorder-perl", "HTTP-Server-Simple-Recorder", "0.03", "0", "0" "libhttp-server-simple-static-perl", "HTTP-Server-Simple-Static", "0.07", "0", "0" "libhttp-tiny-perl", "HTTP-Tiny", "0.012", "0", "1" "libi18n-acceptlanguage-perl", "I18N-AcceptLanguage", "1.04", "0", "0" "libi18n-charset-perl", "I18N-Charset", "1.396", "0", "1" "libical-parser-perl", "iCal-Parser", "1.16", "0", "0" "libima-dbi-contextual-perl", "Ima-DBI-Contextual", "0.006", "0", "0" "libima-dbi-perl", "Ima-DBI", "0.35", "0", "1" "libimage-exif-perl", "Image-EXIF", "1.00.3", "1", "3" "libimage-librsvg-perl", "Image-LibRSVG", "0.07", "0", "1" "libimage-math-constrain-perl", "Image-Math-Constrain", "1.02", "0", "0" "libimage-seek-perl", "Image-Seek", "0.02", "0", "0" "libimage-size-perl", "Image-Size", "3.230", "0", "2" "libimager-perl", "Imager", "0.82", "0", "1" "libimap-admin-perl", "IMAP-Admin", "1.6.6", "0", "1" "libindirect-perl", "indirect", "0.23", "0", "0" "libinline-perl", "Inline", "0.47", "1", "2" "libio-aio-perl", "IO-AIO", "3.80", "1", "1" "libio-all-lwp-perl", "IO-All-LWP", "0.14", "0", "0" "libio-all-perl", "IO-All", "0.41", "0", "1" "libio-async-loop-epoll-perl", "IO-Async-Loop-Epoll", "0.11", "0", "0" "libio-async-loop-glib-perl", "IO-Async-Loop-Glib", "0.19", "0", "0" "libio-async-perl", "IO-Async", "0.40", "0", "0" "libio-bufferedselect-perl", "IO-BufferedSelect", "1.0", "0", "0" "libio-capture-perl", "IO-Capture", "0.05", "1", "1" "libio-captureoutput-perl", "IO-CaptureOutput", "1.1102", "0", "0" "libio-compress-perl", "IO-Compress", "2.035", "6", "0" "libio-epoll-perl", "IO-Epoll", "0.02", "1", "1" "libio-handle-util-perl", "IO-Handle-Util", "0.01", "0", "1" "libio-interactive-perl", "IO-Interactive", "0.0.6", "0", "0" "libio-interface-perl", "IO-Interface", "1.05", "0", "0" "libio-multiplex-perl", "IO-Multiplex", "1.13", "0", "0" "libio-prompt-perl", "IO-Prompt", "0.997001", "0", "2" "libio-socket-ip-perl", "IO-Socket-IP", "0.07", "0", "1" "libio-socket-multicast-perl", "IO-Socket-Multicast", "1.12", "1", "1" "libio-socket-multicast6-perl", "IO-Socket-Multicast6", "0.03", "0", "1" "libio-socket-socks-perl", "IO-Socket-Socks", "0.4", "0", "0" "libio-socket-ssl-perl", "IO-Socket-SSL", "1.43", "1", "0" "libio-string-perl", "IO-String", "1.08", "0", "0" "libio-tee-perl", "IO-Tee", "0.64", "0", "0" "libio-tiecombine-perl", "IO-TieCombine", "1.000", "0", "0" "libipc-pubsub-perl", "IPC-PubSub", "0.29", "0", "0" "libipc-run-perl", "IPC-Run", "0.89", "2", "1" "libipc-run3-perl", "IPC-Run3", "0.044", "0", "1" "libipc-shareable-perl", "IPC-Shareable", "0.60", "0", "2" "libipc-sharedcache-perl", "IPC-SharedCache", "1.3", "0", "1" "libipc-sharelite-perl", "IPC-ShareLite", "0.17", "1", "0" "libipc-system-simple-perl", "IPC-System-Simple", "1.21", "0", "0" "libiptables-chainmgr-perl", "http://www.cipherdyne.com/modules/IPTables-ChainMgr-0.9.tar.gz", "0.9", "0", "0" "libiptables-parse-perl", "http://www.cipherdyne.com/modules/IPTables-Parse-0.7.tar.gz", "0.7", "0", "0" "libjavascript-beautifier-perl", "JavaScript-Beautifier", "0.17", "0", "1" "libjavascript-minifier-xs-perl", "JavaScript-Minifier-XS", "0.09", "0", "0" "libjavascript-packer-perl", "JavaScript-Packer", "1.002001", "0", "0" "libjavascript-perl", "JavaScript", "1.16", "0", "4" "libje-perl", "JE", "0.055", "0", "0" "libjifty-dbi-perl", "Jifty-DBI", "0.68", "0", "0" "libjifty-plugin-authentication-bitcard-perl", "unknown", "0.053", "0", "0" "libjifty-plugin-authentication-cas-perl", "Jifty-Plugin-Authentication-CAS", "1.00", "0", "0" "libjifty-plugin-authentication-facebook-perl", "Jifty-Plugin-Authentication-Facebook", "0.90000", "0", "0" "libjifty-plugin-authentication-ldap-perl", "Jifty-Plugin-Authentication-Ldap", "1.01", "0", "0" "libjifty-plugin-authzldap-perl", "Jifty-Plugin-AuthzLDAP", "0.90000", "0", "0" "libjifty-plugin-chart-perl", "Jifty-Plugin-Chart", "1.01", "1", "0" "libjifty-plugin-comment-perl", "Jifty-Plugin-Comment", "1.00", "0", "0" "libjifty-plugin-googlemap-perl", "Jifty-Plugin-GoogleMap", "1.00", "0", "0" "libjifty-plugin-oauth-perl", "Jifty-Plugin-OAuth", "0.04", "0", "0" "libjifty-plugin-openid-perl", "Jifty-Plugin-OpenID", "1.02", "0", "1" "libjifty-plugin-sitenews-perl", "Jifty-Plugin-SiteNews", "0.90000", "0", "0" "libjifty-plugin-userpic-perl", "Jifty-Plugin-Userpic", "0.90000", "0", "0" "libjifty-plugin-wikitoolbar-perl", "Jifty-Plugin-WikiToolbar", "1.00", "0", "0" "libjira-client-perl", "JIRA-Client", "0.28", "0", "0" "libjson-any-perl", "JSON-Any", "1.22", "0", "0" "libjson-perl", "JSON", "2.51", "2", "0" "libjson-pp-perl", "JSON-PP", "2.27104", "0", "0" "libjson-rpc-perl", "JSON-RPC", "0.96", "0", "0" "libjson-xs-perl", "JSON-XS", "2.300", "1", "1" "libkinosearch-perl", "KinoSearch", "0.313", "2", "1" "libkinosearch1-perl", "KinoSearch1", "1.00", "1", "1" "libkiokudb-perl", "KiokuDB", "not-uploaded", "0", "1" "libkwiki-cache-perl", "Kwiki-Cache", "0.11", "0", "0" "libkwiki-perl", "Kwiki", "0.39", "1", "1" "liblatex-decode-perl", "LaTeX-Decode", "0.03", "0", "1" "liblatex-driver-perl", "LaTeX-Driver", "0.08", "0", "6" "liblatex-encode-perl", "LaTeX-Encode", "0.03", "1", "1" "liblatex-table-perl", "LaTeX-Table", "1.0.6", "0", "0" "liblayout-manager-perl", "Layout-Manager", "0.34", "0", "0" "liblchown-perl", "Lchown", "1.01", "0", "0" "liblexical-persistence-perl", "Lexical-Persistence", "0.98", "1", "0" "liblingua-en-inflect-number-perl", "Lingua-EN-Inflect-Number", "1.1", "0", "0" "liblingua-en-inflect-perl", "Lingua-EN-Inflect", "1.893", "0", "1" "liblingua-en-inflect-phrase-perl", "Lingua-EN-Inflect-Phrase", "0.04", "0", "0" "liblingua-en-nameparse-perl", "Lingua-EN-NameParse", "1.30", "0", "2" "liblingua-en-numbers-ordinate-perl", "Lingua-EN-Numbers-Ordinate", "1.02", "0", "0" "liblingua-en-tagger-perl", "Lingua-EN-Tagger", "0.16", "0", "3" "liblingua-es-numeros-perl", "Lingua-ES-Numeros", "0.08", "0", "0" "liblingua-ispell-perl", "Lingua-Ispell", "0.07", "0", "1" "liblingua-preferred-perl", "Lingua-Preferred", "0.2.4", "0", "0" "liblinux-distribution-packages-perl", "Linux-Distribution-Packages", "0.05", "0", "0" "liblinux-distribution-perl", "Linux-Distribution", "0.20", "0", "0" "liblinux-dvb-perl", "Linux-DVB", "1.01", "0", "0" "liblinux-lvm-perl", "Linux-LVM", "0.14", "1", "2" "liblinux-usermod-perl", "Linux-usermod", "0.69", "0", "0" "liblist-allutils-perl", "List-AllUtils", "0.02", "0", "0" "liblist-compare-perl", "List-Compare", "0.37", "0", "0" "liblist-maker-perl", "List-Maker", "0.0.5", "0", "0" "liblist-moreutils-perl", "List-MoreUtils", "0.25~02", "4", "0" "liblist-utilsby-perl", "List-UtilsBy", "0.07", "0", "0" "liblivejournal-perl", "http://forbidden.dough.net/~archon/lj/LiveJournal-1.3.tar.gz", "1.3", "0", "4" "libload-perl", "load", "0.19", "0", "0" "liblocal-lib-perl", "local-lib", "1.008004", "1", "0" "liblocale-currency-format-perl", "Locale-Currency-Format", "1.28", "0", "1" "liblocale-gettext-perl", "gettext", "1.05", "1", "2" "liblocale-hebrew-perl", "Locale-Hebrew", "1.04", "0", "0" "liblocale-maketext-fuzzy-perl", "Locale-Maketext-Fuzzy", "0.10", "0", "0" "liblocale-maketext-gettext-perl", "Locale-Maketext-Gettext", "1.28", "0", "0" "liblocale-maketext-lexicon-perl", "Locale-Maketext-Lexicon", "0.82", "0", "0" "liblocale-maketext-simple-perl", "Locale-Maketext-Simple", "0.21", "0", "0" "liblocale-msgfmt-perl", "Locale-Msgfmt", "0.14", "0", "0" "liblocale-subcountry-perl", "Locale-SubCountry", "1.47", "0", "0" "liblocale-us-perl", "Locale-US", "1.2", "0", "0" "liblocales-perl", "Locales", "0.16", "0", "1" "liblockfile-simple-perl", "LockFile-Simple", "0.207", "2", "2" "liblog-agent-logger-perl", "Log-Agent-Logger", "0.1.1", "0", "0" "liblog-agent-perl", "Log-Agent", "0.307", "0", "1" "liblog-agent-rotate-perl", "Log-Agent-Rotate", "0.104", "0", "0" "liblog-any-adapter-dispatch-perl", "Log-Any-Adapter-Dispatch", "0.06", "0", "1" "liblog-any-adapter-perl", "Log-Any-Adapter", "0.03", "0", "1" "liblog-contextual-perl", "Log-Contextual", "0.00304", "0", "0" "liblog-dispatch-array-perl", "Log-Dispatch-Array", "1.001", "0", "0" "liblog-dispatch-perl", "Log-Dispatch", "2.29", "0", "0" "liblog-dispatchouli-perl", "Log-Dispatchouli", "2.005", "0", "0" "liblog-handler-perl", "Log-Handler", "0.71", "0", "0" "liblog-loglite-perl", "Log-LogLite", "0.82", "0", "1" "liblog-trace-perl", "Log-Trace", "1.070", "1", "0" "liblog-tracemessages-perl", "Log-TraceMessages", "1.4", "0", "0" "liblogger-syslog-perl", "Logger-Syslog", "1.1", "1", "0" "liblwp-authen-wsse-perl", "LWP-Authen-Wsse", "0.05", "0", "0" "liblwp-mediatypes-perl", "LWP-MediaTypes", "6.01", "0", "0" "liblwp-online-perl", "LWP-Online", "1.07", "1", "0" "liblwp-protocol-http-socketunix-perl", "LWP-Protocol-http-SocketUnix", "0.02", "0", "0" "liblwp-protocol-https-perl", "LWP-Protocol-https", "not-uploaded", "0", "2" "liblwp-protocol-socks-perl", "LWP-Protocol-socks", "1.3", "0", "0" "liblwp-useragent-determined-perl", "LWP-UserAgent-Determined", "1.05", "0", "1" "libmail-box-perl", "Mail-Box", "2.098", "2", "2" "libmail-bulkmail-perl", "Mail-Bulkmail", "3.12", "0", "0" "libmail-cclient-perl", "Mail-Cclient", "1.12", "2", "1" "libmail-deliverystatus-bounceparser-perl", "Mail-DeliveryStatus-BounceParser", "1.527", "0", "0" "libmail-gnupg-perl", "Mail-GnuPG", "0.16", "0", "1" "libmail-imapclient-perl", "Mail-IMAPClient", "3.28", "0", "0" "libmail-imaptalk-perl", "Mail-IMAPTalk", "1.03", "0", "0" "libmail-listdetector-perl", "Mail-ListDetector", "1.03", "0", "0" "libmail-mbox-messageparser-perl", "Mail-Mbox-MessageParser", "1.5002", "0", "3" "libmail-mboxparser-perl", "Mail-MboxParser", "0.55", "3", "1" "libmail-rfc822-address-perl", "Mail-RFC822-Address", "0.3", "1", "0" "libmail-sendeasy-perl", "Mail-SendEasy", "1.2", "1", "2" "libmail-sendmail-perl", "Mail-Sendmail", "0.79.16", "1", "2" "libmail-srs-perl", "Mail-SRS", "0.31", "0", "0" "libmail-thread-perl", "Mail-Thread", "2.55", "0", "0" "libmail-verp-perl", "Mail-Verp", "0.06", "0", "0" "libmakefile-dom-perl", "Makefile-DOM", "0.004", "0", "1" "libmakefile-parser-perl", "Makefile-Parser", "0.211", "0", "1" "libmarc-charset-perl", "MARC-Charset", "1.31", "1", "0" "libmarc-crosswalk-dublincore-perl", "MARC-Crosswalk-DublinCore", "0.02", "0", "0" "libmarc-lint-perl", "MARC-Lint", "1.44", "0", "1" "libmarc-perl", "MARC", "1.07", "0", "1" "libmarc-record-perl", "MARC-Record", "2.0.3", "0", "0" "libmarc-xml-perl", "MARC-XML", "0.92", "0", "0" "libmasonx-interp-withcallbacks-perl", "MasonX-Interp-WithCallbacks", "1.18", "0", "0" "libmath-algebra-symbols-perl", "Math-Algebra-Symbols", "1.21", "0", "1" "libmath-base36-perl", "Math-Base36", "0.09", "0", "0" "libmath-base85-perl", "Math-Base85", "0.2", "0", "0" "libmath-basecalc-perl", "Math-BaseCalc", "1.016", "0", "0" "libmath-basecnv-perl", "Math-BaseCnv", "1.8.B59BrZX", "0", "0" "libmath-bezier-perl", "Math-Bezier", "0.01", "0", "0" "libmath-bigint-fastcalc-perl", "Math-BigInt-FastCalc", "not-uploaded", "0", "0" "libmath-bigint-gmp-perl", "Math-BigInt-GMP", "1.36", "0", "0" "libmath-bigint-perl", "Math-BigInt", "1.993", "0", "0" "libmath-calc-units-perl", "Math-Calc-Units", "1.07", "0", "1" "libmath-calculus-differentiate-perl", "Math-Calculus-Differentiate", "0.3", "0", "1" "libmath-calculus-expression-perl", "Math-Calculus-Expression", "0.2.2.ds", "0", "1" "libmath-calculus-newtonraphson-perl", "Math-Calculus-NewtonRaphson", "0.1", "0", "1" "libmath-combinatorics-perl", "Math-Combinatorics", "0.09", "0", "0" "libmath-derivative-perl", "Math-Derivative", "0.01", "0", "1" "libmath-fibonacci-perl", "Math-Fibonacci", "1.5", "0", "0" "libmath-gmp-perl", "Math-GMP", "2.06", "0", "0" "libmath-gradient-perl", "Math-Gradient", "0.04", "0", "1" "libmath-nocarry-perl", "Math-NoCarry", "1.11", "0", "1" "libmath-numbercruncher-perl", "Math-NumberCruncher", "5.00", "2", "1" "libmath-random-isaac-perl", "Math-Random-ISAAC", "1.003", "0", "0" "libmath-random-isaac-xs-perl", "Math-Random-ISAAC-XS", "1.003", "0", "0" "libmath-random-mt-perl", "Math-Random-MT", "1.10", "0", "0" "libmath-random-oo-perl", "Math-Random-OO", "0.21", "0", "0" "libmath-random-perl", "Math-Random", "0.71", "0", "2" "libmath-random-tt800-perl", "Math-Random-TT800", "1.01", "0", "0" "libmath-randomorg-perl", "Math-RandomOrg", "0.04", "0", "0" "libmath-round-perl", "Math-Round", "0.06", "0", "0" "libmath-sparsematrix-perl", "Math-SparseMatrix", "0.03", "0", "0" "libmath-sparsevector-perl", "Math-SparseVector", "0.04", "0", "0" "libmath-spline-perl", "Math-Spline", "0.01", "0", "0" "libmath-symbolic-perl", "Math-Symbolic", "0.606", "0", "1" "libmath-vec-perl", "Math-Vec", "1.01", "0", "0" "libmecab-perl", "http://qa.debian.org/watch/sf.php/mecab/mecab-perl-0.98.tar.gz", "0.98", "0", "0" "libmediawiki-api-perl", "MediaWiki-API", "0.35", "0", "0" "libmemoize-expirelru-perl", "Memoize-ExpireLRU", "0.55", "0", "0" "libmemoize-memcached-perl", "Memoize-Memcached", "0.03", "0", "1" "libmethod-alias-perl", "Method-Alias", "1.03", "0", "0" "libmethod-signatures-simple-perl", "Method-Signatures-Simple", "0.06", "0", "1" "libmime-base32-perl", "MIME-Base32", "1.02a", "0", "0" "libmime-base64-urlsafe-perl", "MIME-Base64-URLSafe", "0.01", "0", "0" "libmime-charset-perl", "MIME-Charset", "1.008.1", "0", "1" "libmime-encwords-perl", "MIME-EncWords", "1.012", "0", "1" "libmime-explode-perl", "MIME-Explode", "0.38", "0", "0" "libmime-lite-perl", "MIME-Lite", "3.027", "4", "0" "libmime-tools-perl", "MIME-tools", "5.502", "2", "1" "libmime-types-perl", "MIME-Types", "1.30", "1", "0" "libmixin-extrafields-param-perl", "Mixin-ExtraFields-Param", "0.011", "0", "0" "libmixin-extrafields-perl", "Mixin-ExtraFields", "0.008", "0", "0" "libmixin-linewise-perl", "Mixin-Linewise", "0.003", "0", "0" "libmkdoc-xml-perl", "MKDoc-XML", "0.75", "0", "0" "libmldbm-perl", "MLDBM", "2.04", "0", "0" "libmldbm-sync-perl", "MLDBM-Sync", "0.30", "0", "0" "libmocked-perl", "mocked", "0.09", "0", "0" "libmodern-perl-perl", "Modern-Perl", "1.03", "1", "0" "libmodule-build-perl", "Module-Build", "0.380000", "0", "2" "libmodule-corelist-perl", "Module-CoreList", "2.49", "0", "0" "libmodule-cpants-analyse-perl", "Module-CPANTS-Analyse", "0.85", "1", "3" "libmodule-depends-perl", "Module-Depends", "0.15", "1", "4" "libmodule-extract-perl", "Module-Extract", "0.01", "0", "0" "libmodule-extract-use-perl", "Module-Extract-Use", "1.01", "0", "0" "libmodule-extractuse-perl", "Module-ExtractUse", "0.23", "0", "0" "libmodule-find-perl", "Module-Find", "0.10", "0", "0" "libmodule-info-perl", "Module-Info", "0.32", "0", "4" "libmodule-inspector-perl", "Module-Inspector", "1.05", "0", "0" "libmodule-install-perl", "Module-Install", "1.01", "0", "1" "libmodule-install-xsutil-perl", "Module-Install-XSUtil", "0.37", "0", "0" "libmodule-load-conditional-perl", "Module-Load-Conditional", "0.44", "0", "0" "libmodule-manifest-perl", "Module-Manifest", "0.07", "0", "0" "libmodule-math-depends-perl", "Module-Math-Depends", "0.02", "0", "0" "libmodule-metadata-perl", "Module-Metadata", "1.000003", "0", "0" "libmodule-optional-perl", "Module-Optional", "0.03", "0", "0" "libmodule-packaged-perl", "Module-Packaged", "0.86", "1", "1" "libmodule-pluggable-fast-perl", "Module-Pluggable-Fast", "0.19", "0", "0" "libmodule-pluggable-ordered-perl", "Module-Pluggable-Ordered", "1.5", "0", "0" "libmodule-pluggable-perl", "Module-Pluggable", "3.9", "1", "2" "libmodule-refresh-perl", "Module-Refresh", "0.16", "0", "0" "libmodule-runtime-perl", "Module-Runtime", "0.007", "0", "0" "libmodule-scandeps-perl", "Module-ScanDeps", "1.02", "0", "1" "libmodule-signature-perl", "Module-Signature", "0.68", "1", "0" "libmodule-starter-pbp-perl", "Module-Starter-PBP", "0.0.3", "0", "0" "libmodule-starter-perl", "Module-Starter", "1.560", "1", "1" "libmodule-starter-plugin-simplestore-perl", "Module-Starter-Plugin-SimpleStore", "0.143", "0", "0" "libmodule-starter-plugin-tt2-perl", "Module-Starter-Plugin-TT2", "0.125", "0", "2" "libmodule-starter-smart-perl", "Module-Starter-Smart", "0.0.2", "0", "0" "libmodule-used-perl", "Module-Used", "1.2.0", "0", "0" "libmodule-util-perl", "Module-Util", "1.07", "0", "0" "libmodule-versions-report-perl", "Module-Versions-Report", "1.06", "0", "0" "libmojolicious-perl", "Mojolicious", "1.21", "1", "0" "libmojomojo-perl", "MojoMojo", "1.04", "0", "1" "libmonkey-patch-perl", "Monkey-Patch", "0.03", "0", "1" "libmoo-perl", "Moo", "0.009007", "0", "0" "libmoose-autobox-perl", "Moose-Autobox", "0.11", "0", "0" "libmoose-perl", "Moose", "2.0007", "0", "1" "libmoosex-aliases-perl", "MooseX-Aliases", "0.10", "0", "0" "libmoosex-app-cmd-perl", "MooseX-App-Cmd", "0.06", "0", "0" "libmoosex-async-perl", "MooseX-Async", "0.07", "0", "0" "libmoosex-attributehelpers-perl", "MooseX-AttributeHelpers", "0.23", "0", "1" "libmoosex-blessed-reconstruct-perl", "MooseX-Blessed-Reconstruct", "0.04", "0", "0" "libmoosex-chainedaccessors-perl", "MooseX-ChainedAccessors", "0.02", "0", "0" "libmoosex-clone-perl", "MooseX-Clone", "0.05", "0", "1" "libmoosex-compiletime-traits-perl", "MooseX-CompileTime-Traits", "1.102570", "0", "0" "libmoosex-configfromfile-perl", "MooseX-ConfigFromFile", "0.03", "0", "0" "libmoosex-daemonize-perl", "MooseX-Daemonize", "0.12", "0", "2" "libmoosex-declare-perl", "MooseX-Declare", "0.34", "0", "1" "libmoosex-emulate-class-accessor-fast-perl", "MooseX-Emulate-Class-Accessor-Fast", "0.00903", "0", "0" "libmoosex-followpbp-perl", "MooseX-FollowPBP", "0.05", "0", "0" "libmoosex-getopt-perl", "MooseX-Getopt", "0.37", "0", "1" "libmoosex-has-sugar-perl", "MooseX-Has-Sugar", "0.05055616", "0", "0" "libmoosex-insideout-perl", "MooseX-InsideOut", "0.106", "0", "1" "libmoosex-lazyrequire-perl", "MooseX-LazyRequire", "0.07", "0", "0" "libmoosex-log-log4perl-perl", "MooseX-Log-Log4perl", "0.42", "0", "1" "libmoosex-meta-typeconstraint-forcecoercion-perl", "MooseX-Meta-TypeConstraint-ForceCoercion", "0.01", "0", "0" "libmoosex-method-signatures-perl", "MooseX-Method-Signatures", "0.36", "0", "0" "libmoosex-methodattributes-perl", "MooseX-MethodAttributes", "0.24", "0", "0" "libmoosex-multiinitarg-perl", "MooseX-MultiInitArg", "0.01", "0", "0" "libmoosex-multimethods-perl", "MooseX-MultiMethods", "0.10", "0", "0" "libmoosex-nonmoose-perl", "MooseX-NonMoose", "0.22", "0", "0" "libmoosex-object-pluggable-perl", "MooseX-Object-Pluggable", "0.0011", "1", "0" "libmoosex-oneargnew-perl", "MooseX-OneArgNew", "0.001", "0", "0" "libmoosex-params-validate-perl", "MooseX-Params-Validate", "0.16", "0", "0" "libmoosex-poe-perl", "MooseX-POE", "0.214", "0", "1" "libmoosex-role-parameterized-perl", "MooseX-Role-Parameterized", "0.26", "0", "0" "libmoosex-role-withoverloading-perl", "MooseX-Role-WithOverloading", "0.09", "0", "0" "libmoosex-semiaffordanceaccessor-perl", "MooseX-SemiAffordanceAccessor", "0.09", "0", "1" "libmoosex-setonce-perl", "MooseX-SetOnce", "0.200000", "0", "0" "libmoosex-simpleconfig-perl", "MooseX-SimpleConfig", "not-uploaded", "0", "1" "libmoosex-singleton-perl", "MooseX-Singleton", "0.26", "0", "0" "libmoosex-storage-perl", "MooseX-Storage", "0.28", "0", "0" "libmoosex-strictconstructor-perl", "MooseX-StrictConstructor", "0.16", "0", "0" "libmoosex-traits-perl", "MooseX-Traits", "0.11", "0", "0" "libmoosex-traits-pluggable-perl", "MooseX-Traits-Pluggable", "0.10", "0", "0" "libmoosex-types-common-perl", "MooseX-Types-Common", "0.001002", "0", "0" "libmoosex-types-datetime-perl", "MooseX-Types-DateTime", "0.03", "0", "1" "libmoosex-types-json-perl", "MooseX-Types-JSON", "0.02", "0", "0" "libmoosex-types-netaddr-ip-perl", "MooseX-Types-NetAddr-IP", "0.04", "0", "0" "libmoosex-types-path-class-perl", "MooseX-Types-Path-Class", "0.05", "0", "0" "libmoosex-types-perl", "MooseX-Types", "0.25", "0", "0" "libmoosex-types-perl-perl", "MooseX-Types-Perl", "0.101340", "0", "0" "libmoosex-types-set-object-perl", "MooseX-Types-Set-Object", "0.03", "0", "0" "libmoosex-types-structured-perl", "MooseX-Types-Structured", "0.27", "0", "0" "libmoosex-types-varianttable-perl", "MooseX-Types-VariantTable", "0.04", "0", "2" "libmoosex-yaml-perl", "MooseX-YAML", "0.04", "0", "0" "libmouse-perl", "Mouse", "0.93", "0", "0" "libmousex-getopt-perl", "MouseX-Getopt", "0.33", "0", "1" "libmousex-nativetraits-perl", "MouseX-NativeTraits", "1.04", "0", "0" "libmousex-strictconstructor-perl", "MouseX-StrictConstructor", "0.02", "0", "0" "libmousex-types-path-class-perl", "MouseX-Types-Path-Class", "0.06", "0", "0" "libmousex-types-perl", "MouseX-Types", "0.05", "0", "0" "libmqdb-perl", "MQdb", "0.954", "0", "1" "libmro-compat-perl", "MRO-Compat", "0.11", "0", "0" "libmsgcat-perl", "Msgcat", "1.03", "0", "0" "libmusicbrainz-discid-perl", "MusicBrainz-DiscID", "0.03", "1", "0" "libmysql-diff-perl", "MySQL-Diff", "0.33", "0", "0" "libnagios-object-perl", "Nagios-Object", "0.21.15", "0", "1" "libnagios-plugin-perl", "Nagios-Plugin", "0.35", "0", "0" "libnamespace-autoclean-perl", "namespace-autoclean", "0.12", "0", "0" "libnamespace-clean-perl", "namespace-clean", "0.20", "0", "1" "libnet-akamai-perl", "Net-Akamai", "0.14", "0", "0" "libnet-akismet-perl", "Net-Akismet", "0.05", "0", "0" "libnet-amazon-ec2-perl", "Net-Amazon-EC2", "0.14", "0", "1" "libnet-amazon-perl", "Net-Amazon", "0.59", "0", "0" "libnet-amazon-s3-perl", "Net-Amazon-S3", "0.53", "1", "2" "libnet-amazon-s3-tools-perl", "Net-Amazon-S3-Tools", "0.08", "0", "2" "libnet-arp-perl", "Net-ARP", "1.0.4", "0", "2" "libnet-bluetooth-perl", "Net-Bluetooth", "0.40", "1", "1" "libnet-bonjour-perl", "Net-Bonjour", "0.96", "0", "0" "libnet-cidr-lite-perl", "Net-CIDR-Lite", "0.21", "0", "0" "libnet-cups-perl", "Net-CUPS", "0.60", "0", "0" "libnet-daap-dmap-perl", "Net-DAAP-DMAP", "1.26", "0", "1" "libnet-dhcp-perl", "Net-DHCP", "0.67", "0", "1" "libnet-dns-async-perl", "Net-DNS-Async", "1.07", "0", "0" "libnet-domain-tld-perl", "Net-Domain-TLD", "1.69", "1", "0" "libnet-dpap-client-perl", "Net-DPAP-Client", "0.26", "0", "0" "libnet-dri-perl", "Net-DRI", "0.96", "0", "1" "libnet-easytcp-perl", "EasyTCP", "0.26", "0", "0" "libnet-epp-perl", "Net-EPP", "0.16", "1", "1" "libnet-frame-perl", "Net-Frame", "1.07", "0", "1" "libnet-freedb-perl", "Net-FreeDB", "0.08", "1", "2" "libnet-github-perl", "Net-GitHub", "0.28", "0", "0" "libnet-google-authsub-perl", "Net-Google-AuthSub", "0.5", "0", "0" "libnet-google-code-perl", "Net-Google-Code", "0.19", "0", "0" "libnet-gpsd3-perl", "Net-GPSD3", "0.11", "0", "1" "libnet-hiveminder-perl", "Net-Hiveminder", "0.08", "0", "0" "libnet-hotline-perl", "Net-Hotline", "0.83", "0", "1" "libnet-http-perl", "Net-HTTP", "6.01", "2", "0" "libnet-https-any-perl", "Net-HTTPS-Any", "0.10", "0", "0" "libnet-ident-perl", "Net-Ident", "1.23", "0", "3" "libnet-imap-client-perl", "Net-IMAP-Client", "0.95", "0", "1" "libnet-imap-simple-perl", "Net-IMAP-Simple", "1.2022", "1", "1" "libnet-imap-simple-ssl-perl", "Net-IMAP-Simple-SSL", "1.3", "0", "0" "libnet-ip-perl", "Net-IP", "1.25", "0", "3" "libnet-irc-perl", "Net-IRC", "0.75", "1", "6" "libnet-jabber-loudmouth-perl", "Net-Jabber-Loudmouth", "0.07", "0", "2" "libnet-jabber-perl", "Net-Jabber", "2.0", "2", "2" "libnet-jifty-perl", "Net-Jifty", "0.12", "0", "0" "libnet-ldap-perl", "perl-ldap", "0.4001", "2", "3" "libnet-libdnet-perl", "Net-Libdnet", "0.94", "0", "1" "libnet-libidn-perl", "Net-LibIDN", "0.12.ds", "0", "0" "libnet-mac-perl", "Net-MAC", "2.103622", "0", "0" "libnet-mac-vendor-perl", "Net-MAC-Vendor", "1.18", "0", "2" "libnet-managesieve-perl", "Net-ManageSieve", "0.10", "0", "2" "libnet-nationalrail-livedepartureboards-perl", "Net-NationalRail-LiveDepartureBoards", "0.02", "1", "0" "libnet-netmask-perl", "Net-Netmask", "1.9015", "0", "1" "libnet-nis-perl", "Net-NIS", "0.43", "0", "0" "libnet-nslookup-perl", "Net-Nslookup", "1.19", "1", "0" "libnet-ntp-perl", "Net-NTP", "1.2", "0", "0" "libnet-oauth-perl", "Net-OAuth", "0.27", "0", "0" "libnet-opensrs-perl", "Net-OpenSRS", "0.06", "0", "0" "libnet-patricia-perl", "Net-Patricia", "1.19", "0", "1" "libnet-pcap-perl", "Net-Pcap", "0.16", "0", "1" "libnet-ph-perl", "Net-PH", "2.21", "0", "0" "libnet-rawip-perl", "Net-RawIP", "0.25", "1", "2" "libnet-rblclient-perl", "Net-RBLClient", "0.5", "1", "0" "libnet-rendezvous-publish-backend-avahi-perl", "Net-Rendezvous-Publish-Backend-Avahi", "0.03", "0", "0" "libnet-rendezvous-publish-perl", "Net-Rendezvous-Publish", "0.04", "0", "1" "libnet-scp-expect-perl", "Net-SCP-Expect", "0.16", "0", "0" "libnet-server-coro-perl", "Net-Server-Coro", "not-uploaded", "0", "0" "libnet-server-perl", "Net-Server", "0.99", "2", "5" "libnet-sftp-foreign-perl", "Net-SFTP-Foreign", "1.65", "0", "1" "libnet-sieve-perl", "Net-Sieve", "0.07", "0", "0" "libnet-sieve-script-perl", "Net-Sieve-Script", "0.08", "0", "0" "libnet-sip-perl", "Net-SIP", "0.62", "0", "2" "libnet-smpp-perl", "Net-SMPP", "1.18", "0", "0" "libnet-smtp-server-perl", "SMTP-Server", "1.1", "2", "0" "libnet-smtp-ssl-perl", "Net-SMTP-SSL", "1.01", "0", "0" "libnet-snpp-perl", "Net-SNPP", "1.17", "0", "1" "libnet-ssh2-perl", "Net-SSH2", "0.35", "1", "1" "libnet-ssleay-perl", "Net-SSLeay", "1.36", "2", "3" "libnet-stomp-perl", "Net-Stomp", "0.41", "1", "0" "libnet-subnets-perl", "unknown", "1.0", "0", "0" "libnet-telnet-perl", "Net-Telnet", "3.03", "0", "0" "libnet-tftp-perl", "Net-TFTP", "0.19", "0", "0" "libnet-tftpd-perl", "Net-TFTPd", "0.04", "1", "0" "libnet-trac-perl", "Net-Trac", "0.14", "1", "0" "libnet-twitter-lite-perl", "Net-Twitter-Lite", "0.10004", "0", "0" "libnet-twitter-perl", "Net-Twitter", "3.17001", "0", "2" "libnet-vnc-perl", "Net-VNC", "0.38", "0", "0" "libnet-write-perl", "Net-Write", "1.05", "0", "0" "libnet-xmpp-perl", "Net-XMPP", "1.02", "2", "1" "libnet-xwhois-perl", "Net-XWhois", "0.90", "0", "0" "libnet-z3950-zoom-perl", "Net-Z3950-ZOOM", "1.26", "0", "0" "libnetaddr-ip-perl", "/NetAddr-IP", "4.044", "0", "1" "libnetapp-perl", "NetApp", "1.1.2", "0", "0" "libnetpacket-perl", "NetPacket", "1.1.1", "0", "1" "libnetserver-generic-perl", "NetServer-Generic", "1.03", "0", "1" "libnetwork-ipv4addr-perl", "Net-IPv4Addr", "0.10.ds", "0", "1" "libnetxap-perl", "NetxAP", "0.02", "0", "9" "libnews-newsrc-perl", "News-Newsrc", "1.09", "0", "0" "libnews-nntpclient-perl", "NNTPClient", "0.37", "0", "0" "libnews-scan-perl", "News-Scan", "0.53", "0", "1" "libnumber-compare-perl", "Number-Compare", "0.01", "0", "0" "libnumber-format-perl", "Number-Format", "1.73", "0", "0" "libnumber-range-perl", "Number-Range", "0.07", "0", "0" "libnumber-recordlocator-perl", "Number-RecordLocator", "0.005", "0", "0" "libobject-declare-perl", "Object-Declare", "0.22", "0", "0" "libobject-destroyer-perl", "Object-Destroyer", "2.00", "0", "0" "libobject-event-perl", "Object-Event", "1.220", "0", "0" "libobject-id-perl", "Object-ID", "0.1.1", "0", "1" "libobject-insideout-perl", "Object-InsideOut", "3.81", "0", "0" "libobject-multitype-perl", "Object-MultiType", "0.05", "0", "0" "libobject-pluggable-perl", "Object-Pluggable", "1.29", "0", "0" "libobject-realize-later-perl", "Object-Realize-Later", "0.18", "0", "0" "libobject-signature-perl", "Object-Signature", "1.05", "1", "0" "libobject-tiny-perl", "Object-Tiny", "1.06", "0", "0" "libogg-vorbis-decoder-perl", "Ogg-Vorbis-Decoder", "0.9", "0", "0" "libogg-vorbis-header-perl", "Ogg-Vorbis-Header", "0.03", "2", "1" "libogg-vorbis-header-pureperl-perl", "Ogg-Vorbis-Header-PurePerl", "1.0", "1", "1" "libogre-perl", "Ogre", "0.50", "0", "1" "libois-perl", "OIS", "0.05", "0", "0" "libole-storage-lite-perl", "OLE-Storage_Lite", "0.19", "0", "0" "libopengl-perl", "OpenGL", "0.62", "0", "4" "libopengl-xscreensaver-perl", "OpenGL-XScreenSaver", "0.04", "0", "0" "libopenoffice-oodoc-perl", "OpenOffice-OODoc", "2.125", "0", "1" "liborlite-migrate-perl", "ORLite-Migrate", "1.07", "0", "0" "liborlite-mirror-perl", "ORLite-Mirror", "1.20", "0", "0" "liborlite-perl", "ORLite", "1.48", "0", "1" "liborlite-statistics-perl", "ORLite-Statistics", "0.03", "0", "0" "libouch-perl", "Ouch", "0.0401", "0", "0" "libpackage-deprecationmanager-perl", "Package-DeprecationManager", "0.10", "0", "0" "libpackage-pkg-perl", "Package-Pkg", "0.0019", "0", "0" "libpackage-stash-perl", "Package-Stash", "0.29", "0", "1" "libpackage-stash-xs-perl", "Package-Stash-XS", "0.22", "0", "0" "libpadwalker-perl", "PadWalker", "1.92", "0", "1" "libpalm-perl", "p5-Palm", "1.012", "0", "2" "libpango-perl", "Pango", "1.221", "0", "1" "libpar-dist-perl", "PAR-Dist", "0.45", "0", "0" "libpar-packer-perl", "PAR-Packer", "1.008", "0", "2" "libpar-perl", "PAR", "1.002", "0", "1" "libparallel-iterator-perl", "Parallel-Iterator", "1.00", "0", "0" "libparams-callbackrequest-perl", "Params-CallbackRequest", "1.19", "0", "0" "libparams-classify-perl", "Params-Classify", "0.013", "0", "0" "libparams-coerce-perl", "Params-Coerce", "0.14", "0", "0" "libparams-validate-perl", "Params-Validate", "0.97", "0", "1" "libparanoid-perl", "Paranoid", "0.29", "0", "3" "libparent-perl", "parent", "0.224", "0", "0" "libparse-cpan-meta-perl", "Parse-CPAN-Meta", "1.4401", "0", "0" "libparse-cpan-packages-perl", "Parse-CPAN-Packages", "2.31", "0", "1" "libparse-debian-packages-perl", "Parse-Debian-Packages", "0.01", "1", "1" "libparse-dia-sql-perl", "Parse-Dia-SQL", "0.17", "0", "0" "libparse-dmidecode-perl", "Parse-DMIDecode", "0.03", "0", "1" "libparse-errorstring-perl-perl", "Parse-ErrorString-Perl", "0.15", "0", "0" "libparse-exuberantctags-perl", "Parse-ExuberantCTags", "1.01", "0", "0" "libparse-http-useragent-perl", "Parse-HTTP-UserAgent", "0.20", "0", "1" "libparse-mediawikidump-perl", "Parse-MediaWikiDump", "1.0.6", "0", "0" "libparse-method-signatures-perl", "Parse-Method-Signatures", "1.003013", "0", "0" "libparse-plainconfig-perl", "Parse-PlainConfig", "2.06", "0", "0" "libparse-recdescent-perl", "Parse-RecDescent", "1.965001", "0", "0" "libparse-syslog-perl", "Parse-Syslog", "1.10", "0", "0" "libparse-yapp-perl", "Parse-Yapp", "1.05", "0", "3" "libpath-class-perl", "Path-Class", "0.23", "0", "0" "libpath-dispatcher-declarative-perl", "Path-Dispatcher-Declarative", "0.03", "0", "0" "libpath-dispatcher-perl", "Path-Dispatcher", "1.02", "0", "1" "libpdf-api2-perl", "PDF-API2", "2.019", "4", "1" "libpdf-api2-simple-perl", "PDF-API2-Simple", "1.1.4u", "0", "0" "libpdf-create-perl", "PDF-Create", "1.06", "0", "0" "libpdf-report-perl", "PDF-Report", "1.33", "0", "1" "libpdf-reuse-barcode-perl", "PDF-Reuse-Barcode", "0.05", "0", "0" "libpdf-reuse-perl", "PDF-Reuse", "0.35", "1", "2" "libpdf-table-perl", "PDF-Table", "0.9.3", "0", "1" "libperl-apireference-perl", "Perl-APIReference", "0.05", "0", "0" "libperl-critic-perl", "Perl-Critic", "1.116", "0", "0" "libperl-destruct-level-perl", "Perl-Destruct-Level", "0.02", "0", "0" "libperl-metrics-simple-perl", "Perl-Metrics-Simple", "0.15", "0", "0" "libperl-minimumversion-perl", "Perl-MinimumVersion", "1.28", "1", "0" "libperl-ostype-perl", "Perl-OSType", "1.002", "0", "0" "libperl-prereqscanner-perl", "Perl-PrereqScanner", "1.002", "0", "0" "libperl-version-perl", "Perl-Version", "1.010", "0", "0" "libperl4-corelibs-perl", "Perl4-CoreLibs", "0.003", "1", "0" "libperl5i-perl", "perl5i", "2.6.1", "0", "1" "libperl6-export-perl", "Perl6-Export", "0.07", "0", "0" "libperl6-form-perl", "Perl6-Form", "0.04", "0", "0" "libperl6-junction-perl", "Perl6-Junction", "1.40000", "0", "0" "libperl6-slurp-perl", "Perl6-Slurp", "0.03", "0", "0" "libperldoc-search-perl", "Perldoc-Search", "0.01", "1", "1" "libperlio-gzip-perl", "PerlIO-gzip", "0.18", "0", "0" "libperlspeak-perl", "PerlSpeak", "2.01", "0", "0" "libpetal-perl", "Petal", "2.19", "3", "0" "libpetal-utils-perl", "Petal-Utils", "0.06", "1", "0" "libpgplot-perl", "PGPLOT", "2.21", "0", "1" "libphp-serialization-perl", "PHP-Serialization", "0.34", "0", "0" "libplack-perl", "Plack", "0.9979", "0", "0" "libpod-2-docbook-perl", "Pod-2-DocBook", "0.03", "0", "0" "libpod-abstract-perl", "Pod-Abstract", "0.20", "0", "1" "libpod-constants-perl", "Pod-Constants", "0.16", "0", "0" "libpod-coverage-moose-perl", "Pod-Coverage-Moose", "not-uploaded", "0", "0" "libpod-coverage-perl", "Pod-Coverage", "0.21", "0", "0" "libpod-coverage-trustpod-perl", "Pod-Coverage-TrustPod", "0.092830", "0", "0" "libpod-elemental-perl", "Pod-Elemental", "0.102360", "0", "0" "libpod-elemental-perlmunger-perl", "Pod-Elemental-PerlMunger", "0.093330", "0", "0" "libpod-eventual-perl", "Pod-Eventual", "0.093170", "0", "0" "libpod-index-perl", "Pod-Index", "0.14", "0", "0" "libpod-markdown-perl", "Pod-Markdown", "1.110730", "0", "0" "libpod-plainer-perl", "Pod-Plainer", "1.03", "0", "0" "libpod-pom-perl", "Pod-POM", "0.27", "1", "1" "libpod-readme-perl", "Pod-Readme", "0.11", "0", "0" "libpod-sax-perl", "Pod-SAX", "0.14", "0", "0" "libpod-simple-perl", "Pod-Simple", "3.16", "0", "1" "libpod-spell-perl", "Pod-Spell", "1.01", "0", "0" "libpod-strip-perl", "Pod-Strip", "1.02", "0", "0" "libpod-tree-perl", "Pod-Tree", "1.17", "0", "1" "libpod-weaver-perl", "Pod-Weaver", "3.101631", "0", "0" "libpod-wordlist-hanekomu-perl", "Pod-Wordlist-hanekomu", "1.110090", "0", "0" "libpod-wsdl-perl", "Pod-WSDL", "0.061", "0", "0" "libpod-xhtml-perl", "Pod-Xhtml", "1.60", "0", "0" "libpod2-base-perl", "POD2-Base", "0.043", "0", "2" "libpoe-api-peek-perl", "POE-API-Peek", "2.1600", "1", "0" "libpoe-component-client-dns-perl", "POE-Component-Client-DNS", "1.051", "0", "1" "libpoe-component-client-http-perl", "POE-Component-Client-HTTP", "0.942", "0", "2" "libpoe-component-client-keepalive-perl", "POE-Component-Client-Keepalive", "0.2660", "0", "1" "libpoe-component-client-mpd-perl", "POE-Component-Client-MPD", "1.100430", "0", "0" "libpoe-component-client-ping-perl", "POE-Component-Client-Ping", "1.163", "0", "0" "libpoe-component-dbiagent-perl", "POE-Component-DBIAgent", "0.26", "0", "1" "libpoe-component-ikc-perl", "POE-Component-IKC", "0.2200", "1", "0" "libpoe-component-irc-perl", "POE-Component-IRC", "6.54", "0", "2" "libpoe-component-jabber-perl", "POE-Component-Jabber", "3.00", "0", "1" "libpoe-component-jobqueue-perl", "POE-Component-JobQueue", "0.5700", "0", "1" "libpoe-component-pcap-perl", "POE-Component-Pcap", "0.04", "0", "0" "libpoe-component-pubsub-perl", "POE-Component-PubSub", "0.05", "1", "0" "libpoe-component-resolver-perl", "POE-Component-Resolver", "0.911", "0", "1" "libpoe-component-server-http-perl", "POE-Component-Server-HTTP", "0.09", "1", "0" "libpoe-component-server-simplehttp-perl", "POE-Component-Server-SimpleHTTP", "2.08", "0", "1" "libpoe-component-server-soap-perl", "POE-Component-Server-SOAP", "1.14", "0", "0" "libpoe-component-sslify-perl", "POE-Component-SSLify", "1.005", "0", "1" "libpoe-filter-http-parser-perl", "POE-Filter-HTTP-Parser", "1.04", "0", "0" "libpoe-filter-ircd-perl", "POE-Filter-IRCD", "2.42", "0", "0" "libpoe-filter-xml-perl", "POE-Filter-XML", "0.38", "0", "0" "libpoe-loop-event-perl", "POE-Loop-Event", "1.304", "0", "0" "libpoe-loop-tk-perl", "POE-Loop-Tk", "1.304", "0", "1" "libpoe-perl", "POE", "1.3100", "0", "2" "libpoe-test-loops-perl", "POE-Test-Loops", "1.050", "0", "0" "libpoex-role-sessioninstantiation-perl", "POEx-Role-SessionInstantiation", "1.102610", "1", "1" "libpoex-types-perl", "POEx-Types", "1.100910", "0", "0" "libposix-strptime-perl", "POSIX-strptime", "0.10", "0", "0" "libpostfix-parse-mailq-perl", "Postfix-Parse-Mailq", "1.001", "0", "0" "libpostscript-file-perl", "PostScript-File", "2.02", "0", "1" "libpostscript-perl", "PostScript", "0.06", "0", "2" "libppi-html-perl", "PPI-HTML", "1.08", "0", "0" "libppi-perl", "PPI", "1.215", "0", "0" "libppi-xs-perl", "PPI-XS", "0.901", "0", "0" "libppix-editortools-perl", "PPIx-EditorTools", "0.13", "0", "0" "libppix-regexp-perl", "PPIx-Regexp", "0.020", "0", "0" "libppix-utilities-perl", "PPIx-Utilities", "1.001000", "0", "0" "libpragmatic-perl", "Pragmatic", "1.7", "0", "0" "libprobe-perl-perl", "Probe-Perl", "0.01", "0", "0" "libproc-background-perl", "Proc-Background", "1.10", "0", "1" "libproc-daemon-perl", "Proc-Daemon", "0.10", "0", "0" "libproc-fork-perl", "Proc-Fork", "0.71", "0", "0" "libproc-invokeeditor-perl", "Proc-InvokeEditor", "1.06", "0", "0" "libproc-processtable-perl", "Proc-ProcessTable", "0.45", "0", "1" "libproc-reliable-perl", "Proc-Reliable", "1.16", "0", "2" "libproc-simple-perl", "Proc-Simple", "1.27", "0", "2" "libprpc-perl", "pRPC-modules", "0.1005", "0", "3" "libquantum-superpositions-perl", "Quantum-Superpositions", "2.02", "0", "1" "libquota-perl", "Quota", "1.6.5", "0", "2" "librcs-perl", "Rcs", "1.05", "0", "1" "libreadonly-perl", "Readonly", "1.03", "0", "0" "libreadonly-xs-perl", "Readonly-XS", "1.04", "0", "0" "libredis-perl", "Redis", "1.9040", "0", "0" "libregexp-common-email-address-perl", "Regexp-Common-Email-Address", "1.01", "0", "0" "libregexp-common-perl", "Regexp-Common", "2011041701", "0", "1" "libregexp-common-time-perl", "Regexp-Common-time", "0.04", "0", "0" "libregexp-grammars-perl", "Regexp-Grammars", "1.012", "0", "0" "libregexp-optimizer-perl", "Regexp-Optimizer", "0.15", "0", "1" "libregexp-reggrp-perl", "Regexp-RegGrp", "1.000001", "0", "0" "librelative-perl", "relative", "0.04", "0", "0" "librest-application-perl", "REST-Application", "0.992", "0", "2" "libreturn-value-perl", "Return-Value", "1.666001", "0", "0" "librivescript-perl", "RiveScript", "1.20", "0", "2" "librole-hasmessage-perl", "Role-HasMessage", "0.005", "0", "0" "librole-identifiable-perl", "Role-Identifiable", "0.005", "0", "0" "libroman-perl", "Roman", "1.23", "0", "0" "librose-datetime-perl", "Rose-DateTime", "0.537", "0", "0" "librose-db-object-perl", "Rose-DB-Object", "0.794", "0", "0" "librose-db-perl", "Rose-DB", "0.763", "0", "0" "librose-object-perl", "Rose-Object", "0.859", "0", "0" "librpc-xml-perl", "RPC-XML", "0.74", "1", "1" "librrdtool-oo-perl", "RRDTool-OO", "0.31", "0", "1" "librt-client-rest-perl", "RT-Client-REST", "0.4", "1", "0" "librtf-writer-perl", "RTF-Writer", "1.11", "0", "0" "librunapp-perl", "RunApp", "0.13", "0", "1" "libsane-perl", "Sane", "0.03", "1", "0" "libscalar-defer-perl", "Scalar-Defer", "0.23", "0", "0" "libscalar-list-utils-perl", "Scalar-List-Utils", "1.23", "0", "0" "libscalar-number-perl", "Scalar-Number", "0.006", "0", "0" "libscalar-string-perl", "Scalar-String", "0.002", "0", "0" "libscalar-util-numeric-perl", "Scalar-Util-Numeric", "0.22", "0", "0" "libschedule-at-perl", "Schedule-At", "1.11", "0", "1" "libschedule-ratelimiter-perl", "Schedule-RateLimiter", "0.01", "0", "0" "libscope-guard-perl", "Scope-Guard", "0.20", "0", "0" "libscope-upper-perl", "Scope-Upper", "0.13", "0", "0" "libscriptalicious-perl", "Scriptalicious", "1.16", "0", "1" "libsearch-gin-perl", "Search-GIN", "0.08", "0", "0" "libsearch-xapian-perl", "http://oligarchy.co.uk/xapian/1.2.5/Search-Xapian-1.2.5.0.tar.gz", "1.2.5.0", "0", "0" "libset-infinite-perl", "Set-Infinite", "0.63", "0", "0" "libset-intspan-perl", "Set-IntSpan", "1.16", "1", "0" "libset-nestedgroups-perl", "Set-NestedGroups", "0.01", "0", "0" "libset-object-perl", "Set-Object", "1.27", "0", "0" "libset-scalar-perl", "Set-Scalar", "1.25", "0", "0" "libset-tiny-perl", "Set-Tiny", "not-uploaded", "0", "0" "libsgml-parser-opensp-perl", "SGML-Parser-OpenSP", "0.994", "0", "2" "libsgmls-perl", "SGMLSpm", "1.03ii", "1", "0" "libshell-perl", "Shell", "0.72", "1", "0" "libshell-perl-perl", "Shell-Perl", "0.0022", "0", "0" "libshell-posix-select-perl", "Shell-POSIX-Select", "0.05", "0", "0" "libsignatures-perl", "signatures", "0.05", "0", "0" "libsmart-comments-perl", "Smart-Comments", "1.0.4", "0", "0" "libsms-send-perl", "SMS-Send", "0.05", "0", "1" "libsnmp-extension-passpersist-perl", "SNMP-Extension-PassPersist", "0.05", "0", "0" "libsnmp-info-perl", "SNMP-Info", "2.04", "0", "0" "libsoap-lite-perl", "SOAP-Lite", "0.712", "2", "2" "libsoap-wsdl-perl", "SOAP-WSDL", "2.00.10", "0", "2" "libsocialtext-resting-perl", "Socialtext-Resting", "0.28", "0", "0" "libsocialtext-resting-utils-perl", "Socialtext-Resting-Utils", "0.21", "0", "0" "libsocialtext-wikitest-perl", "Socialtext-WikiTest", "0.07", "0", "0" "libsocket-getaddrinfo-perl", "Socket-GetAddrInfo", "0.20", "0", "2" "libsocket-multicast6-perl", "Socket-Multicast6", "0.04", "0", "1" "libsoftware-license-perl", "Software-License", "0.103001", "0", "0" "libsort-naturally-perl", "Sort-Naturally", "1.02", "0", "0" "libsort-versions-perl", "Sort-Versions", "1.5", "0", "0" "libspiffy-perl", "Spiffy", "0.30", "1", "0" "libspoon-perl", "Spoon", "0.24", "1", "0" "libspork-perl", "Spork", "0.20", "1", "0" "libspreadsheet-parseexcel-perl", "Spreadsheet-ParseExcel", "0.5800", "1", "2" "libspreadsheet-parseexcel-simple-perl", "Spreadsheet-ParseExcel-Simple", "1.04", "0", "1" "libspreadsheet-read-perl", "Spreadsheet-Read", "0.41", "0", "1" "libspreadsheet-writeexcel-perl", "Spreadsheet-WriteExcel", "2.37", "0", "0" "libspreadsheet-xlsx-perl", "unknown", "0.13", "0", "1" "libsql-abstract-limit-perl", "SQL-Abstract-Limit", "0.14.1", "1", "0" "libsql-abstract-perl", "SQL-Abstract", "1.72", "0", "0" "libsql-reservedwords-perl", "SQL-ReservedWords", "0.7", "0", "0" "libsql-statement-perl", "SQL-Statement", "1.33", "0", "0" "libsql-translator-perl", "SQL-Translator", "not-uploaded", "0", "0" "libstar-parser-perl", "http://pdb.sdsc.edu/STAR/STAR-Parser-0.59.tar.gz", "0.59", "0", "0" "libstat-lsmode-perl", "http://perl.plover.com/lsMode/Stat-lsMode-0.50.tar.gz", "0.50", "0", "0" "libstatistics-basic-perl", "Statistics-Basic", "1.6601", "0", "1" "libstatistics-descriptive-perl", "Statistics-Descriptive", "3.0201", "0", "0" "libstatistics-online-perl", "Statistics-OnLine", "0.02", "0", "0" "libstatistics-test-randomwalk-perl", "Statistics-Test-RandomWalk", "0.02", "0", "1" "libstatistics-test-sequence-perl", "Statistics-Test-Sequence", "0.01", "0", "0" "libstrictures-perl", "strictures", "1.002002", "0", "0" "libstring-bufferstack-perl", "String-BufferStack", "1.15", "0", "0" "libstring-camelcase-perl", "String-CamelCase", "0.02", "0", "0" "libstring-crc32-perl", "String-CRC32", "1.4", "0", "0" "libstring-dirify-perl", "String-Dirify", "1.02", "0", "0" "libstring-errf-perl", "String-Errf", "0.006", "0", "0" "libstring-escape-perl", "String-Escape", "2010.002", "0", "1" "libstring-flogger-perl", "String-Flogger", "1.101241", "0", "0" "libstring-format-perl", "String-Format", "1.16", "0", "0" "libstring-formatter-perl", "String-Formatter", "0.102082", "0", "0" "libstring-koremutake-perl", "String-Koremutake", "0.30", "0", "0" "libstring-mkpasswd-perl", "String-MkPasswd", "0.03", "0", "1" "libstring-random-perl", "String-Random", "0.22", "0", "0" "libstring-rewriteprefix-perl", "String-RewritePrefix", "0.006", "0", "0" "libstring-truncate-perl", "String-Truncate", "1.100600", "0", "0" "libsub-current-perl", "Sub-Current", "0.02", "0", "0" "libsub-delete-perl", "Sub-Delete", "1.00002", "0", "0" "libsub-exporter-formethods-perl", "Sub-Exporter-ForMethods", "0.091970", "0", "0" "libsub-exporter-globexporter-perl", "Sub-Exporter-GlobExporter", "0.002", "0", "0" "libsub-exporter-perl", "Sub-Exporter", "0.982", "0", "1" "libsub-identify-perl", "Sub-Identify", "0.04", "0", "0" "libsub-install-perl", "Sub-Install", "0.924", "0", "0" "libsub-name-perl", "Sub-Name", "0.05", "0", "0" "libsub-override-perl", "Sub-Override", "0.08", "0", "1" "libsub-prototype-perl", "Sub-Prototype", "0.02", "0", "0" "libsub-uplevel-perl", "Sub-Uplevel", "0.2200", "0", "1" "libsub-wrappackages-perl", "Sub-WrapPackages", "2.0", "0", "0" "libsuper-perl", "SUPER", "1.17", "0", "0" "libsvg-graph-perl", "SVG-Graph", "0.02", "0", "1" "libsvg-perl", "SVG", "2.50", "0", "1" "libsvg-tt-graph-perl", "SVG-TT-Graph", "0.16", "0", "0" "libsvn-dump-perl", "SVN-Dump", "0.05", "0", "1" "libsvn-hooks-perl", "SVN-Hooks", "0.90", "0", "0" "libsvn-look-perl", "SVN-Look", "0.20", "0", "0" "libsvn-notify-mirror-perl", "SVN-Notify-Mirror", "0.03800", "0", "1" "libsvn-svnlook-perl", "SVN-SVNLook", "0.04", "0", "0" "libswish-api-common-perl", "SWISH-API-Common", "0.03", "1", "2" "libswitch-perl", "Switch", "2.16", "0", "0" "libsyntax-highlight-engine-kate-perl", "Syntax-Highlight-Engine-Kate", "0.05", "0", "2" "libsyntax-highlight-engine-simple-languages-perl", "Syntax-Highlight-Engine-Simple-Perl", "1", "0", "2" "libsyntax-highlight-engine-simple-perl", "Syntax-Highlight-Engine-Simple", "0.08", "0", "1" "libsyntax-highlight-perl-improved-perl", "Syntax-Highlight-Perl-Improved", "1.01", "0", "1" "libsyntax-keyword-gather-perl", "Syntax-Keyword-Gather", "1.001000", "0", "1" "libsyntax-perl", "syntax", "0.003", "0", "0" "libsys-filesystem-perl", "Sys-Filesystem", "1.28", "0", "0" "libsys-gamin-perl", "Sys-Gamin", "0.1", "0", "2" "libsys-hostname-long-perl", "Sys-Hostname-Long", "1.4", "0", "0" "libsys-sigaction-perl", "Sys-SigAction", "0.11", "0", "0" "libsys-statistics-linux-perl", "Sys-Statistics-Linux", "0.59", "0", "0" "libsys-syscall-perl", "Sys-Syscall", "0.23", "0", "0" "libsys-syslog-perl", "Sys-Syslog", "0.29", "0", "0" "libsys-utmp-perl", "Sys-Utmp", "1.6", "0", "1" "libsys-virt-perl", "Sys-Virt", "0.2.6", "0", "0" "libsysadm-install-perl", "Sysadm-Install", "0.36", "0", "1" "libtap-harness-archive-perl", "TAP-Harness-Archive", "not-uploaded", "0", "0" "libtemplate-alloy-perl", "Template-Alloy", "1.016", "0", "1" "libtemplate-declare-perl", "Template-Declare", "0.45", "0", "0" "libtemplate-multilingual-perl", "Template-Multilingual", "1.00", "0", "0" "libtemplate-plugin-calendar-simple-perl", "Template-Plugin-Calendar-Simple", "0.02", "0", "0" "libtemplate-plugin-class-perl", "Template-Plugin-Class", "0.13", "0", "1" "libtemplate-plugin-clickable-email-perl", "Template-Plugin-Clickable-Email", "0.01", "0", "0" "libtemplate-plugin-clickable-perl", "Template-Plugin-Clickable", "0.06", "0", "0" "libtemplate-plugin-cycle-perl", "Template-Plugin-Cycle", "not-uploaded", "0", "1" "libtemplate-plugin-javascript-perl", "Template-Plugin-JavaScript", "0.02", "0", "0" "libtemplate-plugin-number-format-perl", "Template-Plugin-Number-Format", "1.02", "0", "0" "libtemplate-plugin-textile2-perl", "Template-Plugin-Textile2", "1.21", "0", "0" "libtemplate-plugin-yaml-perl", "Template-Plugin-YAML", "1.23", "0", "0" "libtemplate-provider-encoding-perl", "Template-Provider-Encoding", "0.10", "0", "0" "libtemplate-provider-fromdata-perl", "Template-Provider-FromDATA", "0.10", "0", "0" "libtemplate-timer-perl", "Template-Timer", "1.00", "1", "0" "libtemplate-tiny-perl", "Template-Tiny", "0.11", "0", "0" "libterm-encoding-perl", "Term-Encoding", "0.02", "0", "0" "libterm-progressbar-perl", "Term-ProgressBar", "2.09", "0", "1" "libterm-prompt-perl", "Term-Prompt", "1.04", "0", "0" "libterm-query-perl", "Term-Query", "2.0", "0", "1" "libterm-readkey-perl", "TermReadKey", "2.30", "0", "2" "libterm-readline-gnu-perl", "Term-ReadLine-Gnu", "1.20", "2", "3" "libterm-readline-perl-perl", "Term-ReadLine-Perl", "1.0303", "0", "0" "libterm-readpassword-perl", "Term-ReadPassword", "0.11", "0", "0" "libterm-shell-perl", "Term-Shell", "0.02", "1", "0" "libterm-size-perl", "Term-Size", "0.2", "0", "0" "libterm-sk-perl", "Term-Sk", "0.07", "0", "1" "libterm-slang-perl", "Term-Slang", "0.07", "0", "1" "libterm-twiddle-perl", "Term-Twiddle", "2.71", "0", "0" "libterm-visual-perl", "Term-Visual", "0.08", "1", "0" "libterm-vt102-perl", "Term-VT102", "0.91", "0", "1" "libtest-apocalypse-perl", "Test-Apocalypse", "0.05", "0", "0" "libtest-assertions-perl", "Test-Assertions", "1.054", "0", "0" "libtest-autoloader-perl", "Test-AutoLoader", "0.03", "0", "1" "libtest-base-perl", "Test-Base", "0.59", "0", "0" "libtest-block-perl", "Test-Block", "0.11", "0", "0" "libtest-cgi-multipart-perl", "Test-CGI-Multipart", "0.0.3", "0", "0" "libtest-checkchanges-perl", "Test-CheckChanges", "0.14", "0", "0" "libtest-checkmanifest-perl", "Test-CheckManifest", "1.24", "0", "2" "libtest-class-perl", "Test-Class", "0.36", "0", "0" "libtest-command-perl", "Test-Command", "0.08", "0", "0" "libtest-compile-perl", "Test-Compile", "0.13", "0", "0" "libtest-consistentversion-perl", "Test-ConsistentVersion", "0.2.3", "0", "0" "libtest-corpus-audio-mpd-perl", "Test-Corpus-Audio-MPD", "1.110710", "0", "0" "libtest-cpan-meta-perl", "Test-CPAN-Meta", "0.17", "0", "1" "libtest-cpan-meta-yaml-perl", "Test-CPAN-Meta-YAML", "0.17", "0", "1" "libtest-cukes-perl", "Test-Cukes", "0.10", "0", "0" "libtest-database-perl", "Test-Database", "1.11", "0", "0" "libtest-deep-perl", "Test-Deep", "0.108", "1", "0" "libtest-dependencies-perl", "Test-Dependencies", "0.12", "0", "0" "libtest-differences-perl", "Test-Differences", "0.50.0", "0", "0" "libtest-dir-perl", "Test-Dir", "1.013", "0", "0" "libtest-distmanifest-perl", "Test-DistManifest", "1.009", "0", "0" "libtest-distribution-perl", "Test-Distribution", "2.00", "0", "0" "libtest-email-perl", "Test-Email", "0.07", "0", "0" "libtest-eol-perl", "Test-EOL", "0.9", "0", "0" "libtest-exception-perl", "Test-Exception", "0.31", "0", "0" "libtest-exit-perl", "Test-Exit", "0.03", "0", "0" "libtest-expect-perl", "Test-Expect", "0.31", "1", "0" "libtest-fatal-perl", "Test-Fatal", "0.005", "0", "0" "libtest-file-contents-perl", "Test-File-Contents", "0.20", "0", "0" "libtest-file-perl", "Test-File", "1.29", "0", "0" "libtest-fixme-perl", "Test-Fixme", "0.04", "0", "0" "libtest-harness-perl", "Test-Harness", "3.23", "0", "2" "libtest-hasversion-perl", "Test-HasVersion", "0.012", "0", "1" "libtest-html-w3c-perl", "Test-HTML-W3C", "0.03", "0", "2" "libtest-http-server-simple-perl", "Test-HTTP-Server-Simple", "0.10", "0", "0" "libtest-http-server-simple-stashwarnings-perl", "Test-HTTP-Server-Simple-StashWarnings", "0.04", "0", "0" "libtest-identity-perl", "Test-Identity", "0.01", "0", "0" "libtest-image-gd-perl", "Test-Image-GD", "0.03", "0", "0" "libtest-inter-perl", "Test-Inter", "1.01", "0", "0" "libtest-json-perl", "Test-JSON", "0.11", "0", "0" "libtest-kwalitee-perl", "Test-Kwalitee", "1.01", "0", "0" "libtest-leaktrace-perl", "Test-LeakTrace", "0.13", "0", "1" "libtest-lectrotest-perl", "Test-LectroTest", "0.3600", "0", "2" "libtest-log-dispatch-perl", "Test-Log-Dispatch", "0.03", "0", "0" "libtest-log4perl-perl", "Test-Log4perl", "0.1001", "0", "1" "libtest-longstring-perl", "Test-LongString", "0.15", "0", "1" "libtest-manifest-perl", "Test-Manifest", "1.23", "0", "0" "libtest-memory-cycle-perl", "Test-Memory-Cycle", "1.04", "0", "0" "libtest-minimumversion-perl", "Test-MinimumVersion", "0.101080", "0", "0" "libtest-mock-lwp-perl", "Test-Mock-LWP", "0.05", "0", "0" "libtest-mockclass-perl", "Test-MockClass", "1.04", "0", "1" "libtest-mockmodule-perl", "Test-MockModule", "0.05", "0", "0" "libtest-mockobject-perl", "Test-MockObject", "1.09", "0", "1" "libtest-mockrandom-perl", "Test-MockRandom", "1.00", "0", "0" "libtest-mocktime-datecalc-perl", "Test-MockTime-DateCalc", "5", "0", "0" "libtest-mocktime-perl", "Test-MockTime", "0.09", "0", "0" "libtest-module-used-perl", "Test-Module-Used", "0.2.3", "0", "0" "libtest-most-perl", "Test-Most", "0.23", "0", "0" "libtest-needsdisplay-perl", "Test-NeedsDisplay", "1.07", "0", "0" "libtest-nobreakpoints-perl", "Test-NoBreakpoints", "0.13", "0", "1" "libtest-notabs-perl", "Test-NoTabs", "1.0", "0", "0" "libtest-nowarnings-perl", "Test-NoWarnings", "1.02", "0", "0" "libtest-number-delta-perl", "Test-Number-Delta", "1.03", "0", "0" "libtest-object-perl", "Test-Object", "0.07", "0", "0" "libtest-output-perl", "Test-Output", "1.01", "0", "1" "libtest-perl-critic-perl", "Test-Perl-Critic", "1.02", "0", "0" "libtest-pod-content-perl", "Test-Pod-Content", "0.0.5", "0", "0" "libtest-pod-coverage-perl", "Test-Pod-Coverage", "1.08", "0", "0" "libtest-pod-no404s-perl", "Test-Pod-No404s", "0.01", "0", "0" "libtest-pod-perl", "Test-Pod", "1.44", "0", "0" "libtest-poe-client-tcp-perl", "Test-POE-Client-TCP", "1.06", "0", "0" "libtest-poe-server-tcp-perl", "Test-POE-Server-TCP", "1.14", "0", "0" "libtest-portability-files-perl", "Test-Portability-Files", "0.05", "0", "1" "libtest-prereq-perl", "Test-Prereq", "1.037", "0", "1" "libtest-refcount-perl", "Test-Refcount", "0.07", "0", "0" "libtest-regression-perl", "Test-Regression", "0.05", "0", "0" "libtest-reporter-perl", "Test-Reporter", "1.57", "0", "0" "libtest-requires-perl", "Test-Requires", "0.05", "0", "0" "libtest-script-perl", "Test-Script", "1.07", "0", "0" "libtest-script-run-perl", "Test-Script-Run", "0.05", "0", "0" "libtest-sharedfork-perl", "Test-SharedFork", "0.15", "0", "0" "libtest-signature-perl", "Test-Signature", "1.10", "0", "0" "libtest-simple-perl", "Test-Simple", "0.98", "0", "0" "libtest-simpleunit-perl", "unknown", "1.21", "0", "0" "libtest-spelling-perl", "Test-Spelling", "0.13", "0", "0" "libtest-strict-perl", "Test-Strict", "0.14", "1", "0" "libtest-subcalls-perl", "Test-SubCalls", "1.09", "0", "0" "libtest-synopsis-perl", "Test-Synopsis", "0.06", "0", "0" "libtest-taint-perl", "Test-Taint", "1.04", "0", "0" "libtest-tcp-perl", "Test-TCP", "1.12", "0", "0" "libtest-tempdir-perl", "Test-TempDir", "0.05", "0", "0" "libtest-tester-perl", "Test-Tester", "0.107", "1", "0" "libtest-trap-perl", "Test-Trap", "0.2.1", "0", "0" "libtest-unit-perl", "Test-Unit", "0.25", "0", "1" "libtest-use-ok-perl", "Test-use-ok", "0.02", "0", "0" "libtest-useallmodules-perl", "Test-UseAllModules", "0.12", "0", "0" "libtest-valgrind-perl", "Test-Valgrind", "1.12", "0", "0" "libtest-warn-perl", "Test-Warn", "0.22", "0", "1" "libtest-weaken-perl", "Test-Weaken", "3.004000", "0", "0" "libtest-without-module-perl", "Test-Without-Module", "0.17", "0", "0" "libtest-www-declare-perl", "Test-WWW-Declare", "0.02", "0", "0" "libtest-www-mechanize-catalyst-perl", "Test-WWW-Mechanize-Catalyst", "0.53", "0", "0" "libtest-www-mechanize-cgiapp-perl", "Test-WWW-Mechanize-CGIApp", "0.05", "0", "0" "libtest-www-mechanize-mojo-perl", "Test-WWW-Mechanize-Mojo", "0.0.8", "0", "0" "libtest-www-mechanize-perl", "Test-WWW-Mechanize", "1.30", "1", "0" "libtest-www-selenium-perl", "Test-WWW-Selenium", "1.25", "0", "0" "libtest-xml-simple-perl", "Test-XML-Simple", "1.00", "0", "2" "libtest-yaml-meta-perl", "Test-YAML-Meta", "0.19", "0", "1" "libtest-yaml-valid-perl", "Test-YAML-Valid", "0.04", "0", "0" "libtex-encode-perl", "TeX-Encode", "1.1", "0", "0" "libtext-affixes-perl", "Text-Affixes", "0.07", "0", "0" "libtext-asciitable-perl", "Text-ASCIITable", "0.18", "1", "0" "libtext-autoformat-perl", "Text-Autoformat", "1.669002", "0", "0" "libtext-bidi-perl", "Text-Bidi", "0.03", "0", "1" "libtext-context-eitherside-perl", "Text-Context-EitherSide", "1.4", "0", "0" "libtext-context-perl", "Text-Context", "3.7", "0", "0" "libtext-csv-encoded-perl", "Text-CSV-Encoded", "0.10", "0", "0" "libtext-csv-perl", "Text-CSV", "1.21", "0", "0" "libtext-csv-xs-perl", "Text-CSV_XS", "0.81", "0", "0" "libtext-dhcpleases-perl", "Text-DHCPLeases", "0.9", "0", "0" "libtext-diff-perl", "Text-Diff", "1.41", "0", "0" "libtext-findindent-perl", "Text-FindIndent", "0.10", "0", "0" "libtext-flow-perl", "Text-Flow", "0.01", "0", "1" "libtext-format-perl", "Text-Format", "0.53", "0", "0" "libtext-formattable-perl", "Text-FormatTable", "1.03", "0", "0" "libtext-glob-perl", "Text-Glob", "0.09", "0", "0" "libtext-greeking-perl", "Text-Greeking", "0.12", "0", "1" "libtext-levenshtein-perl", "Text-Levenshtein", "0.06~01", "0", "1" "libtext-levenshteinxs-perl", "Text-LevenshteinXS", "0.03", "0", "0" "libtext-lorem-perl", "Text-Lorem", "0.3", "0", "0" "libtext-markdown-perl", "Text-Markdown", "1.0.26", "0", "1" "libtext-mediawikiformat-perl", "Text-MediawikiFormat", "1.0", "0", "0" "libtext-micromason-perl", "Text-MicroMason", "2.13", "0", "0" "libtext-microtemplate-perl", "Text-MicroTemplate", "0.18", "0", "0" "libtext-multimarkdown-perl", "Text-MultiMarkdown", "1.0.30", "1", "1" "libtext-password-pronounceable-perl", "Text-Password-Pronounceable", "0.30", "0", "0" "libtext-patch-perl", "Text-Patch", "1.8", "0", "0" "libtext-pdf-perl", "Text-PDF", "0.29a", "0", "1" "libtext-qrcode-perl", "Text-QRCode", "0.01", "0", "1" "libtext-quoted-perl", "Text-Quoted", "2.06", "0", "0" "libtext-recordparser-perl", "Text-RecordParser", "1.5.0", "0", "0" "libtext-reflow-perl", "Text-Reflow", "1.09", "0", "2" "libtext-reform-perl", "Text-Reform", "1.20", "0", "0" "libtext-roman-perl", "Text-Roman", "3.3", "0", "0" "libtext-simpletable-perl", "Text-SimpleTable", "1.2", "0", "0" "libtext-tabulardisplay-perl", "Text-TabularDisplay", "1.22", "0", "0" "libtext-template-perl", "Text-Template", "1.45", "0", "2" "libtext-textile-perl", "Text-Textile", "2.12", "0", "0" "libtext-trim-perl", "Text-Trim", "1.02", "0", "0" "libtext-typography-perl", "Text-Typography", "0.01", "0", "1" "libtext-wrapper-perl", "Text-Wrapper", "1.02", "0", "0" "libthread-pool-simple-perl", "Thread-Pool-Simple", "0.25", "0", "0" "libthread-queue-any-perl", "Thread-Queue-Any", "0.09", "0", "0" "libthread-queue-perl", "Thread-Queue", "2.12", "0", "0" "libthread-serialize-perl", "Thread-Serialize", "0.11", "0", "0" "libthrowable-perl", "Throwable", "0.102080", "0", "0" "libticket-simple-perl", "http://release.cipux.org//Ticket-Simple-0.0.2.tar.gz", "0.0.2", "0", "0" "libtie-array-sorted-perl", "Tie-Array-Sorted", "1.41", "0", "0" "libtie-cphash-perl", "Tie-CPHash", "1.04", "0", "0" "libtie-dbi-perl", "Tie-DBI", "1.04", "0", "2" "libtie-encryptedhash-perl", "Tie-EncryptedHash", "1.24", "0", "0" "libtie-hash-regex-perl", "Tie-Hash-Regex", "1.02", "0", "0" "libtie-ical-perl", "Tie-iCal", "0.13", "1", "1" "libtie-persistent-perl", "Tie-Persistent", "1.00", "0", "0" "libtie-refhash-weak-perl", "Tie-RefHash-Weak", "0.09", "0", "0" "libtie-regexphash-perl", "Tie-RegexpHash", "0.15", "0", "0" "libtie-toobject-perl", "Tie-ToObject", "0.03", "0", "0" "libtime-clock-perl", "Time-Clock", "1.01", "0", "0" "libtime-duration-parse-perl", "Time-Duration-Parse", "0.06", "0", "1" "libtime-duration-perl", "Time-Duration", "1.06", "0", "0" "libtime-fake-perl", "Time-Fake", "0.11", "0", "0" "libtime-human-perl", "Time-Human", "1.03", "0", "0" "libtime-local-perl", "Time-Local", "1.2000", "0", "0" "libtime-modules-perl", "Time-modules", "2006.0814", "1", "1" "libtime-piece-mysql-perl", "Time-Piece-MySQL", "0.06", "0", "0" "libtime-piece-perl", "Time-Piece", "1.20", "1", "2" "libtime-progress-perl", "Time-Progress", "1.7", "0", "0" "libtime-stopwatch-perl", "Time-Stopwatch", "1.00", "0", "0" "libtime-warp-perl", "Time-Warp", "0.5", "0", "0" "libtime-y2038-perl", "Time-y2038", "20100403", "0", "0" "libtimedate-perl", "TimeDate", "1.2000", "7", "3" "libtitanium-perl", "Titanium", "1.04", "0", "0" "libtk-dirselect-perl", "Tk-DirSelect", "1.12", "0", "0" "libtk-filedialog-perl", "Tk-FileDialog", "1.3", "0", "2" "libtk-gbarr-perl", "Tk-GBARR", "2.08", "0", "2" "libtk-histentry-perl", "Tk-HistEntry", "0.43", "0", "0" "libtk-objscanner-perl", "Tk-ObjScanner", "2.012", "0", "1" "libtk-pod-perl", "Tk-Pod", "0.9939", "0", "1" "libtk-splashscreen-perl", "Tk-Splashscreen", "1.0", "0", "0" "libtokyocabinet-perl", "http://1978th.net/tokyocabinet/perlpkg/tokyocabinet-perl-1.34.tar.gz", "1.34", "0", "0" "libtoolkit-perl", "Toolkit", "0.0.2", "0", "0" "libtree-dagnode-perl", "Tree-DAG_Node", "1.06", "0", "0" "libtree-redblack-perl", "Tree-RedBlack", "0.5", "0", "0" "libtree-simple-perl", "Tree-Simple", "1.18", "0", "0" "libtree-simple-visitorfactory-perl", "Tree-Simple-VisitorFactory", "0.10", "0", "1" "libtrue-perl", "true", "0.18", "0", "0" "libtry-tiny-perl", "Try-Tiny", "0.09", "0", "0" "libunicode-collate-perl", "unknown", "0.66", "0", "0" "libunicode-japanese-perl", "Unicode-Japanese", "0.47", "1", "0" "libunicode-map-perl", "Unicode-Map", "0.112", "1", "2" "libunicode-map8-perl", "Unicode-Map8", "0.13", "0", "3" "libunicode-maputf8-perl", "Unicode-MapUTF8", "1.11", "0", "0" "libunicode-string-perl", "Unicode-String", "2.09", "0", "0" "libuniversal-can-perl", "UNIVERSAL-can", "1.16", "0", "0" "libuniversal-exports-perl", "unknown", "0.05", "0", "0" "libuniversal-isa-perl", "UNIVERSAL-isa", "1.02", "0", "0" "libuniversal-moniker-perl", "UNIVERSAL-moniker", "0.08", "0", "0" "libuniversal-require-perl", "UNIVERSAL-require", "0.13", "0", "0" "libunix-syslog-perl", "Unix-Syslog", "1.1", "0", "0" "liburi-perl", "URI", "1.58", "1", "0" "liburi-query-perl", "URI-Query", "0.08", "0", "1" "liburi-todisk-perl", "URI-ToDisk", "1.12", "0", "0" "libuser-identity-perl", "User-Identity", "0.93", "0", "0" "libuser-simple-perl", "User-Simple", "1.43", "1", "0" "libutf8-all-perl", "utf8-all", "0.002", "0", "0" "libuuid-perl", "UUID", "0.02", "0", "0" "libuuid-tiny-perl", "UUID-Tiny", "1.0300", "0", "0" "libv-perl", "V", "0.13", "0", "0" "libvalidate-net-perl", "Validate-Net", "0.6", "0", "0" "libvariable-magic-perl", "Variable-Magic", "0.46", "0", "0" "libvendorlib-perl", "vendorlib", "0.10", "0", "0" "libverilog-perl", "Verilog-Perl", "3.306", "2", "0" "libversion-next-perl", "Version-Next", "0.002", "0", "0" "libversion-perl", "version", "0.8800", "0", "0" "libversion-requirements-perl", "Version-Requirements", "0.101020", "0", "0" "libvi-quickfix-perl", "Vi-QuickFix", "1.134", "0", "0" "libvideo-capture-v4l-perl", "Video-Capture-V4l", "0.902", "1", "4" "libvideo-fourcc-info-perl", "Video-FourCC-Info", "1.005", "0", "0" "libvideo-info-perl", "Video-Info", "0.993", "0", "6" "libvitacilina-perl", "Vitacilina", "0.2", "0", "0" "libwant-perl", "Want", "0.18", "0", "0" "libwarnings-illegalproto-perl", "warnings-illegalproto", "0.001000", "0", "0" "libweather-google-perl", "Weather-Google", "0.05", "0", "1" "libweb-scraper-perl", "Web-Scraper", "0.34", "0", "0" "libweb-simple-perl", "Web-Simple", "0.002", "0", "1" "libwebservice-cia-perl", "WebService-CIA", "1.4", "0", "0" "libwebservice-solr-perl", "WebService-Solr", "0.12", "0", "0" "libwebservice-validator-css-w3c-perl", "WebService-Validator-CSS-W3C", "0.2", "0", "0" "libwebservice-validator-html-w3c-perl", "WebService-Validator-HTML-W3C", "0.24", "0", "0" "libwebservice-youtube-perl", "WebService-YouTube", "1.0.3", "0", "2" "libwordnet-querydata-perl", "WordNet-QueryData", "1.48", "0", "0" "libwww-bugzilla-perl", "WWW-Bugzilla", "1.5", "0", "1" "libwww-cnic-perl", "WWW-CNic", "0.38", "0", "2" "libwww-curl-perl", "WWW-Curl", "4.15", "0", "0" "libwww-facebook-api-perl", "WWW-Facebook-API", "0.4.18", "2", "3" "libwww-freshmeat-perl", "WWW-Freshmeat", "0.21", "0", "1" "libwww-google-auth-clientlogin-perl", "WWW-Google-Auth-ClientLogin", "0.04", "0", "0" "libwww-google-calculator-perl", "WWW-Google-Calculator", "0.07", "0", "0" "libwww-mechanize-autopager-perl", "WWW-Mechanize-AutoPager", "0.02", "0", "0" "libwww-mechanize-decodedcontent-perl", "WWW-Mechanize-DecodedContent", "0.02", "1", "0" "libwww-mechanize-formfiller-perl", "WWW-Mechanize-FormFiller", "0.10", "0", "1" "libwww-mechanize-gzip-perl", "WWW-Mechanize-GZip", "0.12", "0", "0" "libwww-mechanize-perl", "WWW-Mechanize", "1.68", "0", "1" "libwww-mechanize-shell-perl", "WWW-Mechanize-Shell", "0.52", "0", "0" "libwww-mechanize-treebuilder-perl", "WWW-Mechanize-TreeBuilder", "1.10003", "0", "2" "libwww-nicovideo-download-perl", "WWW-NicoVideo-Download", "0.06", "0", "0" "libwww-perl", "libwww-perl", "6.01", "13", "0" "libwww-robotrules-perl", "WWW-RobotRules", "6.01", "0", "0" "libwww-search-perl", "WWW-Search", "2.50.70.debian.2", "0", "0" "libwww-topica-perl", "WWW-Topica", "0.6", "0", "0" "libwww-wikipedia-perl", "WWW-Wikipedia", "2.00", "0", "0" "libwww-youtube-download-perl", "WWW-YouTube-Download", "0.26", "0", "0" "libwwwbrowser-perl", "http://user.cs.tu-berlin.de/~eserte/src/perl/WWWBrowser/WWWBrowser-2.23.tar.gz", "2.23", "0", "2" "libwx-perl", "Wx", "0.98", "0", "2" "libwx-perl-datawalker-perl", "Wx-Perl-DataWalker", "0.02", "0", "0" "libwx-perl-processstream-perl", "Wx-Perl-ProcessStream", "0.29", "0", "1" "libx11-freedesktop-desktopentry-perl", "X11-FreeDesktop-DesktopEntry", "0.04", "0", "1" "libx11-xcb-perl", "X11-XCB", "not-uploaded", "0", "0" "libx500-dn-perl", "X500-DN", "0.29", "0", "1" "libxml-atom-perl", "XML-Atom", "0.37", "1", "0" "libxml-atom-service-perl", "XML-Atom-Service", "0.16.1", "0", "0" "libxml-atom-simplefeed-perl", "XML-Atom-SimpleFeed", "0.86", "0", "0" "libxml-autowriter-perl", "XML-AutoWriter", "0.40", "1", "1" "libxml-bare-perl", "XML-Bare", "0.45", "0", "0" "libxml-checker-perl", "XML-Checker", "0.13", "0", "0" "libxml-csv-perl", "XML-CSV", "0.15", "0", "0" "libxml-dom-perl", "XML-DOM", "1.44", "1", "2" "libxml-dom-xpath-perl", "XML-DOM-XPath", "0.14", "0", "0" "libxml-dtdparser-perl", "XML-DTDParser", "2.01", "0", "0" "libxml-easyobj-perl", "XML-EasyOBJ", "1.12", "0", "1" "libxml-encoding-perl", "XML-Encoding", "2.07", "0", "1" "libxml-feed-perl", "XML-Feed", "0.43", "1", "2" "libxml-feedpp-mediarss-perl", "XML-FeedPP-MediaRSS", "0.02", "0", "0" "libxml-feedpp-perl", "XML-FeedPP", "0.43", "0", "0" "libxml-filter-buffertext-perl", "XML-Filter-BufferText", "1.01", "0", "0" "libxml-filter-detectws-perl", "XML-Filter-DetectWS", "0.01", "0", "0" "libxml-filter-reindent-perl", "XML-Filter-Reindent", "0.03", "0", "1" "libxml-filter-saxt-perl", "XML-Filter-SAXT", "0.01", "0", "0" "libxml-filter-sort-perl", "XML-Filter-Sort", "1.01", "1", "0" "libxml-filter-xslt-perl", "XML-Filter-XSLT", "0.03", "0", "0" "libxml-generator-perl", "XML-Generator", "1.01", "0", "1" "libxml-grove-perl", "XML-Grove", "0.46alpha", "0", "3" "libxml-handler-composer-perl", "XML-Handler-Composer", "0.01", "0", "0" "libxml-handler-printevents-perl", "XML-Handler-PrintEvents", "0.01", "0", "0" "libxml-handler-trees-perl", "XML-Handler-Trees", "0.02", "0", "0" "libxml-handler-yawriter-perl", "XML-Handler-YAWriter", "0.23", "0", "1" "libxml-libxml-iterator-perl", "XML-LibXML-Iterator", "1.04", "0", "0" "libxml-libxml-perl", "XML-LibXML", "1.70.ds", "7", "2" "libxml-libxml-simple-perl", "XML-LibXML-Simple", "0.14", "0", "0" "libxml-libxslt-perl", "XML-LibXSLT", "1.70", "3", "1" "libxml-mini-perl", "XML-Mini", "1.38", "0", "4" "libxml-namespacesupport-perl", "XML-NamespaceSupport", "1.09", "0", "0" "libxml-node-perl", "XML-Node", "0.11", "0", "0" "libxml-nodefilter-perl", "XML-NodeFilter", "0.01", "0", "0" "libxml-opml-perl", "XML-OPML", "0.26", "0", "0" "libxml-opml-simplegen-perl", "XML-OPML-SimpleGen", "0.04", "0", "0" "libxml-parser-lite-tree-perl", "XML-Parser-Lite-Tree", "0.12", "0", "1" "libxml-parser-perl", "XML-Parser", "2.40", "3", "3" "libxml-perl", "libxml-perl", "0.08", "0", "3" "libxml-quote-perl", "XML-Quote", "1.02", "0", "0" "libxml-regexp-perl", "XML-RegExp", "0.03", "0", "0" "libxml-rss-libxml-perl", "XML-RSS-LibXML", "0.3100", "0", "1" "libxml-rss-perl", "XML-RSS", "1.49", "0", "0" "libxml-rss-simplegen-perl", "XML-RSS-SimpleGen", "11.11", "0", "1" "libxml-rsslite-perl", "XML-RSSLite", "0.15", "1", "1" "libxml-sax-expat-incremental-perl", "XML-SAX-Expat-Incremental", "0.05", "1", "0" "libxml-sax-expat-perl", "XML-SAX-Expat", "0.40", "1", "0" "libxml-sax-expatxs-perl", "XML-SAX-ExpatXS", "1.32", "0", "2" "libxml-sax-machines-perl", "XML-SAX-Machines", "0.42", "0", "2" "libxml-sax-perl", "XML-SAX", "0.96", "0", "4" "libxml-sax-writer-perl", "XML-SAX-Writer", "0.53", "1", "4" "libxml-simple-perl", "XML-Simple", "2.18", "0", "1" "libxml-simpleobject-perl", "XML-SimpleObject", "0.53", "0", "1" "libxml-smart-perl", "XML-Smart", "1.6.9", "0", "1" "libxml-stream-perl", "XML-Stream", "1.23", "0", "2" "libxml-tidy-perl", "XML-Tidy", "1.12.B55J2qn", "0", "1" "libxml-treebuilder-perl", "XML-TreeBuilder", "4.0", "0", "1" "libxml-um-perl", "XML-UM", "0.01", "0", "1" "libxml-validator-schema-perl", "XML-Validator-Schema", "1.10", "0", "2" "libxml-writer-perl", "XML-Writer", "0.612", "0", "0" "libxml-writer-simple-perl", "XML-Writer-Simple", "0.07", "0", "0" "libxml-xpath-perl", "XML-XPath", "1.13", "4", "4" "libxml-xpathengine-perl", "XML-XPathEngine", "0.12", "0", "1" "libxml-xql-perl", "XML-XQL", "0.68", "0", "2" "libxml-xslt-perl", "XML-XSLT", "0.48", "0", "2" "libyaml-appconfig-perl", "YAML-AppConfig", "0.16", "0", "2" "libyaml-libyaml-perl", "YAML-LibYAML", "0.35", "0", "0" "libyaml-perl", "YAML", "0.72", "2", "1" "libyaml-syck-perl", "YAML-Syck", "1.17", "1", "0" "libzeromq-perl", "ZeroMQ", "not-uploaded", "0", "0" "nama", "Audio-Nama", "1.073", "0", "1" "perlbrew", "App-perlbrew", "0.21", "0", "0" "perlconsole", "perlconsole", "0.4", "1", "1" "perlindex", "perlindex", "1.605", "1", "2" "perlipq", "perlipq", "1.25", "0", "3" "pmtools", "pmtools", "1.10", "0", "0" "pperl", "PPerl", "0.25", "3", "7" "starman", "Starman", "0.2010", "0", "0" "twiggy", "Twiggy", "0.1010", "0", "0" "w3c-linkchecker", "W3C-LinkChecker", "4.8", "2", "2" "xacobeo", "Xacobeo", "0.13", "0", "1" "ylastic-costagent", "App-Ylastic-CostAgent", "not-uploaded", "0", "0" SOAP-Lite-1.19/dist.ini000644 000770 000024 00000003655 12567356463 015040 0ustar00phredstaff000000 000000 name = SOAP-Lite version = 1.19 author = Pavel Kulchenko author = Randy J Ray author = Byrne Reese author = Martin Kutter author = Fred Moyer license = Perl_5 copyright_holder = Paul Kulchenko, Martin Kutter, Fred Moyer copyright_year = 2000 main_module = lib/SOAP/Lite.pm [GatherDir] exclude_filename = Makefile.PL [PruneCruft] [MetaYAML] [MetaJSON] [License] [ExecDir] dir = bin ; This is for case when one decides to install example code along a way ;[ShareDir] ;dir = examples [MakeMaker] [Manifest] [MetaResources] bugtracker.web = https://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite bugtracker.mailto = bug-SOAP-Lite@rt.cpan.org repository.url = ssh://git@github.com:redhotpenguin/soaplite.git repository.web = https://github.com/redhotpenguin/soaplite repository.type = git [ExtraTests] [PodSyntaxTests] [Test::Kwalitee] [Prereqs] XML::Parser = 2.23 MIME::Base64 = 0 URI = 0 Scalar::Util = 0 Task::Weaken = 0 constant = 0 Class::Inspector = 0 IO::SessionData = 1.03 IO::Socket::SSL = 0 Compress::Zlib = 0 LWP::UserAgent = 0 LWP::Protocol::https = 0 [Prereqs / RuntimeRecommends] HTTP::Daemon = 0 ; for SOAP::Transport::HTTP::Daemon Apache = 0 ; for SOAP::Transport::HTTP::Apache FCGI = 0 ; for SOAP::Transport::HTTP::FCGI Net::POP3 = 0 ; for SOAP::Transport::POP3 IO::File = 0 ; for SOAP::Transport::IO MIME::Tools = 0 ; for SOAP::Packager and SOAP::Lite::Packager DIME::Tools = 0.03 ; " [Prereqs / RuntimeSuggests] SOAP::Transport::MQ = 0.712 ; for examples SOAP::Transport::JABBER = 0.712 ; for examples [Prereqs / TestRequires] IO::File = 0 Test::More = 0 Test::Warn = 0 XML::Parser::Lite = 0 [Prereqs / TestRecommends] IO::Scalar = 2.105 Test::MockObject = 0 Test::XML = 0 [TestRelease] [ConfirmRelease] [UploadToCPAN] SOAP-Lite-1.19/examples/000755 000770 000024 00000000000 12567356463 015201 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/HACKING000644 000770 000024 00000011047 12567356463 014355 0ustar00phredstaff000000 000000 HACKING ======= Development of SOAP::Lite takes place on GitHub. git@github.com:redhotpenguin/soaplite.git Come on by and fork it and submit a pull request. Looking for a few good maintainers! We want you! SOAP::Lite CODING GUIDELINES ============================ SOAP::Lite's coding style in principle follows Perl Best Practices by Damian Conway, but allows deviances for speed and backward compatibility reasons. The following guidelines apply: - Symbol table operations * SOAP::Lite heavily relies on symbol table operations. While this is nothing bad, you should always try other variants like subclassing before. Use symbol table operations as a last resort, and preferably consolidate similar operations into utility functions. - Autoloading * SOAP::Lite heavily relies on AUTOLOAD, often together with symbol table operations. While this is nothing generally bad, it can lead to subtle errors, for example when switching the underlying protocol handler of a transport backend. Methods already autoloaded (and cached via symbol table) remain, even if there's a equally named method in the new protocol handler. It's generally best not to rely on AUTOLOAD and symbol table operations - subclassing is often more appropriate. - testing * SOAP::Lite has a test coverage of >60%, but aims at 100%. Please write a test first. * Use author tests for testing guidelines. Disable author tests for users - it's time consuming and of no use to have users run author tests. Author tests are enabled by setting the "AUTHOR_TESTING" environment variable to a true value, or when running "dzil test". - Indentation and formatting * indent with spaces. * indent 4 characters per level * use \n (LF) for newlines, not CRLF * use blank lines to separate paragraphs * Coding style is similar to K&R (opening brace on last line, closing brace on new line. No cuddled else) * No trailing spaces allowed (except to indicate a blank line in a POD source block) - Flow control * postfix if is allowed for single statements only. Preferably for flow control only like in: return $self if ref $self; * postfix for, while, until are not allowed. * unless is not allowed at all. Use if not. * goto is only allowed for jumping into subs. Nothing else. * redo, next, last etc. are preferred over goto. - Strictness * always use strict. Switch off for the smallest block possible, but switch off if there's a reason (don't let tools like perlcritic fool you: no strict qw(refs); is often required. - Naming * variable names are lower case with _ separating words, except when a XML Schema, SOAP, or WSDL name is name-giving (don't force portType to become port_type) * hashes should be named FOO_of, lists FOO_from, references FOO_ref. * package names are CamelCase, except when a XML, SOAP or WSDL name is name-giving (don't force 'int' to become 'Int'. However, simpleType becomes SimpleType). Protocol names for transport modules are all UPPERCASE, like in SOAP::Transport::HTTP or in SOAP::Transport::MAILTO. - Subroutines * Subroutines shouldn't be more than around 50 lines long * @_ should be unpacked. Deviances are allowed for speed reasons. If you're not unpacking @_ in a sub of say, 5 lines or more, please comment what you're doing. * The preferred idiom for unpacking @_ is: my ($self, @arg_from) = @_; or my ($self, %arg_of) = @_; $_[0] is preferred over shift, except where the rest of the parameter stack is used en block later. * Always return. - POD and comments * Comments denoting some people's copyright on some piece of the code MUST be kept intact. * Comment extensively. Comments are the maintainer (and core developer's) documentation - aid them where possible (your're probably doing yourself a favor by adding extensive comments). * Comment either in blocks or as hanging side comments (especially when commenting @_ access). Example: sub baz { # @_ not unpacked for speed reasons. Read: # my ($self, $something, %args_of) = @_; $_[0]->bar($_[1]); # read as $self->bar($something); $_[0]->foo($_[2..$#]); # read as $self->foo(%args_of); return; } * POD is located at end of file, preferably after __END__ * Complete POD coverage is essential. However, if the package in question is used internally only, it's better to omit the POD completely - too many PODs to look at confuse the average CPAN user. SOAP-Lite-1.19/lib/000755 000770 000024 00000000000 12567356463 014131 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/LICENSE000644 000770 000024 00000044004 12567356463 014372 0ustar00phredstaff000000 000000 This software is copyright (c) 2000 by Paul Kulchenko, Martin Kutter, Fred Moyer. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2000 by Paul Kulchenko, Martin Kutter, Fred Moyer. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2000 by Paul Kulchenko, Martin Kutter, Fred Moyer. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End SOAP-Lite-1.19/Makefile.PL000644 000770 000024 00000003632 12567356463 015341 0ustar00phredstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.039. use strict; use warnings; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Perl's Web Services Toolkit", "AUTHOR" => "Pavel Kulchenko, Randy J Ray, Byrne Reese, Martin Kutter , Fred Moyer", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "SOAP-Lite", "EXE_FILES" => [ "bin/SOAPsh.pl", "bin/stubmaker.pl" ], "LICENSE" => "perl", "NAME" => "SOAP::Lite", "PREREQ_PM" => { "Class::Inspector" => 0, "Compress::Zlib" => 0, "IO::SessionData" => "1.03", "IO::Socket::SSL" => 0, "LWP::Protocol::https" => 0, "LWP::UserAgent" => 0, "MIME::Base64" => 0, "Scalar::Util" => 0, "Task::Weaken" => 0, "URI" => 0, "XML::Parser" => "2.23", "constant" => 0 }, "TEST_REQUIRES" => { "IO::File" => 0, "Test::More" => 0, "Test::Warn" => 0, "XML::Parser::Lite" => 0 }, "VERSION" => "1.19", "test" => { "TESTS" => "t/*.t t/Issues/*.t t/SOAP/*.t t/SOAP/Lite/*.t t/SOAP/Lite/Deserializer/*.t t/SOAP/Schema/*.t t/SOAP/Transport/*.t t/SOAP/Transport/HTTP/*.t" } ); my %FallbackPrereqs = ( "Class::Inspector" => 0, "Compress::Zlib" => 0, "IO::File" => 0, "IO::SessionData" => "1.03", "IO::Socket::SSL" => 0, "LWP::Protocol::https" => 0, "LWP::UserAgent" => 0, "MIME::Base64" => 0, "Scalar::Util" => 0, "Task::Weaken" => 0, "Test::More" => 0, "Test::Warn" => 0, "URI" => 0, "XML::Parser" => "2.23", "XML::Parser::Lite" => 0, "constant" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); SOAP-Lite-1.19/MANIFEST000644 000770 000024 00000011611 12567356463 014514 0ustar00phredstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.039. Changes Debian_CPANTS.txt HACKING LICENSE MANIFEST META.json META.yml Makefile.PL README ReleaseNotes.txt bin/SOAPsh.pl bin/stubmaker.pl dist.ini examples/COM/README examples/COM/SOAP-Lite-COM-minimal.ctrl examples/COM/SOAP-Lite-COM-standalone.ctrl examples/COM/hash.vbs examples/COM/hashecho.vbs examples/COM/local.vbs examples/COM/make-com-minimal.bat examples/COM/make-com-standalone.bat examples/COM/make-com.args examples/COM/remote.cs examples/COM/remote.vba examples/COM/remote.vbs examples/COM/remote.xls examples/COM/service.vbs examples/COM/soap.asp examples/COM/soap.vbs examples/COM/soap_perl.asp examples/COM/states.html examples/COM/states.pl examples/COM/states.vba examples/COM/states.vbs examples/COM/states.xls examples/COM/temper.vbs examples/COM/xmlrpc.vbs examples/My/Chat.pm examples/My/Examples.pm examples/My/Parameters.pm examples/My/PersistentIterator.pm examples/My/PingPong.pm examples/My/SessionIterator.pm examples/SOAP/Transport/HTTP/Daemon/ForkAfterProcessing.pm examples/SOAP/Transport/HTTP/Daemon/ForkOnAccept.pm examples/SOAP/simple1.pl examples/SOAP/simple2.pl examples/SOAP/simple3.pl examples/UDDI/inquire1.pl examples/UDDI/publish1.pl examples/UDDI/simple1.pl examples/UDDI/simple2.pl examples/UDDI/syntax1.pl examples/UDDI/syntax2.pl examples/UDDI/syntax3.pl examples/WSDL/dynamic1.pl examples/WSDL/dynamic2.pl examples/WSDL/dynamic3.pl examples/WSDL/dynamic4.pl examples/WSDL/say_hello_doclit.pl examples/WSDL/say_hello_doclit.wsdl examples/WSDL/say_hello_rpcenc.pl examples/WSDL/say_hello_rpcenc.wsdl examples/WSDL/say_hello_rpcenc_schema.pl examples/WSDL/say_hello_rpclit.pl examples/WSDL/say_hello_rpclit.wsdl examples/WSDL/stub1.pl examples/WSDL/stub2.pl examples/WSDL/stub3.pl examples/XML/customxml.pl examples/XMLRPC/mod_xmlrpc.htaccess examples/XMLRPC/simple1.pl examples/XMLRPC/xmlrpc.cgi examples/XMLRPC/xmlrpc.daemon examples/allclients.pl examples/authentication.pl examples/autoexamples.pl examples/chat.pl examples/compress.pl examples/cookie.pl examples/cookieauth.pl examples/customschema.pl examples/forms/style.cgi examples/forms/style.html examples/fullsearch.pl examples/getdom.pl examples/google.pl examples/inline.daemon examples/iterator.pl examples/joke.pl examples/oneliners examples/oo-apache.pl examples/parametersbyname.pl examples/pingpong.pl examples/server/Apache.pm examples/server/mod_soap.htaccess examples/server/soap.asp examples/server/soap.cgi examples/server/soap.daemon examples/server/soap.daemon.forkafterprocessing examples/server/soap.daemon.forkonaccept examples/server/soap.fcgi examples/server/soap.io examples/server/soap.jabber examples/server/soap.mod_cgi examples/server/soap.mq examples/server/soap.pop3 examples/server/soap.tcp examples/server/soap.vbs examples/server/soap_perl.asp examples/soapmark.pl examples/soapsmtp.pl examples/tcpclient.pl examples/terraserver.pl examples/weblog.pl lib/Apache/SOAP.pm lib/SOAP/Client.pod lib/SOAP/Constants.pm lib/SOAP/Data.pod lib/SOAP/Deserializer.pod lib/SOAP/Fault.pod lib/SOAP/Header.pod lib/SOAP/Lite.pm lib/SOAP/Lite/Deserializer/XMLSchema1999.pm lib/SOAP/Lite/Deserializer/XMLSchema2001.pm lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm lib/SOAP/Lite/Packager.pm lib/SOAP/Lite/Utils.pm lib/SOAP/Packager.pm lib/SOAP/SOM.pod lib/SOAP/Schema.pod lib/SOAP/Serializer.pod lib/SOAP/Server.pod lib/SOAP/Test.pm lib/SOAP/Trace.pod lib/SOAP/Transport.pod lib/SOAP/Transport/HTTP.pm lib/SOAP/Transport/IO.pm lib/SOAP/Transport/LOCAL.pm lib/SOAP/Transport/LOOPBACK.pm lib/SOAP/Transport/MAILTO.pm lib/SOAP/Transport/POP3.pm lib/SOAP/Transport/TCP.pm lib/SOAP/Utils.pod t/01-core.t t/010-serializer.t t/012-cloneable.t t/013-array-deserialization.t t/014_UNIVERSAL_use.t t/015_UNIVERSAL_can.t t/02-payload.t t/03-server.t t/04-attach-cid-encoded.t t/04-attach.t t/05-customxml.t t/06-modules.t t/08-schema.t t/11-cgi.t t/12-cgi_https.t t/13-mod_perl.t t/14-cgi_apache.t t/15-daemon.t t/17-mod_soap.t t/19-apachesoap.t t/21-public.t t/22-interop_apache.t t/23-ppm.t t/24-wsdl.t t/36-leaks.t t/38-packager.t t/40-loopback.t t/Issues/recursion.pl t/Issues/rt15176.t t/Issues/rt53375.t t/Issues/rt70329.t t/Issues/rt70381.t t/Issues/rt72836.t t/Issues/rt74029.t t/Issues/rt74029.t.stored t/Issues/rt74308.t t/Issues/rt74308.t.wsdl t/Issues/rt75169.t t/Issues/rt78588.t t/Issues/rt88915.t t/SOAP/Data.t t/SOAP/Lite/Deserializer/XMLSchema1999.t t/SOAP/Lite/Deserializer/XMLSchema2001.t t/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.t t/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.t t/SOAP/Lite/Packager.t t/SOAP/Schema/WSDL.t t/SOAP/Serializer.t t/SOAP/Transport/HTTP.t t/SOAP/Transport/HTTP/CGI.t t/SOAP/Transport/HTTP/CGI/test_server.pl t/SOAP/Transport/IO.t t/SOAP/Transport/IO.xml t/SOAP/Transport/LOCAL.t t/SOAP/Transport/LOOPBACK.t t/SOAP/Transport/MAILTO.t t/SOAP/Transport/POP3.t t/SOAP/Transport/TCP.t t/release-kwalitee.t t/release-pod-syntax.t SOAP-Lite-1.19/META.json000644 000770 000024 00000004515 12567356463 015011 0ustar00phredstaff000000 000000 { "abstract" : "Perl's Web Services Toolkit", "author" : [ "Pavel Kulchenko", "Randy J Ray", "Byrne Reese", "Martin Kutter ", "Fred Moyer" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "SOAP-Lite", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::Kwalitee" : "1.21", "Test::Pod" : "1.41" } }, "runtime" : { "recommends" : { "Apache" : "0", "DIME::Tools" : "0.03", "FCGI" : "0", "HTTP::Daemon" : "0", "IO::File" : "0", "MIME::Tools" : "0", "Net::POP3" : "0" }, "requires" : { "Class::Inspector" : "0", "Compress::Zlib" : "0", "IO::SessionData" : "1.03", "IO::Socket::SSL" : "0", "LWP::Protocol::https" : "0", "LWP::UserAgent" : "0", "MIME::Base64" : "0", "Scalar::Util" : "0", "Task::Weaken" : "0", "URI" : "0", "XML::Parser" : "2.23", "constant" : "0" }, "suggests" : { "SOAP::Transport::JABBER" : "0.712", "SOAP::Transport::MQ" : "0.712" } }, "test" : { "recommends" : { "IO::Scalar" : "2.105", "Test::MockObject" : "0", "Test::XML" : "0" }, "requires" : { "IO::File" : "0", "Test::More" : "0", "Test::Warn" : "0", "XML::Parser::Lite" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-SOAP-Lite@rt.cpan.org", "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite" }, "repository" : { "type" : "git", "url" : "ssh://git@github.com:redhotpenguin/soaplite.git", "web" : "https://github.com/redhotpenguin/soaplite" } }, "version" : "1.19" } SOAP-Lite-1.19/META.yml000644 000770 000024 00000002076 12567356463 014641 0ustar00phredstaff000000 000000 --- abstract: "Perl's Web Services Toolkit" author: - 'Pavel Kulchenko' - 'Randy J Ray' - 'Byrne Reese' - 'Martin Kutter ' - 'Fred Moyer' build_requires: IO::File: '0' Test::More: '0' Test::Warn: '0' XML::Parser::Lite: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.039, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: SOAP-Lite recommends: Apache: '0' DIME::Tools: '0.03' FCGI: '0' HTTP::Daemon: '0' IO::File: '0' MIME::Tools: '0' Net::POP3: '0' requires: Class::Inspector: '0' Compress::Zlib: '0' IO::SessionData: '1.03' IO::Socket::SSL: '0' LWP::Protocol::https: '0' LWP::UserAgent: '0' MIME::Base64: '0' Scalar::Util: '0' Task::Weaken: '0' URI: '0' XML::Parser: '2.23' constant: '0' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=SOAP-Lite repository: ssh://git@github.com:redhotpenguin/soaplite.git version: '1.19' SOAP-Lite-1.19/README000644 000770 000024 00000172222 12567356463 014251 0ustar00phredstaff000000 000000 NAME SOAP::Lite - Perl's Web Services Toolkit DESCRIPTION SOAP::Lite is a collection of Perl modules which provides a simple and lightweight interface to the Simple Object Access Protocol (SOAP) both on client and server side. PERL VERSION WARNING As of version SOAP::Lite version 1.0, no perl versions before 5.8 will be supported. SOAP::Lite 0.71 will be the last version of SOAP::Lite running on perl 5.005 Future versions of SOAP::Lite will require at least perl 5.6.0 If you have not had the time to upgrade your perl, you should consider this now. OVERVIEW OF CLASSES AND PACKAGES lib/SOAP/Lite.pm SOAP::Lite - Main class provides all logic SOAP::Transport - Transport backend SOAP::Data - Data objects SOAP::Header - Header Data Objects SOAP::Serializer - Serializes data structures to SOAP messages SOAP::Deserializer - Deserializes SOAP messages into SOAP::SOM objects SOAP::SOM - SOAP Message objects SOAP::Constants - Provides access to common constants and defaults SOAP::Trace - Tracing facilities SOAP::Schema - Provides access and stub(s) for schema(s) SOAP::Schema::WSDL - WSDL implementation for SOAP::Schema SOAP::Server - Handles requests on server side SOAP::Server::Object - Handles objects-by-reference SOAP::Fault - Provides support for Faults on server side SOAP::Utils - A set of private and public utility subroutines lib/SOAP/Packager.pm SOAP::Packager - Provides an abstract class for implementing custom packagers. SOAP::Packager::MIME - Provides MIME support to SOAP::Lite SOAP::Packager::DIME - Provides DIME support to SOAP::Lite lib/SOAP/Transport/HTTP.pm SOAP::Transport::HTTP::Client - Client interface to HTTP transport SOAP::Transport::HTTP::Server - Server interface to HTTP transport SOAP::Transport::HTTP::CGI - CGI implementation of server interface SOAP::Transport::HTTP::Daemon - Daemon implementation of server interface SOAP::Transport::HTTP::Apache - mod_perl implementation of server interface lib/SOAP/Transport/POP3.pm SOAP::Transport::POP3::Server - Server interface to POP3 protocol lib/SOAP/Transport/MAILTO.pm SOAP::Transport::MAILTO::Client - Client interface to SMTP/sendmail lib/SOAP/Transport/LOCAL.pm SOAP::Transport::LOCAL::Client - Client interface to local transport lib/SOAP/Transport/TCP.pm SOAP::Transport::TCP::Server - Server interface to TCP protocol SOAP::Transport::TCP::Client - Client interface to TCP protocol lib/SOAP/Transport/IO.pm SOAP::Transport::IO::Server - Server interface to IO transport METHODS All accessor methods return the current value when called with no arguments, while returning the object reference itself when called with a new value. This allows the set-attribute calls to be chained together. new(optional key/value pairs) $client = SOAP::Lite->new(proxy => $endpoint) Constructor. Many of the accessor methods defined here may be initialized at creation by providing their name as a key, followed by the desired value. The example provides the value for the proxy element of the client. transport(optional transport object) $transp = $client->transport( ); Gets or sets the transport object used for sending/receiving SOAP messages. See SOAP::Transport for details. serializer(optional serializer object) $serial = $client->serializer( ) Gets or sets the serializer object used for creating XML messages. See SOAP::Serializer for details. packager(optional packager object) $packager = $client->packager( ) Provides access to the "SOAP::Packager" object that the client uses to manage the use of attachments. The default packager is a MIME packager, but unless you specify parts to send, no MIME formatting will be done. See also: SOAP::Packager. proxy(endpoint, optional extra arguments) $client->proxy('http://soap.xml.info/ endPoint'); The proxy is the server or endpoint to which the client is going to connect. This method allows the setting of the endpoint, along with any extra information that the transport object may need when communicating the request. This method is actually an alias to the proxy method of SOAP::Transport. It is the same as typing: $client->transport( )->proxy(...arguments); Extra parameters can be passed to proxy() - see below. compress_threshold See COMPRESSION in HTTP::Transport. All initialization options from the underlying transport layer The options for HTTP(S) are the same as for LWP::UserAgent's new() method. A common option is to create a instance of HTTP::Cookies and pass it as cookie_jar option: my $cookie_jar = HTTP::Cookies->new() $client->proxy('http://www.example.org/webservice', cookie_jar => $cookie_jar, ); For example, if you wish to set the HTTP timeout for a SOAP::Lite client to 5 seconds, use the following code: my $soap = SOAP::Lite ->uri($uri) ->proxy($proxyUrl, timeout => 5 ); See LWP::UserAgent. endpoint(optional new endpoint address) $client->endpoint('http://soap.xml.info/ newPoint') It may be preferable to set a new endpoint without the additional work of examining the new address for protocol information and checking to ensure the support code is loaded and available. This method allows the caller to change the endpoint that the client is currently set to connect to, without reloading the relevant transport code. Note that the proxy method must have been called before this method is used. service(service URL) $client->service('http://svc.perl.org/Svc.wsdl'); "SOAP::Lite" offers some support for creating method stubs from service descriptions. At present, only WSDL support is in place. This method loads the specified WSDL schema and uses it as the basis for generating stubs. outputxml(boolean) $client->outputxml('true'); When set to a true value, the raw XML is returned by the call to a remote method. The default is to return the a SOAP::SOM object (false). autotype(boolean) $client->autotype(0); This method is a shortcut for: $client->serializer->autotype(boolean); By default, the serializer tries to automatically deduce types for the data being sent in a message. Setting a false value with this method disables the behavior. readable(boolean) $client->readable(1); This method is a shortcut for: $client->serializer->readable(boolean); When this is used to set a true value for this property, the generated XML sent to the endpoint has extra characters (spaces and new lines) added in to make the XML itself more readable to human eyes (presumably for debugging). The default is to not send any additional characters. default_ns($uri) Sets the default namespace for the request to the specified uri. This overrides any previous namespace declaration that may have been set using a previous call to "ns()" or "default_ns()". Setting the default namespace causes elements to be serialized without a namespace prefix, like this: Some .NET web services have been reported to require this XML namespace idiom. ns($uri,$prefix=undef) Sets the namespace uri and optionally the namespace prefix for the request to the specified values. This overrides any previous namespace declaration that may have been set using a previous call to "ns()" or "default_ns()". If a prefix is not specified, one will be generated for you automatically. Setting the namespace causes elements to be serialized with a declared namespace prefix, like this: use_prefix(boolean) Deprecated. Use the "ns()" and "default_ns" methods described above. Shortcut for "serializer->use_prefix()". This lets you turn on/off the use of a namespace prefix for the children of the /Envelope/Body element. Default is 'true'. When use_prefix is set to 'true', serialized XML will look like this: When use_prefix is set to 'false', serialized XML will look like this: Some .NET web services have been reported to require this XML namespace idiom. soapversion(optional value) $client->soapversion('1.2'); If no parameter is given, returns the current version of SOAP that is being used by the client object to encode requests. If a parameter is given, the method attempts to set that as the version of SOAP being used. The value should be either 1.1 or 1.2. envprefix(QName) $client->envprefix('env'); This method is a shortcut for: $client->serializer->envprefix(QName); Gets or sets the namespace prefix for the SOAP namespace. The default is SOAP. The prefix itself has no meaning, but applications may wish to chose one explicitly to denote different versions of SOAP or the like. encprefix(QName) $client->encprefix('enc'); This method is a shortcut for: $client->serializer->encprefix(QName); Gets or sets the namespace prefix for the encoding rules namespace. The default value is SOAP-ENC. While it may seem to be an unnecessary operation to set a value that isn't relevant to the message, such as the namespace labels for the envelope and encoding URNs, the ability to set these labels explicitly can prove to be a great aid in distinguishing and debugging messages on the server side of operations. encoding(encoding URN) $client->encoding($soap_12_encoding_URN); This method is a shortcut for: $client->serializer->encoding(args); Where the earlier method dealt with the label used for the attributes related to the SOAP encoding scheme, this method actually sets the URN to be specified as the encoding scheme for the message. The default is to specify the encoding for SOAP 1.1, so this is handy for applications that need to encode according to SOAP 1.2 rules. typelookup $client->typelookup; This method is a shortcut for: $client->serializer->typelookup; Gives the application access to the type-lookup table from the serializer object. See the section on SOAP::Serializer. uri(service specifier) Deprecated - the "uri" subroutine is deprecated in order to provide a more intuitive naming scheme for subroutines that set namespaces. In the future, you will be required to use either the "ns()" or "default_ns()" subroutines instead of "uri()". $client->uri($service_uri); This method is a shortcut for: $client->serializer->uri(service); The URI associated with this accessor on a client object is the service-specifier for the request, often encoded for HTTP-based requests as the SOAPAction header. While the names may seem confusing, this method doesn't specify the endpoint itself. In most circumstances, the "uri" refers to the namespace used for the request. Often times, the value may look like a valid URL. Despite this, it doesn't have to point to an existing resource (and often doesn't). This method sets and retrieves this value from the object. Note that no transport code is triggered by this because it has no direct effect on the transport of the object. multirefinplace(boolean) $client->multirefinplace(1); This method is a shortcut for: $client->serializer->multirefinplace(boolean); Controls how the serializer handles values that have multiple references to them. Recall from previous SOAP chapters that a value may be tagged with an identifier, then referred to in several places. When this is the case for a value, the serializer defaults to putting the data element towards the top of the message, right after the opening tag of the method-specification. It is serialized as a standalone entity with an ID that is then referenced at the relevant places later on. If this method is used to set a true value, the behavior is different. When the multirefinplace attribute is true, the data is serialized at the first place that references it, rather than as a separate element higher up in the body. This is more compact but may be harder to read or trace in a debugging environment. parts( ARRAY ) Used to specify an array of MIME::Entity's to be attached to the transmitted SOAP message. Attachments that are returned in a response can be accessed by "SOAP::SOM::parts()". self $ref = SOAP::Lite->self; Returns an object reference to the default global object the "SOAP::Lite" package maintains. This is the object that processes many of the arguments when provided on the use line. The following method isn't an accessor style of method but neither does it fit with the group that immediately follows it: call(arguments) $client->call($method => @arguments); As has been illustrated in previous chapters, the "SOAP::Lite" client objects can manage remote calls with auto-dispatching using some of Perl's more elaborate features. call is used when the application wants a greater degree of control over the details of the call itself. The method may be built up from a SOAP::Data object, so as to allow full control over the namespace associated with the tag, as well as other attributes like encoding. This is also important for calling methods that contain characters not allowable in Perl function names, such as A.B.C. The next four methods used in the "SOAP::Lite" class are geared towards handling the types of events than can occur during the message lifecycle. Each of these sets up a callback for the event in question: on_action(callback) $client->on_action(sub { qq("$_[0]") }); Triggered when the transport object sets up the SOAPAction header for an HTTP-based call. The default is to set the header to the string, uri#method, in which URI is the value set by the uri method described earlier, and method is the name of the method being called. When called, the routine referenced (or the closure, if specified as in the example) is given two arguments, uri and method, in that order. .NET web services usually expect "/" as separator for "uri" and "method". To change SOAP::Lite's behaviour to use uri/method as SOAPAction header, use the following code: $client->on_action( sub { join '/', @_ } ); =item on_fault(callback) $client->on_fault(sub { popup_dialog($_[1]) }); Triggered when a method call results in a fault response from the server. When it is called, the argument list is first the client object itself, followed by the object that encapsulates the fault. In the example, the fault object is passed (without the client object) to a hypothetical GUI function that presents an error dialog with the text of fault extracted from the object (which is covered shortly under the SOAP::SOM methods). on_nonserialized(callback) $client->on_nonserialized(sub { die "$_[0]?!?" }); Occasionally, the serializer may be given data it can't turn into SOAP-savvy XML; for example, if a program bug results in a code reference or something similar being passed in as a parameter to method call. When that happens, this callback is activated, with one argument. That argument is the data item that could not be understood. It will be the only argument. If the routine returns, the return value is pasted into the message as the serialization. Generally, an error is in order, and this callback allows for control over signaling that error. on_debug(callback) $client->on_debug(sub { print @_ }); Deprecated. Use the global +debug and +trace facilities described in SOAP::Trace Note that this method will not work as expected: Instead of affecting the debugging behaviour of the object called on, it will globally affect the debugging behaviour for all objects of that class. WRITING A SOAP CLIENT This chapter guides you to writing a SOAP client by example. The SOAP service to be accessed is a simple variation of the well-known hello world program. It accepts two parameters, a name and a given name, and returns "Hello $given_name $name". We will use "Martin Kutter" as the name for the call, so all variants will print the following message on success: Hello Martin Kutter! SOAP message styles There are three common (and one less common) variants of SOAP messages. These address the message style (positional parameters vs. specified message documents) and encoding (as-is vs. typed). The different message styles are: * rpc/encoded Typed, positional parameters. Widely used in scripting languages. The type of the arguments is included in the message. Arrays and the like may be encoded using SOAP encoding rules (or others). * rpc/literal As-is, positional parameters. The type of arguments is defined by some pre-exchanged interface definition. * document/encoded Specified message with typed elements. Rarely used. * document/literal Specified message with as-is elements. The message specification and element types are defined by some pre-exchanged interface definition. As of 2008, document/literal has become the predominant SOAP message variant. rpc/literal and rpc/encoded are still in use, mainly with scripting languages, while document/encoded is hardly used at all. You will see clients for the rpc/encoded and document/literal SOAP variants in this section. Example implementations RPC/ENCODED Rpc/encoded is most popular with scripting languages like perl, php and python without the use of a WSDL. Usual method descriptions look like this: Method: sayHello(string, string) Parameters: name: string givenName: string Such a description usually means that you can call a method named "sayHello" with two positional parameters, "name" and "givenName", which both are strings. The message corresponding to this description looks somewhat like this: Kutter Martin Any XML tag names may be used instead of the "s-gensym01" stuff - parameters are positional, the tag names have no meaning. A client producing such a call is implemented like this: use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', 'Kutter', 'Martin'); die $som->faultstring if ($som->fault); print $som->result, "\n"; You can of course use a one-liner, too... Sometimes, rpc/encoded interfaces are described with WSDL definitions. A WSDL accepting "named" parameters with rpc/encoded looks like this: The message corresponding to this schema looks like this: Kutter Martin A web service client using this schema looks like this: use SOAP::Lite; my $soap = SOAP::Lite->service("file:say_hello_rpcenc.wsdl"); eval { my $result = $soap->sayHello('Kutter', 'Martin'); }; if ($@) { die $@; } print $som->result(); You may of course also use the following one-liner: perl -MSOAP::Lite -e 'print SOAP::Lite->service("file:say_hello_rpcenc.wsdl")\ ->sayHello('Kutter', 'Martin'), "\n";' A web service client (without a service description) looks like this. use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('name')->value('Kutter'), SOAP::Data->name('givenName')->value('Martin') ); die $som->faultstring if ($som->fault); print $som->result, "\n"; RPC/LITERAL SOAP web services using the document/literal message encoding are usually described by some Web Service Definition. Our web service has the following WSDL description: The XML message (inside the SOAP Envelope) look like this: Kutter Martin Hello Martin Kutter! This is the SOAP::Lite implementation for the web service client: use SOAP::Lite +trace; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0)->readable(1); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('parameters')->value( \SOAP::Data->value([ SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ])) ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n"; DOCUMENT/LITERAL SOAP web services using the document/literal message encoding are usually described by some Web Service Definition. Our web service has the following WSDL description: The XML message (inside the SOAP Envelope) look like this: Kutter Martin Hello Martin Kutter! You can call this web service with the following client code: use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call("sayHello", SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n"; Differences between the implementations You may have noticed that there's little difference between the rpc/encoded, rpc/literal and the document/literal example's implementation. In fact, from SOAP::Lite's point of view, the only differences between rpc/literal and document/literal that parameters are always named. In our example, the rpc/encoded variant already used named parameters (by using two messages), so there's no difference at all. You may have noticed the somewhat strange idiom for passing a list of named paraneters in the rpc/literal example: my $som = $soap->call('sayHello', SOAP::Data->name('parameters')->value( \SOAP::Data->value([ SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ])) ); While SOAP::Data provides full control over the XML generated, passing hash-like structures require additional coding. WRITING A SOAP SERVER See SOAP::Server, or SOAP::Transport. FEATURES ATTACHMENTS "SOAP::Lite" features support for the SOAP with Attachments specification. Currently, SOAP::Lite only supports MIME based attachments. DIME based attachments are yet to be fully functional. EXAMPLES Client sending an attachment "SOAP::Lite" clients can specify attachments to be sent along with a request by using the "SOAP::Lite::parts()" method, which takes as an argument an ARRAY of "MIME::Entity"'s. use SOAP::Lite; use MIME::Entity; my $ent = build MIME::Entity Type => "image/gif", Encoding => "base64", Path => "somefile.gif", Filename => "saveme.gif", Disposition => "attachment"; my $som = SOAP::Lite ->uri($SOME_NAMESPACE) ->parts([ $ent ]) ->proxy($SOME_HOST) ->some_method(SOAP::Data->name("foo" => "bar")); Client retrieving an attachment A client accessing attachments that were returned in a response by using the "SOAP::SOM::parts()" accessor. use SOAP::Lite; use MIME::Entity; my $soap = SOAP::Lite ->uri($NS) ->proxy($HOST); my $som = $soap->foo(); foreach my $part (${$som->parts}) { print $part->stringify; } Server receiving an attachment Servers, like clients, use the SOAP::SOM module to access attachments transmitted to it. package Attachment; use SOAP::Lite; use MIME::Entity; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub someMethod { my $self = shift; my $envelope = pop; foreach my $part (@{$envelope->parts}) { print "AttachmentService: attachment found! (".ref($part).")\n"; } # do something } Server responding with an attachment Servers wishing to return an attachment to the calling client need only return "MIME::Entity" objects along with SOAP::Data elements, or any other data intended for the response. package Attachment; use SOAP::Lite; use MIME::Entity; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub someMethod { my $self = shift; my $envelope = pop; my $ent = build MIME::Entity 'Id' => "<1234>", 'Type' => "text/xml", 'Path' => "some.xml", 'Filename' => "some.xml", 'Disposition' => "attachment"; return SOAP::Data->name("foo" => "blah blah blah"),$ent; } DEFAULT SETTINGS Though this feature looks similar to autodispatch they have (almost) nothing in common. This capability allows you specify default settings so that all objects created after that will be initialized with the proper default settings. If you wish to provide common "proxy()" or "uri()" settings for all "SOAP::Lite" objects in your application you may do: use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi', uri => 'http://my.own.com/My/Examples'; my $soap1 = new SOAP::Lite; # will get the same proxy()/uri() as above print $soap1->getStateName(1)->result; my $soap2 = SOAP::Lite->new; # same thing as above print $soap2->getStateName(2)->result; # or you may override any settings you want my $soap3 = SOAP::Lite->proxy('http://localhost/'); print $soap3->getStateName(1)->result; Any "SOAP::Lite" properties can be propagated this way. Changes in object copies will not affect global settings and you may still change global settings with "SOAP::Lite->self" call which returns reference to global object. Provided parameter will update this object and you can even set it to "undef": SOAP::Lite->self(undef); The "use SOAP::Lite" syntax also lets you specify default event handlers for your code. If you have different SOAP objects and want to share the same "on_action()" (or "on_fault()" for that matter) handler. You can specify "on_action()" during initialization for every object, but you may also do: use SOAP::Lite on_action => sub {sprintf '%s#%s', @_}; and this handler will be the default handler for all your SOAP objects. You can override it if you specify a handler for a particular object. See t/*.t for example of on_fault() handler. Be warned, that since "use ..." is executed at compile time all "use" statements will be executed before script execution that can make unexpected results. Consider code: use SOAP::Lite proxy => 'http://localhost/'; print SOAP::Lite->getStateName(1)->result; use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi'; print SOAP::Lite->getStateName(1)->result; Both SOAP calls will go to 'http://localhost/cgi-bin/soap.cgi'. If you want to execute "use" at run-time, put it in "eval": eval "use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi'; 1" or die; Or alternatively, SOAP::Lite->self->proxy('http://localhost/cgi-bin/soap.cgi'); SETTING MAXIMUM MESSAGE SIZE One feature of "SOAP::Lite" is the ability to control the maximum size of a message a SOAP::Lite server will be allowed to process. To control this feature simply define $SOAP::Constants::MAX_CONTENT_SIZE in your code like so: use SOAP::Transport::HTTP; use MIME::Entity; $SOAP::Constants::MAX_CONTENT_SIZE = 10000; SOAP::Transport::HTTP::CGI ->dispatch_to('TemperatureService') ->handle; IN/OUT, OUT PARAMETERS AND AUTOBINDING "SOAP::Lite" gives you access to all parameters (both in/out and out) and also does some additional work for you. Lets consider following example: name1 name2 name3 In that case: $result = $r->result; # gives you 'name1' $paramout1 = $r->paramsout; # gives you 'name2', because of scalar context $paramout1 = ($r->paramsout)[0]; # gives you 'name2' also $paramout2 = ($r->paramsout)[1]; # gives you 'name3' or @paramsout = $r->paramsout; # gives you ARRAY of out parameters $paramout1 = $paramsout[0]; # gives you 'res2', same as ($r->paramsout)[0] $paramout2 = $paramsout[1]; # gives you 'res3', same as ($r->paramsout)[1] Generally, if server returns "return (1,2,3)" you will get 1 as the result and 2 and 3 as out parameters. If the server returns "return [1,2,3]" you will get an ARRAY reference from "result()" and "undef" from "paramsout()". Results can be arbitrary complex: they can be an array references, they can be objects, they can be anything and still be returned by "result()" . If only one parameter is returned, "paramsout()" will return "undef". Furthermore, if you have in your output parameters a parameter with the same signature (name+type) as in the input parameters this parameter will be mapped into your input automatically. For example: Server Code: sub mymethod { shift; # object/class reference my $param1 = shift; my $param2 = SOAP::Data->name('myparam' => shift() * 2); return $param1, $param2; } Client Code: $a = 10; $b = SOAP::Data->name('myparam' => 12); $result = $soap->mymethod($a, $b); After that, "$result == 10 and $b->value == 24"! Magic? Sort of. Autobinding gives it to you. That will work with objects also with one difference: you do not need to worry about the name and the type of object parameter. Consider the "PingPong" example (examples/My/PingPong.pm and examples/pingpong.pl): Server Code: package My::PingPong; sub new { my $self = shift; my $class = ref($self) || $self; bless {_num=>shift} => $class; } sub next { my $self = shift; $self->{_num}++; } Client Code: use SOAP::Lite +autodispatch => uri => 'urn:', proxy => 'http://localhost/'; my $p = My::PingPong->new(10); # $p->{_num} is 10 now, real object returned print $p->next, "\n"; # $p->{_num} is 11 now!, object autobinded STATIC AND DYNAMIC SERVICE DEPLOYMENT Let us scrutinize the deployment process. When designing your SOAP server you can consider two kind of deployment: static and dynamic. For both, static and dynamic, you should specify "MODULE", "MODULE::method", "method" or "PATH/" when creating "use"ing the SOAP::Lite module. The difference between static and dynamic deployment is that in case of 'dynamic', any module which is not present will be loaded on demand. See the "SECURITY" section for detailed description. When statically deploying a SOAP Server, you need to know all modules handling SOAP requests before. Dynamic deployment allows extending your SOAP Server's interface by just installing another module into the dispatch_to path (see below). STATIC DEPLOYMENT EXAMPLE use SOAP::Transport::HTTP; use My::Examples; # module is preloaded SOAP::Transport::HTTP::CGI # deployed module should be present here or client will get # 'access denied' -> dispatch_to('My::Examples') -> handle; For static deployment you should specify the MODULE name directly. You should also use static binding when you have several different classes in one file and want to make them available for SOAP calls. DYNAMIC DEPLOYMENT EXAMPLE use SOAP::Transport::HTTP; # name is unknown, module will be loaded on demand SOAP::Transport::HTTP::CGI # deployed module should be present here or client will get 'access denied' -> dispatch_to('/Your/Path/To/Deployed/Modules', 'My::Examples') -> handle; For dynamic deployment you can specify the name either directly (in that case it will be "require"d without any restriction) or indirectly, with a PATH. In that case, the ONLY path that will be available will be the PATH given to the dispatch_to() method). For information how to handle this situation see "SECURITY" section. SUMMARY dispatch_to( # dynamic dispatch that allows access to ALL modules in specified directory PATH/TO/MODULES # 1. specifies directory # -- AND -- # 2. gives access to ALL modules in this directory without limits # static dispatch that allows access to ALL methods in particular MODULE MODULE # 1. gives access to particular module (all available methods) # PREREQUISITES: # module should be loaded manually (for example with 'use ...') # -- OR -- # you can still specify it in PATH/TO/MODULES # static dispatch that allows access to particular method ONLY MODULE::method # same as MODULE, but gives access to ONLY particular method, # so there is not much sense to use both MODULE and MODULE::method # for the same MODULE ); In addition to this "SOAP::Lite" also supports an experimental syntax that allows you to bind a specific URL or SOAPAction to a CLASS/MODULE or object. For example: dispatch_with({ URI => MODULE, # 'http://www.soaplite.com/' => 'My::Class', SOAPAction => MODULE, # 'http://www.soaplite.com/method' => 'Another::Class', URI => object, # 'http://www.soaplite.com/obj' => My::Class->new, }) "URI" is checked before "SOAPAction". You may use both the "dispatch_to()" and "dispatch_with()" methods in the same server, but note that "dispatch_with()" has a higher order of precedence. "dispatch_to()" will be checked only after "URI" and "SOAPAction" has been checked. See also: EXAMPLE APACHE::REGISTRY USAGE, "SECURITY" COMPRESSION "SOAP::Lite" provides you option to enable transparent compression over the wire. Compression can be enabled by specifying a threshold value (in the form of kilobytes) for compression on both the client and server sides: *Note: Compression currently only works for HTTP based servers and clients.* Client Code print SOAP::Lite ->uri('http://localhost/My/Parameters') ->proxy('http://localhost/', options => {compress_threshold => 10000}) ->echo(1 x 10000) ->result; Server Code my $server = SOAP::Transport::HTTP::CGI ->dispatch_to('My::Parameters') ->options({compress_threshold => 10000}) ->handle; For more information see COMPRESSION in HTTP::Transport. SECURITY For security reasons, the exisiting path for Perl modules (@INC) will be disabled once you have chosen dynamic deployment and specified your own "PATH/". If you wish to access other modules in your included package you have several options: 1 Switch to static linking: use MODULE; $server->dispatch_to('MODULE'); Which can also be useful when you want to import something specific from the deployed modules: use MODULE qw(import_list); 2 Change "use" to "require". The path is only unavailable during the initialization phase. It is available once more during execution. Therefore, if you utilize "require" somewhere in your package, it will work. 3 Wrap "use" in an "eval" block: eval 'use MODULE qw(import_list)'; die if $@; 4 Set your include path in your package and then specify "use". Don't forget to put @INC in a "BEGIN{}" block or it won't work. For example, BEGIN { @INC = qw(my_directory); use MODULE } INTEROPERABILITY Microsoft .NET client with SOAP::Lite Server In order to use a .NET client with a SOAP::Lite server, be sure you use fully qualified names for your return values. For example: return SOAP::Data->name('myname') ->type('string') ->uri($MY_NAMESPACE) ->value($output); In addition see comment about default incoding in .NET Web Services below. SOAP::Lite client with a .NET server If experiencing problems when using a SOAP::Lite client to call a .NET Web service, it is recommended you check, or adhere to all of the following recommendations: Declare a proper soapAction in your call For example, use "on_action( sub { 'http://www.myuri.com/WebService.aspx#someMethod'; } )". Disable charset definition in Content-type header Some users have said that Microsoft .NET prefers the value of the Content-type header to be a mimetype exclusively, but SOAP::Lite specifies a character set in addition to the mimetype. This results in an error similar to: Server found request content type to be 'text/xml; charset=utf-8', but expected 'text/xml' To turn off this behavior specify use the following code: use SOAP::Lite; $SOAP::Constants::DO_NOT_USE_CHARSET = 1; # The rest of your code Use fully qualified name for method parameters For example, the following code is preferred: SOAP::Data->name(Query => 'biztalk') ->uri('http://tempuri.org/') As opposed to: SOAP::Data->name('Query' => 'biztalk') Place method in default namespace For example, the following code is preferred: my $method = SOAP::Data->name('add') ->attr({xmlns => 'http://tempuri.org/'}); my @rc = $soap->call($method => @parms)->result; As opposed to: my @rc = $soap->call(add => @parms)->result; # -- OR -- my @rc = $soap->add(@parms)->result; Disable use of explicit namespace prefixes Some user's have reported that .NET will simply not parse messages that use namespace prefixes on anything but SOAP elements themselves. For example, the following XML would not be parsed: SOAP::Lite allows users to disable the use of explicit namespaces through the "use_prefix()" method. For example, the following code: $som = SOAP::Lite->uri('urn:MyURI') ->proxy($HOST) ->use_prefix(0) ->myMethod(); Will result in the following XML, which is more pallatable by .NET: Modify your .NET server, if possible Stefan Pharies : SOAP::Lite uses the SOAP encoding (section 5 of the soap 1.1 spec), and the default for .NET Web Services is to use a literal encoding. So elements in the request are unqualified, but your service expects them to be qualified. .Net Web Services has a way for you to change the expected message format, which should allow you to get your interop working. At the top of your class in the asmx, add this attribute (for Beta 1): [SoapService(Style=SoapServiceStyle.RPC)] Another source said it might be this attribute (for Beta 2): [SoapRpcService] Full Web Service text may look like: <%@ WebService Language="C#" Class="Test" %> using System; using System.Web.Services; using System.Xml.Serialization; [SoapService(Style=SoapServiceStyle.RPC)] public class Test : WebService { [WebMethod] public int add(int a, int b) { return a + b; } } Another example from Kirill Gavrylyuk : "You can insert [SoapRpcService()] attribute either on your class or on operation level". <%@ WebService Language=CS class="DataType.StringTest"%> namespace DataType { using System; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Services.Description; [SoapRpcService()] public class StringTest: WebService { [WebMethod] [SoapRpcMethod()] public string RetString(string x) { return(x); } } } Example from Yann Christensen : using System; using System.Web.Services; using System.Web.Services.Protocols; namespace Currency { [WebService(Namespace="http://www.yourdomain.com/example")] [SoapRpcService] public class Exchange { [WebMethod] public double getRate(String country, String country2) { return 122.69; } } } Special thanks goes to the following people for providing the above description and details on .NET interoperability issues: Petr Janata , Stefan Pharies , Brian Jepson , and others TROUBLESHOOTING SOAP::Lite serializes "18373" as an integer, but I want it to be a string! SOAP::Lite guesses datatypes from the content provided, using a set of common-sense rules. These rules are not 100% reliable, though they fit for most data. You may force the type by passing a SOAP::Data object with a type specified: my $proxy = SOAP::Lite->proxy('http://www.example.org/soapservice'); my $som = $proxy->myMethod( SOAP::Data->name('foo')->value(12345)->type('string') ); You may also change the precedence of the type-guessing rules. Note that this means fiddling with SOAP::Lite's internals - this may not work as expected in future versions. The example above forces everything to be encoded as string (this is because the string test is normally last and allways returns true): my @list = qw(-1 45 foo bar 3838); my $proxy = SOAP::Lite->uri($uri)->proxy($proxyUrl); my $lookup = $proxy->serializer->typelookup; $lookup->{string}->[0] = 0; $proxy->serializer->typelookup($lookup); $proxy->myMethod(\@list); See SOAP::Serializer for more details. "+autodispatch" doesn't work in Perl 5.8 There is a bug in Perl 5.8's "UNIVERSAL::AUTOLOAD" functionality that prevents the "+autodispatch" functionality from working properly. The workaround is to use "dispatch_from" instead. Where you might normally do something like this: use Some::Module; use SOAP::Lite +autodispatch => uri => 'urn:Foo' proxy => 'http://...'; You would do something like this: use SOAP::Lite dispatch_from(Some::Module) => uri => 'urn:Foo' proxy => 'http://...'; Problems using SOAP::Lite's COM Interface Can't call method "server" on undefined value You probably did not register Lite.dll using "regsvr32 Lite.dll" Failed to load PerlCtrl Runtime It is likely that you have install Perl in two different locations and the location of ActiveState's Perl is not the first instance of Perl specified in your PATH. To rectify, rename the directory in which the non-ActiveState Perl is installed, or be sure the path to ActiveState's Perl is specified prior to any other instance of Perl in your PATH. Dynamic libraries are not found If you are using the Apache web server, and you are seeing something like the following in your webserver log file: Can't load '/usr/local/lib/perl5/site_perl/.../XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: dynamic linker: /usr/local/bin/perl: libexpat.so.0 is NEEDED, but object does not exist at /usr/local/lib/perl5/.../DynaLoader.pm line 200. Then try placing the following into your httpd.conf file and see if it fixes your problem. PassEnv LD_LIBRARY_PATH SOAP client reports "500 unexpected EOF before status line seen See "Apache is crashing with segfaults" Apache is crashing with segfaults Using "SOAP::Lite" (or XML::Parser::Expat) in combination with mod_perl causes random segmentation faults in httpd processes. To fix, try configuring Apache with the following: RULE_EXPAT=no If you are using Apache 1.3.20 and later, try configuring Apache with the following option: ./configure --disable-rule=EXPAT See http://archive.covalent.net/modperl/2000/04/0185.xml for more details and lot of thanks to Robert Barta for explaining this weird behavior. If this doesn't address the problem, you may wish to try "-Uusemymalloc", or a similar option in order to instruct Perl to use the system's own "malloc". Thanks to Tim Bunce . CGI scripts do not work under Microsoft Internet Information Server (IIS) CGI scripts may not work under IIS unless scripts use the ".pl" extension, opposed to ".cgi". Java SAX parser unable to parse message composed by SOAP::Lite In some cases SOAP messages created by "SOAP::Lite" may not be parsed properly by a SAX2/Java XML parser. This is due to a known bug in "org.xml.sax.helpers.ParserAdapter". This bug manifests itself when an attribute in an XML element occurs prior to the XML namespace declaration on which it depends. However, according to the XML specification, the order of these attributes is not significant. http://www.megginson.com/SAX/index.html Thanks to Steve Alpert (Steve_Alpert@idx.com) for pointing on it. PERFORMANCE Processing of XML encoded fragments "SOAP::Lite" is based on XML::Parser which is basically wrapper around James Clark's expat parser. Expat's behavior for parsing XML encoded string can affect processing messages that have lot of encoded entities, like XML fragments, encoded as strings. Providing low-level details, parser will call char() callback for every portion of processed stream, but individually for every processed entity or newline. It can lead to lot of calls and additional memory manager expenses even for small messages. By contrast, XML messages which are encoded as base64Binary, don't have this problem and difference in processing time can be significant. For XML encoded string that has about 20 lines and 30 tags, number of call could be about 100 instead of one for the same string encoded as base64Binary. Since it is parser's feature there is NO fix for this behavior (let me know if you find one), especially because you need to parse message you already got (and you cannot control content of this message), however, if your are in charge for both ends of processing you can switch encoding to base64 on sender's side. It will definitely work with SOAP::Lite and it may work with other toolkits/implementations also, but obviously I cannot guarantee that. If you want to encode specific string as base64, just do "SOAP::Data->type(base64 => $string)" either on client or on server side. If you want change behavior for specific instance of SOAP::Lite, you may subclass "SOAP::Serializer", override "as_string()" method that is responsible for string encoding (take a look into "as_base64Binary()") and specify new serializer class for your SOAP::Lite object with: my $soap = new SOAP::Lite serializer => My::Serializer->new, ..... other parameters or on server side: my $server = new SOAP::Transport::HTTP::Daemon # or any other server serializer => My::Serializer->new, ..... other parameters If you want to change this behavior for all instances of SOAP::Lite, just substitute "as_string()" method with "as_base64Binary()" somewhere in your code after "use SOAP::Lite" and before actual processing/sending: *SOAP::Serializer::as_string = \&SOAP::XMLSchema2001::Serializer::as_base64Binary; Be warned that last two methods will affect all strings and convert them into base64 encoded. It doesn't make any difference for SOAP::Lite, but it may make a difference for other toolkits. BUGS AND LIMITATIONS * No support for multidimensional, partially transmitted and sparse arrays (however arrays of arrays are supported, as well as any other data structures, and you can add your own implementation with SOAP::Data). * Limited support for WSDL schema. * XML::Parser::Lite relies on Unicode support in Perl and doesn't do entity decoding. * Limited support for mustUnderstand and Actor attributes. PLATFORM SPECIFICS MacOS Information about XML::Parser for MacPerl could be found here: http://bumppo.net/lists/macperl-modules/1999/07/msg00047.html Compiled XML::Parser for MacOS could be found here: http://www.perl.com/CPAN-local/authors/id/A/AS/ASANDSTRM/XML-Parser- 2.27-bin-1-MacOS.tgz RELATED MODULES Transport Modules SOAP::Lite allows one to add support for additional transport protocols, or server handlers, via separate modules implementing the SOAP::Transport::* interface. The following modules are available from CPAN: * SOAP-Transport-HTTP-Nginx SOAP::Transport::HTTP::Nginx provides a transport module for nginx () AVAILABILITY You can download the latest version SOAP::Lite for Unix or SOAP::Lite for Win32 from the following sources: * CPAN: http://search.cpan.org/search?dist=SOAP-Lite You are welcome to send e-mail to the maintainers of SOAP::Lite with your comments, suggestions, bug reports and complaints. ACKNOWLEDGEMENTS Special thanks to Randy J. Ray, author of *Programming Web Services with Perl*, who has contributed greatly to the documentation effort of SOAP::Lite. Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute the SOAP::Lite reference manual found in Appendix B of *Programming Web Services with Perl*. And special gratitude to all the developers who have contributed patches, ideas, time, energy, and help in a million different forms to the development of this software. HACKING Latest development takes place on GitHub.com. Come on by and fork it. git@github.com:redhotpenguin/soaplite.git Also see the HACKING file. Actively recruiting maintainers for this module. Come and get it on! REPORTING BUGS Please use rt.cpan.org or github to report bugs. Pull requests are preferred. COPYRIGHT Copyright (C) 2000-2007 Paul Kulchenko. All rights reserved. Copyright (C) 2007-2008 Martin Kutter Copyright (C) 2013 Fred Moyer LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This text and all associated documentation for this library is made available under the Creative Commons Attribution-NoDerivs 2.0 license. http://creativecommons.org/licenses/by-nd/2.0/ AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) Martin Kutter (martin.kutter@fen-net.de) Fred Moyer (fred@redhotpenguin.com) SOAP-Lite-1.19/ReleaseNotes.txt000644 000770 000024 00000004502 12567356463 016516 0ustar00phredstaff000000 000000 # # ReleaseNotes.txt # The following is a compilation of various issues developers should be aware of when developing Web services using SOAP::Lite. LIMITED WSDL SUPPORT - SOAP::Lite is not capable of generating WSDLs automatically. If you require a WSDL for a service written using SOAP::Lite, please consider using a tool like XML Spy, or CapeClear's WSDL Editor. NO ENTITY DECODING SOAP::Lite uses XML::Parser::Lite which relies on Unicode support in Perl and doesn't perform XML ENTITY decoding. LIMITED SUPPORT FOR MUSTUNDERSTAND and ACTOR ATTRIBUTES SOAP::Lite does not currently heed the soap:mustUnderstand XML attribute, or SOAP actor attributes. DOCUMENT-LITERAL SUPPORT All literal encoding support for SOAP::Lite is marked EXPERIMENTAL, and it is incomplete. Developers are encouraged to use this capability but should be fore-warned. As an alternative, SOAP::WSDL or XML::Compiled::SOAP may be used for document/literal bindings derived from WSDL definitions. CLIENT SIDE WSDL SUPPORT SOAP::Lites ability to consume a WSDL and generate the necessary message based on that WSDL is improving, but it does not work with complex types. As an alternative, SOAP::WSDL or XML::Compiled::SOAP may be used for document/literal bindings derived from WSDL definitions. SERVICE SIDE WSDL SUPPORT Perl is a loosely typed language making it extraordinarily difficult to generate a reliable WSDL based upon reflection of somekind. Therefore, no WSDL can be generated using SOAP::Lite. SOAP FAULT NOT GETTING SERIALIZED PROPERLY A user reported that when a service run under Perl version 5.5003 issues the die command with a SOAP::Fault as input, that SOAP::Lite does not properly serialize the Fault object. However, the same code works under 5.6 and above. NULL BODIES SOAP::Lite currently allows users to construct an Envelope using a null body, e.g. . However, SOAP::Lite services have no way of processing such a message. XML NAMESPACES ABSENT FROM RESPONSES A user reported that under mod_perl for a series of requests which were using SOAP 1.1 and 1.2, that some of the responses to incoming messages lacked the XSD and XSI namespace declarations causing an error with the receiving .NET client for those response lacking these attributes. OBJECTS BY REFERENCE SOAP::Server->objects_by_reference is marked EXPERIMENTAL SOAP-Lite-1.19/t/000755 000770 000024 00000000000 12567356463 013626 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/01-core.t000644 000770 000024 00000030574 12567356463 015172 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; BEGIN { plan tests => 42; } use SOAP::Lite; my($a, $s, $r, $serialized, $deserialized); { # check 'use ...' print "'use SOAP::Lite ...' test(s)...\n"; eval 'use SOAP::Lite 99.99'; # hm, definitely should fail ok(scalar $@ =~ /99.+required/); } # These tests are for backwards compatibility { # check use of use_prefix and uri together # test 2 - turn OFF default namespace $SIG{__WARN__} = sub { ; }; # turn off deprecation warnings $serialized = SOAP::Serializer->use_prefix(1)->uri("urn:Test")->method( 'testMethod', SOAP::Data->name(test => 123) ); ok($serialized =~ m!123!); # test 3 - turn ON default namespace $serialized = SOAP::Serializer->use_prefix(0)->uri("urn:Test")->method( 'testMethod', SOAP::Data->name(test => 123) ); ok($serialized =~ m!123!); } { # check use of default_ns, ns, and use_prefix # test 4 $serialized = SOAP::Serializer->ns("urn:Test")->method( 'testMethod', SOAP::Data->name(test => 123) ); ok($serialized =~ m!123!); # test 5 $serialized = SOAP::Serializer->ns("urn:Test","testns")->method( 'testMethod', SOAP::Data->name(test => 123) ); ok($serialized =~ m!123!); # test 6 $serialized = SOAP::Serializer->default_ns("urn:Test")->method( 'testMethod', SOAP::Data->name(test => 123) ); ok($serialized =~ m!123!); } { # check serialization print "Arrays, structs, refs serialization test(s)...\n"; $serialized = SOAP::Serializer->serialize( SOAP::Data->name(test => \SOAP::Data->value(1, [1,2], {a=>3}, \4)) ); ok($serialized =~ m!11234!); } { # check simple circular references print "Simple circular references (\$a=\\\$a) serialization test(s)...\n"; $a = \$a; $serialized = SOAP::Serializer->namespaces({})->serialize($a); ok($serialized =~ m!!); $a = SOAP::Deserializer->deserialize($serialized)->root; ok(0+$a == 0+(values%$a)[0]); } { # check complex circular references print "Complex circlular references serialization test(s)...\n"; $a = SOAP::Deserializer->deserialize(<<'EOX')->root; 1 7 8 EOX ok($a->{a}->{next}->{next}->{next}->{next}->{x} == $a->{a}->{next}->{x}); $a = { a => 1 }; my $b = { b => $a }; $a->{a} = $b; $serialized = SOAP::Serializer->autotype(0)->namespaces({})->serialize($a); ok($serialized =~ m!!); } { # check multirefs print "Multireferences serialization test(s)...\n"; $a = 1; my $b = \$a; $serialized = SOAP::Serializer->new(multirefinplace=>1)->serialize( SOAP::Data->name(test => \SOAP::Data->value($b, $b)) ); ok($serialized =~ m!1!); $serialized = SOAP::Serializer->namespaces({})->serialize( SOAP::Data->name(test => \SOAP::Data->value($b, $b)) ); print $serialized, "\n"; ok($serialized =~ m!1!); } { # check base64, XML encoding of elements and attributes print "base64, XML encoding of elements and attributes test(s)...\n"; $serialized = SOAP::Serializer->serialize( SOAP::Data->name(test => \SOAP::Data->value("\0\1\2\3 \4\5\6", "<123>&\015")) ); ok($serialized =~ m!AAECAyAgIAQFBg==<123>&amp; </123>!); $serialized = SOAP::Serializer->namespaces({})->serialize( SOAP::Data->name(name=>'value')->attr({attr => '<123>"&"'}) ); ok($serialized =~ m!^<\?xml version="1.0" encoding="UTF-8"\?>value$!); } { # check objects and SOAP::Data print "Blessed references and SOAP::Data encoding test(s)...\n"; $serialized = SOAP::Serializer->serialize(SOAP::Data->uri('some_urn' => bless {a => 1} => 'ObjectType')); ok($serialized =~ m!1!); } { # check serialization/deserialization of simple types print "Serialization/deserialization of simple types test(s)...\n"; $a = 'abc234xyz'; $serialized = SOAP::Serializer->serialize(SOAP::Data->type(hex => $a)); ok($serialized =~ m!61626332333478797A!); ok(SOAP::Deserializer->deserialize($serialized)->root eq $a); $a = <<"EOBASE64"; qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?`1234567890-=\~!@#$%^&*()_+| EOBASE64 $serialized = SOAP::Serializer->serialize($a); ok(index($serialized, quotemeta(q!qwertyuiop[]asdfghjkl;'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?`1234567890-=~\!@#0^&*()_+|!))); if (UNIVERSAL::isa(SOAP::Deserializer->parser->parser => 'XML::Parser::Lite')) { skip(q!Entity decoding is not supported in XML::Parser::Lite! => undef); } else { ok(SOAP::Deserializer->deserialize($serialized)->root eq $a); } $a = <<"EOBASE64"; qwertyuiop[]asdfghjkl;'zxcvbnm,./ QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>? \x00 EOBASE64 $serialized = SOAP::Serializer->serialize($a); ok($serialized =~ /base64/); } { # check serialization/deserialization of blessed reference print "Serialization/deserialization of blessed reference test(s)...\n"; $serialized = SOAP::Serializer->serialize(bless {a => 1} => 'SOAP::Lite'); $a = SOAP::Deserializer->deserialize($serialized)->root; ok(ref $a eq 'SOAP::Lite' && UNIVERSAL::isa($a => 'HASH')); $a = SOAP::Deserializer->deserialize( SOAP::Serializer->serialize(bless [a => 1] => 'SOAP::Lite') )->root; ok(ref $a eq 'SOAP::Lite' && UNIVERSAL::isa($a => 'ARRAY')); } { # check serialization/deserialization of undef/empty elements print "Serialization/deserialization of undef/empty elements test(s)...\n"; { local $^W; # suppress warnings $a = undef; $serialized = SOAP::Serializer->serialize( SOAP::Data->type(negativeInteger => $a) ); ok(! defined SOAP::Deserializer->deserialize($serialized)->root); my $type = 'nonstandardtype'; eval { $serialized = SOAP::Serializer->serialize( SOAP::Data->type($type => $a) ); }; ok($@ =~ /for type '$type' is not specified/); $serialized = SOAP::Serializer->serialize( SOAP::Data->type($type => {}) ); ok(ref SOAP::Deserializer->deserialize($serialized)->root eq $type); } } { print "Check for unspecified Transport module test(s)...\n"; eval { SOAP::Lite->new->abc() }; ok($@ =~ /A service address has not been specified/); } { print "Deserialization of CDATA test(s)...\n"; UNIVERSAL::isa(SOAP::Deserializer->parser->parser => 'XML::Parser::Lite') ? skip(q!CDATA decoding is not supported in XML::Parser::Lite! => undef) : ok(SOAP::Deserializer->deserialize(']]>')->root eq '<123>'); } { print "Test of XML::Parser External Entity vulnerability...\n"; UNIVERSAL::isa(SOAP::Deserializer->parser->parser => 'XML::Parser::Lite') ? skip(q!External entity references are not supported in XML::Parser::Lite! => undef) : ok(!eval { SOAP::Deserializer->deserialize(' ]>')->root } and $@ =~ /^External entity/); } { print "Test SOAP:: prefix with no +autodispatch option...\n"; eval { A->SOAP::b }; ok($@ =~ /^SOAP:: prefix/); } { # check deserialization of an array of multiple elements # nested within a complex type print "Deserialization of document/literal arrays nested in complex types...\n"; my $input = '100onetwo'; my $deserializer = SOAP::Deserializer->new; my $ret = $deserializer->deserialize($input); my @arr = @{$ret->result->{'complexFoo'}{'arrayFoo'}}; ok($#arr == 1); ok("one" eq $arr[0]); ok("two" eq $arr[1]); ok(100 == $ret->result->{"id"}); # If only one araryFoo tag is found, it's deserialized as a scalar. $input = '100one'; $ret = $deserializer->deserialize($input); ok("one" eq $ret->result->{'complexFoo'}{'arrayFoo'}); } { print "Serialization of document/literal arrays\n"; # check array serialization with autotyping disabled my $serializer = SOAP::Serializer->new; $serializer->autotype(0); my $hash = { "scalar" => 1, "array" => [ 2, 3], "hash" => { "scalar" => 4, "array" => [ 5, 6], } }; my $xml = $serializer->serialize($hash); ok($xml =~ m{ ]*> (:? (:? 56 |4 ){2} | 23 | 1 ){3} }xms ); # deserialize it and check that a similar object is created my $deserializer = SOAP::Deserializer->new; my $obj = $deserializer->deserialize($xml)->root; ok(1, $obj->{"scalar"}); my @arr= @{$obj->{"array"}}; ok(2, $arr[0]); ok(3, $arr[1]); ok(4, $obj->{"hash"}{"scalar"}); @arr = @{$obj->{"hash"}{"array"}}; ok(5, $arr[0]); ok(6, $arr[1]); } SOAP-Lite-1.19/t/010-serializer.t000644 000770 000024 00000010261 12567356463 016462 0ustar00phredstaff000000 000000 use strict; use warnings; use Test; use SOAP::Lite; my @types1999 = qw( anyURI string float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language ); my @types2001 = qw( anyType anyURI string float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration anyURI language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time dateTime ); # types * 3 + extra tests + autotype tests plan tests => 225; test_serializer('SOAP::XMLSchema1999::Serializer', @types1999); test_serializer('SOAP::XMLSchema2001::Serializer', @types2001); sub test_serializer { my $package = shift; my @types = @_; print "# $package\n"; for my $type (@types) { my $method = "as_$type"; print "# $method\n"; use Data::Dumper; my $result = $package->$method('', 'test', $type , {}); ok $result->[0] eq 'test'; ok $result->[1]->{ 'xsi:type' }; ok $result->[2] eq ''; } } # additional tests ok (SOAP::XMLSchema1999::Serializer->anyTypeValue eq 'ur-type'); my $enc = SOAP::XMLSchema1999::Serializer->as_hex('AA', 'test', 'hex', {}); ok $enc->[2] eq '4141'; $enc = SOAP::XMLSchema1999::Serializer->as_dateTime('AA', 'test', 'FOO', {}); ok $enc->[1]->{'xsi:type'} eq 'xsd:dateTime'; ok $enc->[2] eq 'AA'; $enc = SOAP::XMLSchema1999::Serializer->as_boolean(1, 'test', 'boolean', {}); ok $enc->[2] eq 'true'; $enc = SOAP::XMLSchema1999::Serializer->as_boolean(0, 'test', 'boolean', {}); ok $enc->[2] eq 'false'; $enc = SOAP::XMLSchema1999::Serializer->as_undef(1, 'test', 'boolean', {}); ok $enc eq '1'; $enc = SOAP::XMLSchema1999::Serializer->as_undef(0, 'test', 'boolean', {}); ok $enc eq '0'; $enc = SOAP::XMLSchema1999::Serializer->as_base64(0, 'test', 'string', {}); ok ($enc->[2] eq 'MA=='); print "# encoding/decoding Euro symbol in base64\n"; if ($] < 5.008) { print "# Skippng unicode test on perl <5.8 ($])\n"; ok(1); ok(1); } else { eval { # may fail on old perls my $str = chr(8364); utf8::encode($str); my $enc = SOAP::XMLSchema1999::Serializer->as_base64($str, 'test', 'string', {}); my $enc2001 = SOAP::XMLSchema2001::Serializer->as_base64Binary($str, 'test', 'string', {}); use MIME::Base64; for ($enc, $enc2001) { if ( decode_base64($_->[2]) eq $str ) { ok(1); } else { print "$str, ", decode_base64($enc->[2]), "\n"; ok(0); } } } } eval { SOAP::XMLSchema1999::Serializer->as_string([], 'test', 'string', {}) }; ok $@ =~m{ \A String \s value \s expected }xms; eval { SOAP::XMLSchema1999::Serializer->as_anyURI([], 'test', 'string', {}) }; ok $@ =~m{ \A String \s value \s expected }xms; ok ! SOAP::XMLSchema1999::Serializer->DESTROY(); my $serializer = SOAP::Serializer->new(); my $fault_envelope = $serializer->envelope( fault => 'Code', 'string', 'Detail', 'Actor' ); # Test fault serialization order ok $fault_envelope =~m{ .+(faultcode).+(faultstring).+(faultactor).+(detail)}x; $serializer = SOAP::Serializer->new(); print "# autotype tests\n"; $serializer->autotype(1); my %type_of = ( 'true' => 'xsd:boolean', 'false' => 'xsd:boolean', 'rtue' => 'xsd:string', 'aflse' => 'xsd:string', '012345' => 'xsd:string', 'Hello World' => 'xsd:string', 'http://example.org' => 'xsd:anyURI', '12345' => 'xsd:int', '-2147483648' => 'xsd:int', '2147483647' => 'xsd:int', '2147483648' => 'xsd:long', '5999927619709920' => 'xsd:long', 'P' => 'xsd:string', 'PT' => 'xsd:string', 'PT01S' => 'xsd:duration', ); while (my ($value, $type) = each %type_of) { my $result = $serializer->encode_scalar($value, 'test', undef, {}); print "# $value => $type (result: $result->[1]->{'xsi:type'})\n"; ok ( $result->[1]->{'xsi:type'} eq $type ); } SOAP-Lite-1.19/t/012-cloneable.t000644 000770 000024 00000000351 12567356463 016236 0ustar00phredstaff000000 000000 use strict; use warnings; use Test; use SOAP::Lite; plan tests => 2; my $soap = SOAP::Lite->new( readable => 1, outputxml => 1, ); my $clone = $soap->clone(); ok ($clone->readable() == 1); ok ($clone->outputxml() == 1); SOAP-Lite-1.19/t/013-array-deserialization.t000644 000770 000024 00000004116 12567356463 020620 0ustar00phredstaff000000 000000 #!/usr/bin/perl use strict; use Test; plan tests => 5; local $/ = undef; my $xml = ; use SOAP::Lite; my $som = SOAP::Deserializer->new->deserialize($xml); my $result = $som->result(); ok (@$result == 2); ok $result->[0]->isa('outer'); ok $result->[1]->isa('outer'); ok $result->[1]->{ kids }->[0]->isa('inner'); ok $result->[1]->{ kids }->[1]->isa('inner'); __DATA__ a aa ab b ba bb SOAP-Lite-1.19/t/014_UNIVERSAL_use.t000644 000770 000024 00000000376 12567356463 016631 0ustar00phredstaff000000 000000 use Test; use SOAP::Lite; plan tests => 1; eval "use UNIVERSAL::require" or do { print "# Test should always without UNIVERSAL::use installed\n"; }; my $obj = SOAP::Custom::XML::Data->new(); eval { $obj->use('SOAP-encoded') }; ok !$@; SOAP-Lite-1.19/t/015_UNIVERSAL_can.t000644 000770 000024 00000001417 12567356463 016574 0ustar00phredstaff000000 000000 #!/usr/bin/perl -w use Test; BEGIN { if ($] < 5.008001) { print "# +autodispatch broken in 5.8.0\n"; plan tests => 0; exit 0; } } package foo; sub new { my $class = shift; my $self = {count => 0,}; bless $self, $class; } sub bar { my $self = shift; ++$self->{count}; } sub proxy { my $self = shift; my $meth = shift; if ($self->can($meth)) { return $self->$meth; } else { return; } } # This code works if it's a regular class package main; use Test; plan tests => 3; my $f = new foo(); use SOAP::Lite +autodispatch => uri => 'http://example.org/foo', proxy => 'http://example.org.cgi'; ok $f->bar() == 1; if ($f->can("bar")) { ok $f->bar == 2; } if ($f->can("proxy")) { ok $f->proxy("bar") == 3; } SOAP-Lite-1.19/t/02-payload.t000644 000770 000024 00000100303 12567356463 015660 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; BEGIN { plan tests => 133; } use SOAP::Lite; $SIG{__WARN__} = sub { ; }; # turn off deprecation warnings my($a, $s, $r, $serialized, $deserialized); { # check root, mustUnderstand print "root and mustUnderstand attributes with SOAP::Data test(s)...\n"; $serialized = SOAP::Serializer->serialize(SOAP::Data->root(1 => 1)->name('rootandunderstand')->mustUnderstand(1)); ok($serialized =~ m!1!); } { # check deserialization of envelope with result print "Deserialization of envelope with result test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' 20 40 60 100 200 '); ok($deserialized->result->[2] == 60); ok((my @array = $deserialized->paramsall) == 1); ok(ref $deserialized->body eq 'HASH'); # not blessed anymore since 0.51 } { # check deserialization of envelope with fault print "Deserialization of envelope with fault test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' soap:ClientApplication ErrorInvalid Password '); ok($deserialized->faultcode eq 'soap:Client'); ok($deserialized->faultstring eq 'Application Error'); ok($deserialized->faultdetail eq 'Invalid Password'); } { # check deserialization of circular references print "Deserialization of circular references test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' '); ok(ref $deserialized->valueof('/Struct') eq ref $deserialized->valueof('//b')); ok($deserialized->dataof('/Struct')->attr->{'{aaa}id'} == 123); ok(exists $deserialized->dataof('/Struct')->attr->{'id'}); } { # check SOAP::SOM print "SOM test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' 20 40 60 100 200 200 200 200 400 450 600 '); # should return STRING '/Envelope/Body/[1]/[1]' my $result = SOAP::SOM::result; ok($deserialized->valueof("$result/[1]") == 20); ok($deserialized->valueof("$result/[3]") == 60); ok($deserialized->valueof("$result/[5]") == 200); ok($deserialized->valueof("$result/[9]") == 400); # Test more than 9 items to check depth is okay - RT78692 ok($deserialized->valueof("$result/[11]") == 600); # match should return true/false in boolean context (and object ref otherwise) ok($deserialized->match('aaa') ? 0 : 1); # should return same string as above ok($deserialized->match(SOAP::SOM->result)); ok($deserialized->valueof('[1]') == 20); ok($deserialized->valueof('[3]') == 60); ok($deserialized->valueof('[5]') == 200); $deserialized->match('//Body/[1]/[1]'); # match path and change current node on success ok($deserialized->valueof('[1]') == 20); ok($deserialized->valueof('[3]') == 60); ok($deserialized->valueof('[5]') == 200); } { # check output parameters print "Output parameters test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' name1 name2 name3 '); my @paramsout = $deserialized->paramsout; ok($paramsout[0] eq 'name2' && $paramsout[1] eq 'name3'); } { # check nonqualified namespace print "Nonqualified namespace test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' 20 40 60 100 200 '); ok($deserialized->namespaceuriof(SOAP::SOM::method) eq 'http://simon.fell.com/calc'); ok($deserialized->namespaceuriof('//doublerResponse') eq 'http://simon.fell.com/calc'); } { # check for Array of Array serialization print "Array of Array serialization test(s)...\n"; $serialized = SOAP::Serializer ->readable(1) ->method('mymethod' => [[1, 2], [3, 4]]); ok($serialized =~ m!soapenc:arrayType="soapenc:Array\[2\]"!); } { # check for serialization with SOAPStruct print "Serialization w/out SOAPStruct test(s)...\n"; $a = { a => 1 }; $serialized = SOAP::Serializer->namespaces({})->serialize($a); ok($serialized =~ m!1!); } { # check header/envelope serialization/deserialization print "Header/Envelope serialization/deserialization test(s)...\n"; $serialized = SOAP::Serializer->method( # same as ->envelope(method => 'mymethod', 1, 2, 3, SOAP::Header->name(t1 => 5)->mustUnderstand(1)->uri('http://namespaces.soaplite.com/headers'), SOAP::Header->name(t2 => 7)->mustUnderstand(2), ); $deserialized = SOAP::Deserializer->deserialize($serialized); my $t1 = $deserialized->match(SOAP::SOM::header)->headerof('t1'); my $t2 = $deserialized->dataof('t2'); my $t3 = eval { $deserialized->headerof(SOAP::SOM::header . '/{http://namespaces.soaplite.com/headers}t3'); }; ok(!$@ && !defined $t3); my @paramsin = $deserialized->paramsin; my @paramsall = $deserialized->paramsall; ok($t2->type =~ /^int$/); ok($t2->mustUnderstand == 1); ok(@paramsin == 3); ok(@paramsall == 3); eval { $deserialized->result(1) }; ok($@ =~ /Method 'result' is readonly/); $serialized = SOAP::Serializer->method( # same as ->envelope(method => SOAP::Data->name('mymethod')->attr({something => 'value'}), 1, 2, 3, ); ok($serialized =~ //); $serialized = SOAP::Serializer -> envprefix('') -> method('mymethod'); ok($serialized =~ m!!); $deserialized = SOAP::Deserializer->deserialize('1'); ok(! defined $deserialized->namespaceuriof('//getStateName')); $deserialized = SOAP::Deserializer->deserialize('1'); ok($deserialized->namespaceuriof('//getStateName') eq 'a'); } { # Map type serialization/deserialization print "Map type serialization/deserialization test(s)...\n"; my $key = "\0\1"; $serialized = SOAP::Serializer->method(aa => SOAP::Data->type(map => {a => 123, $key => 456})->name('maaap')); { local $^W; # disable warning on implicit map encoding my $implicit = SOAP::Serializer->method(aa => SOAP::Data->name(maaap => {a => 123, $key => 456})); ok($implicit eq $serialized); } ok($serialized =~ /apachens:Map/); ok($serialized =~ m!xmlns:apachens="http://xml.apache.org/xml-soap"!); $deserialized = SOAP::Deserializer->deserialize($serialized); $a = $deserialized->valueof('//maaap'); ok(UNIVERSAL::isa($a => 'HASH')); ok(ref $a && $a->{$key} == 456); } { # Stringified type serialization print "Stringified type serialization test(s)...\n"; $serialized = SOAP::Serializer->serialize(bless { a => 1, _current => [] } => 'SOAP::SOM'); my $test = $serialized; ok $test =~s{ <\?xml \s version="1.0" \s encoding="UTF-8"\?> }{}xms; ok $test =~s{ \z }{}xms; ok $test =~s{ 1 }{}xms; ok $test =~s{ <_current (:? \s soapenc:arrayType="xsd:anyType\[0\]" | \s xsi:type="soapenc:Array" ){2} \s/> }{}xms; ok length $test == 0; # Replaced complex regex by several simpler (see above). # ok($serialized =~ m!1<_current(?: soapenc:arrayType="xsd:anyType\[0\]"| xsi:type="soapenc:Array"){2} />!); # ok( ($serialized =~ m!1<_current(?: soapenc:arrayType="xsd:anyType\[0\]"| xsi:type="soapenc:Array"){2}/>!) # || ($serialized =~ m!<_current(?: soapenc:arrayType="xsd:anyType\[0\]"| xsi:type="soapenc:Array"){2}/>1!)); #print $serialized; # exit; $serialized =~ s/__/./g; # check for SOAP.SOM instead of SOAP__SOM ok(ref SOAP::Deserializer->deserialize($serialized)->root eq 'SOAP::SOM'); } { # Serialization of non-allowed element print "Serialization of non-allowed element test(s)...\n"; eval { $serialized = SOAP::Serializer->serialize(SOAP::Data->name('---' => 'aaa')) }; ok($@ =~ /^Element/); } { # Custom serialization of blessed reference print "Custom serialization of blessed reference test(s)...\n"; eval q! sub SOAP::Serializer::as_My__Own__Class { my $self = shift; my($value, $name, $type, $attr) = @_; return [$name, {%{$attr || {}}, 'xsi:type' => 'xsd:string'}, join ', ', map {"$_ => $value->{$_}"} sort keys %$value]; } 1; ! or die; $serialized = SOAP::Serializer->serialize(bless {a => 1, b => 2} => 'My::Own::Class'); ok($serialized =~ m!a => 1, b => 2!); } { # Multirefs serialization print "Multirefs serialization test(s)...\n"; my $b = { b => 2 }; my $a = { a => $b }; my $c = { c1 => $a, c2 => $a }; $serialized = SOAP::Serializer->autotype(0)->method(a => $c); ok($serialized =~ m!2! || $serialized =~ m!2! || $serialized =~ m!2! || $serialized =~ m!2!); $serialized = SOAP::Serializer->autotype(0)->namespaces({})->serialize($c); ok($serialized =~ m!2! || $serialized =~ m!2! || $serialized =~ m!2! || $serialized =~ m!2!); my $root = SOAP::Deserializer->deserialize($serialized)->root; ok($root->{c1}->{a}->{b} == 2); ok($root->{c2}->{a}->{b} == 2); } { # Serialization of multirefs shared between Header and Body print "Serialization of multirefs shared between Header and Body test(s)...\n"; $a = { b => 2 }; print $serialized = SOAP::Serializer->autotype(0)->method(a => SOAP::Header->value($a), $a); print "\n"; print '2', "\n"; ok($serialized =~ m!2!); } { # Deserialization with typecast print "Deserialization with typecast test(s)...\n"; my $desc = 0; my $typecasts = 0; eval { package MyDeserializer; @MyDeserializer::ISA = 'SOAP::Deserializer'; sub typecast; *typecast = sub { shift; my($value, $name, $attrs, $children, $type) = @_; $desc = "$name @{[scalar @$children]}" if $name eq 'a'; $typecasts++; return; }; 1; } or die; $deserialized = MyDeserializer->deserialize('12'); ok($desc eq 'a 2'); #! fix "if $name eq 'a'", because $name is QName now ('{}a') ok($typecasts == 5); } { # Deserialization with wrong encodingStyle print "Deserialization with wrong encodingStyle test(s)...\n"; eval { $deserialized = SOAP::Deserializer->deserialize( '1') }; ok(!$@ && $deserialized); eval { $deserialized = SOAP::Deserializer->deserialize( '1') }; ok(!$@ && $deserialized); eval { $deserialized = SOAP::Deserializer->deserialize( '1') }; ok(!$@ && $deserialized); eval { $deserialized = SOAP::Deserializer->deserialize( '1') }; ok(!$@ && $deserialized); eval { $deserialized = SOAP::Deserializer->deserialize( '1') }; ok(!$@ && $deserialized); } { # Deserialization with root attribute print "Deserialization with root attribute test(s)...\n"; # root="0", should skip $deserialized = SOAP::Deserializer->deserialize(' 1 2 '); ok($deserialized->result == 2); # root="0", but in wrong namespace $deserialized = SOAP::Deserializer->deserialize(' 1 2 '); ok($deserialized->result == 1); # root="1" $deserialized = SOAP::Deserializer->deserialize(' 1 2 3 4 '); ok($deserialized->result == 1); ok($deserialized->valueof('//{http://www.soaplite.com/2}doublerResponse2/nums') == 2); ok($deserialized->valueof('//{http://www.soaplite.com/3}doublerResponse2/nums') == 3); ok($deserialized->valueof('//{}doublerResponse2/nums') == 4); my @nums = $deserialized->valueof('//doublerResponse2/nums'); ok(@nums == 3); ok($nums[0] == 2 && $nums[1] == 3); my $body = $deserialized->body; ok(ref $body->{doublerResponse1} && ref $body->{doublerResponse2}); } { print "Deserialization with null elements test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' 1 2 5 7 ')->result; ok(scalar @$deserialized == 7); ok(! defined $deserialized->[2]); ok(! defined $deserialized->[3]); ok($deserialized->[5] eq ''); } { print "Serialization of list with undef elements test(s)...\n"; $serialized = SOAP::Serializer->method(a => undef, 1, undef, 2); my(@r) = SOAP::Deserializer->deserialize($serialized)->paramsall; ok(2 == grep {!defined} @r); } { print "Deserialization with xsi:type='string' test(s)...\n"; $a = 'SOAP::Lite'; $deserialized = SOAP::Deserializer->deserialize(qq!$a!)->root; ok($deserialized eq $a); } { print "Deserialization with typing inherited from Array element test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' MTIz MTIz ')->root; ok(scalar @$deserialized == 3); ok($deserialized->[0] eq 'MTIz'); ok($deserialized->[1] eq 123); ok($deserialized->[2] eq ''); } { print "Serialization with explicit typing test(s)...\n"; $serialized = SOAP::Serializer ->method(a => SOAP::Data->name('return')->type(int => 1)); ok($serialized =~ /xsd:int/); eval { $serialized = SOAP::Serializer ->method(a => SOAP::Data->name('return')->type(noint => 1)); }; ok($@ =~ /for type 'noint' is not specified/); } { print "Serialization w/out explicit typing test(s)...\n"; $a = { a => 'false' }; $serialized = SOAP::Serializer->namespaces({})->serialize($a); ### 'false' evaluated as a boolean should still be false after the evaluation. ok($serialized =~ m!false!); $a = { a => 'true' }; $serialized = SOAP::Serializer->namespaces({})->serialize($a); ### 'false' evaluated as a boolean should still be false after the evaluation. ok($serialized =~ m!true!); } { print "Serialization with explicit namespaces test(s)...\n"; $serialized = SOAP::Serializer->serialize(SOAP::Data->name('b' => 1)); ok($serialized =~ m!serialize(SOAP::Data->name('c:b' => 1)); ok($serialized =~ m!serialize(SOAP::Data->name('{a}b' => 1)); ok($serialized =~ m!serialize(SOAP::Data->name('{}b' => 1)); ok($serialized =~ m!1' ], [ undef, '', '1' ], [ undef, 'a', '<(namesp\d+):b xmlns:\1="a">1' ], [ '', undef, '1' ], [ '', '', '1' ], [ '', 'a', '1' ], [ 'c', undef, '1' ], [ 'c', '', '1' ], [ 'c', 'a', '1' ], ); my $serializer = SOAP::Serializer->autotype(0)->namespaces({}); my $deserializer = SOAP::Deserializer->new; my $testnum = 0; foreach (@prefix_uri_tests) { $testnum++; my($prefix, $uri, $test) = @$_; my $res = $serializer->serialize( SOAP::Data->name('b')->prefix($prefix)->uri($uri)->value(1) ); ok($res =~ /$test/); next unless $testnum =~ /^([4569])$/; my $data = $deserializer->deserialize($res)->dataof(SOAP::SOM::root); ok(defined $prefix ? defined $data->prefix && $data->prefix eq $prefix : !defined $data->prefix); ok(defined $uri ? defined $data->uri && $data->uri eq $uri : !defined $data->uri); } } { print "Deserialization for different SOAP versions test(s)...\n"; my $version = SOAP::Lite->soapversion; $a = q! 1 3 5 !; SOAP::Lite->soapversion(1.1); $deserialized = SOAP::Deserializer->deserialize($a); ok(ref $deserialized->result eq 'ARRAY'); SOAP::Lite->soapversion(1.2); $deserialized = SOAP::Deserializer->deserialize($a); ok(ref $deserialized->result eq 'ARRAY'); SOAP::Lite->soapversion($version); } { print "Deserialization of multidimensional array of array test(s)...\n"; $a = q! 123 456 789 101112 !; $deserialized = SOAP::Deserializer->deserialize($a)->result; # [ # [ # ['1', '2', '3'], # ['4', '5', '6'] # ], # [ # ['7', '8', '9'], # ['10', '11', '12'] # ] # ] ok(ref $deserialized eq 'ARRAY'); ok(@$deserialized == 2); ok(@{$deserialized->[0]} == 2); ok(@{$deserialized->[0]->[0]} == 3); ok($deserialized->[0]->[0]->[2] == 3); } { print "Serialization without specified typemapping test(s)...\n"; $serialized = SOAP::Serializer->method(a => bless {a => 1} => 'A'); ok($serialized =~ m!!); ok($serialized =~ m!^<\?xml!); # xml declaration # higly questionably, but that's how it is $serialized = SOAP::Serializer->encoding(undef)->method(a => bless {a => 1} => 'A'); ok($serialized =~ m!!); ok($serialized !~ m!^<\?xml!); # no xml declaration } { print "Deserialization with different XML Schemas on one element test(s)...\n"; my $deserializer = SOAP::Deserializer->new; $deserializer->deserialize(q! Simple Test String !); ok($deserializer->xmlschema eq 'http://www.w3.org/1999/XMLSchema'); $deserializer->deserialize(q! Simple Test String !); ok($deserializer->xmlschema eq 'http://www.w3.org/2001/XMLSchema'); } { print "SOAP::Fault stringification test(s)...\n"; my $f = SOAP::Fault->faultcode('Client.Authenticate') ->faultstring('Bad error'); ok($f eq 'Client.Authenticate: Bad error'); } { print "Memory leaks test(s)...\n"; # also check 36-leaks.t my %calls; { SOAP::Lite->import(trace => [objects => sub { if ((caller(2))[3] =~ /^(.+)::(.+)$/) { $calls{$2}{$1}++; } }]); my $soap = SOAP::Lite -> uri("Echo") -> proxy("http://services.soaplite.com/echo.cgi"); } foreach (keys %{$calls{new}}) { ok(exists $calls{DESTROY}{$_}); } %calls = (); { local $SOAP::Constants::DO_NOT_USE_XML_PARSER = 1; my $soap = SOAP::Lite -> uri("Echo") -> proxy("http://services.soaplite.com/echo.cgi"); } foreach (keys %{$calls{new}}) { ok(exists $calls{DESTROY}{$_}); } SOAP::Lite->import(trace => '-objects'); } SOAP-Lite-1.19/t/03-server.t000644 000770 000024 00000025046 12567356463 015550 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; BEGIN { plan tests => 32 } use SOAP::Lite; my($a, $s, $r, $serialized, $deserialized); my %tests = ( 'XML only' => <<'EOM', 2 5 EOM 'message with headers' => <<'EOM', Content-Type: text/xml 2 5 EOM 'singlepart MIME' => <<'EOM', Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: 2 5 --MIME_boundary-- EOM 'multipart MIME' => <<'EOM', Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: 2 5 --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: 2 --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: 5 --MIME_boundary-- EOM 'multipart MIME w/multiref' => <<'EOM', Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: 2 --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: 5 --MIME_boundary-- EOM ); eval "SOAP::Packager::MIME->new->initialize_parser();"; my $is_mimetools_installed = ($@) ? 0 : 1; (my $reason = $@) =~ s/ at .+// unless $is_mimetools_installed; print "MIME tests will be skipped: $reason" if defined $reason; my $package = ' package Calculator; sub new { bless {} => ref($_[0]) || $_[0] } sub add { $_[1] + $_[2] } sub schema { $SOAP::Constants::DEFAULT_XML_SCHEMA } 1;'; # TEST 1-4 HANDLER: { print "Server handler test(s)...\n"; my $server = SOAP::Server->dispatch_to('Calculator'); SKIP: for (reverse sort keys %tests) { #print $_, "\n"; my $result = SOAP::Deserializer->deserialize($server->handle($tests{$_})); skip(1, 'skip') if ($_ =~m/XML/ || !$is_mimetools_installed) || ($result->faultstring || '') =~ /Failed to access class \(Calculator\)/; #print $result->faultstring; #print "SKIP\n"; } eval $package or die; SKIP: for (reverse sort keys %tests) { my $result = SOAP::Deserializer->deserialize($server->handle($tests{$_})); if ($_ =~m/XML/ || !$is_mimetools_installed) { skip(1, 'skip'); next SKIP; } ok (($result->result || 0) == 7); } } { print "Server handler with complex dispatches test(s)...\n"; foreach my $server ( # dispatch to class SOAP::Server->dispatch_to('Calculator'), # dispatch to object SOAP::Server->dispatch_to(Calculator->new), # dispatch to regexp SOAP::Server->dispatch_to('Calc\w+'), # dispatch URI to class SOAP::Server->dispatch_with({'http://www.soaplite.com/Calculator' => 'Calculator'}), # dispatch URI to object SOAP::Server->dispatch_with({'http://www.soaplite.com/Calculator' => Calculator->new}), # dispatch quoted SOAPAction to class SOAP::Server->action('"http://action/#method"') ->dispatch_with({'http://action/#method' => 'Calculator'}), # dispatch non-quoted SOAPAction to class SOAP::Server->action('http://action/#method') ->dispatch_with({'http://action/#method' => 'Calculator'}), # dispatch to class and BAD regexp. SOAP::Server->dispatch_to('\protocols', 'Calculator') ) { # end for my $result = SOAP::Deserializer->deserialize($server->handle($tests{'XML only'})); my $value = $result->result; use Data::Dumper; print Dumper $value; ok($value + 0 == 7); } } { print "Error handling in server test(s)...\n"; $a = SOAP::Server->handle(''); ok($a =~ /Can't find root/); $a = SOAP::Server->handle(''); ok($a =~ /Can't find method/); $a = SOAP::Server->handle('11'); ok($a =~m{Denied \s access \s to \s method}x); $a = SOAP::Server->handle(' '); ok($a =~ /Can't find method/); } { print "Envelope with no namespaces test(s)...\n"; eval 'sub add { $_[1] + $_[2] }; 1' or die; my $result = SOAP::Deserializer->deserialize(SOAP::Server->dispatch_to('add')->handle('34')); ok(($result->result || 0) == 7); } { print "Different XML Schemas test(s)...\n"; my $server = SOAP::Server->dispatch_to('Calculator'); $a = $server->handle(' '); ok($a =~ m!xsi="http://www.w3.org/2001/XMLSchema-instance"!); ok($a =~ m!xsd="http://www.w3.org/2001/XMLSchema"!); ok($a =~ m!>http://www.w3.org/2001/XMLSchemahandle(' 2 '); ok($a =~ m!xsi="http://www.w3.org/2001/XMLSchema-instance"!); ok($a =~ m!xsd="http://www.w3.org/2001/XMLSchema"!); ok($a =~ m!>http://www.w3.org/2001/XMLSchemahandle(' 2 '); ok($a =~ m!xsi="http://www.w3.org/2001/XMLSchema-instance"!); ok($a =~ m!xsd="http://www.w3.org/2001/XMLSchema"!); ok($a =~ m!>http://www.w3.org/2001/XMLSchemanew->initialize_parser; 1 }; if ($@) { $@ =~ s/ at .+//; print "1..0 # Skip: $@"; exit; } } BEGIN { plan tests => 15 } my($a, $soap, $d, $s, $r, $serialized, $deserialized); { # check attachment deserialization $soap = SOAP::Lite->new(); $soap->init_context(); ############################################################################## print "Attachment deserialization (Content-ID) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: base64 Content-ID: AAECAyAgIAQFBg== --MIME_boundary Content-Type: image/jpeg Content-Transfer-Encoding: binary Content-ID: ...Raw JPEG image.. --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary Content-Type: text/xml Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary-- EOX ok(ref $a); ok(ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theCrashPhoto} =~ /JPEG/); ok(ref $a && $a->valueof('//theCrashPhoto') =~ /Raw JPEG image/); ok(ref $a && $a->valueof('//theSignedForm') eq "\0\1\2\3 \4\5\6"); ok(ref $a && $a->valueof('//somexml') =~ m!c!); ok(ref $a && $a->valueof('//realxml')->{b} eq 'c'); ############################################################################## print "Attachment deserialization (Content-ID and Content-Location) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: http://claiming-it.com/claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-ID: Content-Location: http://claiming-it.com/claim061400a.tiff ...binary TIFF image... --MIME_boundary-- EOX ok(ref $a); ok(ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/); ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/); ############################################################################## print "Attachment deserialization (relative Content-Location) test(s)...\n"; # TODO - this unit test breaks - it does not seem to be picking up a base location # from outer Content-Location eval { $a = $soap->deserializer->deserialize(<<'EOX'); }; MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. Content-Location: http://claiming-it.com/ --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-Id: Content-Location: claim061400a.tiff ...binary TIFF image... --MIME_boundary-- EOX ok(ref $a); ok(ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/); ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/); ############################################################################## print "Attachment deserialization (no default Content-Location) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-ID: Content-Location: the_signed_form.tiff ...binary TIFF image... --MIME_boundary- EOX # ok(ref $a); ok(ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/); ok(ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/); } SOAP-Lite-1.19/t/04-attach.t000644 000770 000024 00000022412 12567356463 015501 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless ( grep /blib/, @INC ) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; BEGIN { use SOAP::Lite; eval { SOAP::Packager::MIME->new->initialize_parser; 1 }; if ($@) { $@ =~ s/ at .+//; print "1..0 # Skip: $@"; exit; } } BEGIN { plan tests => 18 } my ( $a, $soap, $d, $s, $r, $serialized, $deserialized ); { # check attachment deserialization $soap = SOAP::Lite->new(); $soap->init_context(); ############################################################################## print "Attachment deserialization (Content-ID) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: base64 Content-ID: AAECAyAgIAQFBg== --MIME_boundary Content-Type: image/jpeg Content-Transfer-Encoding: binary Content-ID: ...Raw JPEG image.. --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary Content-Type: text/xml Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary-- EOX ok( ref $a ); ok( ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theCrashPhoto} =~ /JPEG/ ); ok( ref $a && $a->valueof('//theCrashPhoto') =~ /Raw JPEG image/ ); ok( ref $a && $a->valueof('//theSignedForm') eq "\0\1\2\3 \4\5\6" ); ok( ref $a && $a->valueof('//somexml') =~ m!c! ); ok( ref $a && $a->valueof('//realxml')->{b} eq 'c' ); ############################################################################## print "Attachment deserialization (Content-ID and Content-Location) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: http://claiming-it.com/claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-ID: Content-Location: http://claiming-it.com/claim061400a.tiff ...binary TIFF image... --MIME_boundary-- EOX ok( ref $a ); ok( ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ ); ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ ); ############################################################################## print "Attachment deserialization (relative Content-Location) test(s)...\n"; # TODO - this unit test breaks - it does not seem to be picking up a base location # from outer Content-Location eval { $a = $soap->deserializer->deserialize(<<'EOX'); }; MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. Content-Location: http://claiming-it.com/ --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-Id: Content-Location: claim061400a.tiff ...binary TIFF image... --MIME_boundary-- EOX ok( ref $a ); ok( ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ ); ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ ); ############################################################################## print "Attachment deserialization (no default Content-Location) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Location: claim061400a.xml --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-ID: Content-Location: the_signed_form.tiff ...binary TIFF image... --MIME_boundary- EOX # ok( ref $a ); ok( ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{theSignedForm} =~ /TIFF/ ); ok( ref $a && $a->valueof('//theSignedForm') =~ /binary TIFF image/ ); # check attachment of composite element $soap = SOAP::Lite->new(); $soap->init_context(); ############################################################################## print "Attachment deserialization (Nested Attachment) test(s)...\n"; $a = $soap->deserializer->deserialize(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary Content-Type: message/rfc822 Content-Transfer-Encoding: binary Content-ID: MIME-Version: 1.0 X-Mailer: MIME::Lite 3.01 (F2.74; T1.24; A1.74; B3.07; Q3.07) Date: Thu, 30 Apr 2009 15:59:49 -0400 To: foo@bar.com Subject: multipart message Content-Transfer-Encoding: binary Content-Type: multipart/related; boundary="_----------=_1241121589160890" This is a multi-part message in MIME format. --_----------=_1241121589160890 Content-Disposition: inline Content-Length: 35 Content-Transfer-Encoding: binary Content-Type: text/html Here's my text --_----------=_1241121589160890 Content-Disposition: inline Content-Length: 15 Content-Transfer-Encoding: binary Content-Type: text/plain Here's my text --_----------=_1241121589160890-- --MIME_boundary-- EOX ok( ref $a ); ok( ref $a && ref $a->valueof('//insurance_claim_auto') && $a->valueof('//insurance_claim_auto')->{email} =~ m{my()? text} ); ok( ref $a && $a->valueof('//email') =~ m{my()? text} ); } SOAP-Lite-1.19/t/05-customxml.t000644 000770 000024 00000014020 12567356463 016265 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; use SOAP::Lite; plan tests => 40; my($a, $s, $r, $serialized, $deserialized); $deserialized = SOAP::Custom::XML::Deserializer -> deserialize(join '', ); ok(ref $deserialized); $r = $deserialized->valueof('/Envelope/Body'); ok(ref $r); my @portfolios = $r->Report->Request->Composition->PortfolioDistribution; ok(@portfolios == 6); foreach my $portfolio (@portfolios) { # test attributes print $portfolio->type, " ", $portfolio->date, "\n"; ok($portfolio->type && $portfolio->date); foreach my $row ($portfolio->Row) { # test elements print " ", $row->Element, " ", $row->Value, "\n"; ok($row->Element && $row->Value); } } __DATA__
61744J366
Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Common Stocks 0.9991 Other 0.0021 Cash & Cash Equivalents -0.0012 General Electric Company 0.0458 Cisco Systems Inc 0.033 Microsoft Corporation 0.0263 Exxon Mobil Corp. 0.0263 Pfizer, Inc. 0.0231 Intel Corporation 0.0209 Citigroup Inc 0.02 Emc Corp. 0.0185 American International Group, Inc. 0.0181 Oracle Corporation 0.0172 Pharmaceuticals 0.0941 Communications Equipment 0.0857 Computers & Peripherals 0.0764 Diversified Financials 0.0724 Industrial Conglomerates 0.0581 Diversified Telecommunication Services 0.058 Software 0.056 Other 0.5002 Cash & Cash Equivalents -0.0012 Information Technology 0.2964 Financials 0.154 Health Care 0.1265 Consumer Discretionary 0.1026 Industrials 0.0874 Telecommunication Services 0.0632 Consumer Staples 0.0575 Other 0.1136 Cash & Cash Equivalents -0.0012
SOAP-Lite-1.19/t/06-modules.t000644 000770 000024 00000002071 12567356463 015706 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test::More qw(no_plan); my @modules = qw(SOAP::Lite SOAP::Transport::HTTP SOAP::Transport::MAILTO SOAP::Transport::FTP SOAP::Transport::TCP SOAP::Transport::IO SOAP::Transport::LOCAL SOAP::Transport::POP3 XML::Parser::Lite UDDI::Lite XMLRPC::Lite XMLRPC::Transport::HTTP XMLRPC::Transport::TCP XMLRPC::Transport::POP3 SOAP::Packager SOAP::Transport::MQ SOAP::Transport::JABBER ); foreach (@modules) { eval "require $_"; if ($@ =~ /(Can\'t locate)|(XML::Parser::Lite requires)|(this is only version)|(load mod_perl)/) { SKIP: { skip("Module $_ does not exist or is breaking in an expected way", 1); } next; } is($@, '', "use $_") or warn $@; }SOAP-Lite-1.19/t/08-schema.t000644 000770 000024 00000013560 12567356463 015505 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; BEGIN { plan tests => 47 } use SOAP::Lite; my($a, $s, $r, $serialized, $deserialized); { # check deserialization of envelope with result print "Deserialization of envelope with result test(s)...\n"; $deserialized = SOAP::Deserializer->deserialize(' 20 40 60 100 200 '); ok($deserialized->result->[2] == 60); ok((my @array = $deserialized->paramsall) == 1); ok(ref $deserialized->body eq 'HASH'); # not blessed anymore since 0.51 } { print "hex encoding test(s)...\n"; $a = "\0 {a}\1"; $serialized = SOAP::Serializer->serialize(SOAP::Data->type(hex => $a)); ok($serialized =~ />00207B617D01deserialize($serialized)->root eq $a); } { print "Deserialization of 1999/2001 schemas test(s)...\n"; foreach (split "\n", <12 12 12 12 12 12 12 EOX $deserialized = SOAP::Deserializer->deserialize($_); ok($deserialized->root == 12); } eval { SOAP::Deserializer->deserialize('12') }; ok($@ =~ m!Unrecognized type '\{http://www.w3.org/1999/XMLSchema\}something'!); eval { SOAP::Deserializer->deserialize('12') }; ok($@ =~ m!Unrecognized type '\{http://some.thing.else/XMLSchema\}something'!); foreach (qw(base64Binary hexBinary anyType anySimpleType gMonth gYearMonth gYear gMonthDay gDay duration anyURI dateTime)) { eval { SOAP::Deserializer->deserialize(qq!12!) }; ok($@ =~ m!Unrecognized type '\{http://www.w3.org/1999/XMLSchema\}$_'!); } ok(SOAP::Deserializer->deserialize(qq!true!)->root eq '1'); eval { SOAP::Deserializer->deserialize(qq!something!) }; ok($@ =~ m!Wrong boolean value!); ok(SOAP::Deserializer->deserialize(qq!true!)->root eq '1'); ok(SOAP::Deserializer->deserialize(qq!1!)->root eq '1'); ok(SOAP::Deserializer->deserialize(qq!false!)->root eq '0'); ok(SOAP::Deserializer->deserialize(qq!0!)->root eq '0'); foreach (qw(ur-type base64 hex timeDuration uriReference timeInstant month year recurringDate recurringDay)) { eval { SOAP::Deserializer->deserialize(qq!12!) }; ok($@ =~ m!Unrecognized type '\{http://www.w3.org/2001/XMLSchema\}$_'!); } eval { SOAP::Deserializer->deserialize(qq!something!) }; ok($@ =~ m!Wrong boolean value!); ok(SOAP::Deserializer->deserialize(qq!true!)->root eq '1'); ok(SOAP::Deserializer->deserialize(qq!1!)->root eq '1'); ok(SOAP::Deserializer->deserialize(qq!false!)->root eq '0'); ok(SOAP::Deserializer->deserialize(qq!0!)->root eq '0'); } SOAP-Lite-1.19/t/11-cgi.t000644 000770 000024 00000000337 12567356463 014777 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'http://localhost/cgi-bin/soap.cgi'); SOAP-Lite-1.19/t/12-cgi_https.t000644 000770 000024 00000000340 12567356463 016214 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'https://localhost/cgi-bin/soap.cgi'); SOAP-Lite-1.19/t/13-mod_perl.t000644 000770 000024 00000000322 12567356463 016032 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'http://localhost/soap'); SOAP-Lite-1.19/t/14-cgi_apache.t000644 000770 000024 00000000344 12567356463 016301 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'http://localhost/mod_perl/soap.mod_cgi'); SOAP-Lite-1.19/t/15-daemon.t000644 000770 000024 00000000317 12567356463 015502 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'http://localhost/'); SOAP-Lite-1.19/t/17-mod_soap.t000644 000770 000024 00000000327 12567356463 016043 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use SOAP::Test; SOAP::Test::Server::run_for(shift || 'http://localhost/mod_soap'); SOAP-Lite-1.19/t/19-apachesoap.t000644 000770 000024 00000002427 12567356463 016353 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join "\n", "--- SOAP FAULT ---", $res->faultcode, $res->faultstring, '') : warn(join "\n", "--- TRANSPORT ERROR ---", $soap->transport->status, ''); return new SOAP::SOM; } ; my($a, $s, $r, $serialized, $deserialized); my $proxy = 'http://localhost:8080/soap/servlet/rpcrouter'; # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('http://something/somewhere')->proxy($proxy)->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 2; { # Local server with Apache SOAP (http://xml.apache.org/soap) print "Apache SOAP server test(s)...\n"; $s = SOAP::Lite -> uri('urn:xmltoday-delayed-quotes') -> proxy($proxy) ; ok($s->getQuote('MSFT')->result > 0); ok($s->getQuote(SOAP::Data->name(symbol => 'MSFT'))->result > 0); } SOAP-Lite-1.19/t/21-public.t000644 000770 000024 00000023214 12567356463 015513 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n") : warn(join " ", "TRANSPORT ERROR:", $soap->transport->status, "\n"); return new SOAP::SOM; }; $SOAP::Constants::DO_NOT_USE_CHARSET = 1; my($a, $s, $r, $serialized, $deserialized); # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('http://something/somewhere')->proxy('http://services.xmethods.net/soap/servlet/rpcrouter')->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 21; { # Public test server with Frontier implementation (http://soap.weblogs.com/) print "Frontier server test(s)...\n"; $s = SOAP::Lite -> uri('/examples') -> on_action(sub { sprintf '"%s"', @_ }) -> proxy('http://superhonker.userland.com/', timeout => $SOAP::Test::TIMEOUT); ok($s->getCurrentTime()->result); ok($s->getStateName(SOAP::Data->name(statenum => 1))->result eq 'Alabama'); print "SOAP::Lite server test(s)...\n"; $s = SOAP::Lite -> uri('http://www.soaplite.com/My/Examples') -> proxy('http://services.soaplite.com/examples.cgi', timeout => $SOAP::Test::TIMEOUT); ok($s->getStateNames(1,4,6,13)->result =~ /^Alabama\s+Arkansas\s+Colorado\s+Illinois\s*$/); $r = $s->getStateList([1,2,3,4])->result; ok(ref $r && $r->[0] eq 'Alabama'); $r = $s->getStateStruct(SOAP::Data->type(ordered_hash => [item1 => 1, item2 => 4]))->result; ok(ref $r && $r->{item2} eq 'Arkansas'); # Public test server with COM implementation (http://www.zaks.demon.co.uk/com/4s4c/) print "COM server test(s)...\n"; $s = SOAP::Lite -> uri('http://simon.fell.com/calc') -> proxy('http://soap.4s4c.com/ssss4c/soap.asp', timeout => $SOAP::Test::TIMEOUT) ; beta $r = $s->doubler(name SOAP::Data nums => [10,20,30,50,100])->result; ok(ref $r && $r->[1] == 40); # Real server with ASP implementation (http://www.soap-wrc.com/webservices/) print "ASP server test(s)...\n"; $s = SOAP::Lite -> uri('www.soap-wrc.com') -> proxy('http://www.soap-wrc.com/webservices/soapv11.asp', timeout => $SOAP::Test::TIMEOUT) -> on_fault(sub{ref$_[1]?return$_[1]:return}); import SOAP::Data 'name'; # no import by default $r = $s->addResource( name(Login => 'login'), name(Password => 'password'), name(Caption => 'caption'), name(Description => 'description'), name(URL => 'http://yahoo.com'), ); ok(ref $r && $r->faultcode eq 'SOAP-ENV:Client'); # Password should be wrong. Put yours if you have it. # Remember: this is the real server if (0) { # doesn't seem to be working on 2001/01/31 print "DevelopMentor's Perl server test(s)...\n"; ok((SOAP::Lite -> uri('urn:soap-perl-test') -> proxy('http://soapl.develop.com/soap?class=SPTest', timeout => $SOAP::Test::TIMEOUT) -> add(SOAP::Data->name(a => 3), SOAP::Data->name(b => 4)) -> result or 0) == 7);beta } # Public server with Microsoft implementation (http://search.microsoft.com/search/MSComSearchService.asmx) print "Microsoft's server test(s)...\n"; ok((SOAP::Lite -> uri('http://tempuri.org/') -> proxy('http://search.microsoft.com/search/MSComSearchService.asmx', timeout => $SOAP::Test::TIMEOUT) -> on_action(sub{join'',@_}) -> GetVocabulary(SOAP::Data->name(Query => 'something_very_unusual')->uri('http://tempuri.org/')) -> valueof('//Found') || '') eq 'false'); $r = SOAP::Lite -> uri('http://tempuri.org/') -> proxy('http://search.microsoft.com/search/MSComSearchService.asmx', timeout => $SOAP::Test::TIMEOUT) -> on_action(sub{join'',@_}) -> GetBestBets(SOAP::Data->name(Query => 'data')->uri('http://tempuri.org/')) -> result; ok(ref $r && $r->{VocabularyLastcache} =~ /T/); # Public server with 4s4c implementation (http://www.pocketsoap.com/4s4c/) print "4s4c (aka Simon's SOAP Server Services For COM) server test(s)...\n"; $s = SOAP::Lite -> uri('http://www.pocketsoap.com/whois') -> proxy('http://soap.4s4c.com/whois/soap.asp', timeout => $SOAP::Test::TIMEOUT) -> whois(SOAP::Data->name('name' => 'yahoo')); $r = $s->result || ''; ok($r =~ /YAHOO/); # Public server with MS SOAP implementation (http://www.itfinity.net/soap/guid/details.html) print "MS SOAP (on itfinity.net) server test(s)...\n"; ok((SOAP::Lite -> uri('http://www.itfinity.net/soap/guid/guid.xsd') -> proxy('http://www.itfinity.net/soap/guid/default.asp', timeout => $SOAP::Test::TIMEOUT) -> NextGUID -> result or '') =~ /.{8}-.{4}-.{4}-.{4}-.{12}/); # Public server with Apache implementation (http://www.lemurlabs.com/projects/soap/itime/index.jsp) print "Apache SOAP (on lemurlabs.com) server test(s)...\n"; ok((SOAP::Lite -> uri('urn:lemurlabs-ITimeService') -> proxy('http://www.lemurlabs.com/rpcrouter', timeout => $SOAP::Test::TIMEOUT) -> getInternetTime -> result or '') =~ /\d/); ok(@{SOAP::Lite -> uri('urn:lemurlabs-Fortune') -> proxy('http://www.lemurlabs.com/rpcrouter', timeout => $SOAP::Test::TIMEOUT) -> getDictionaryNameList #getAnyFortune -> result or []} > 1); $r = (SOAP::Lite -> uri('urn:lemurlabs-Fortune') -> proxy('http://www.lemurlabs.com/rpcrouter', timeout => $SOAP::Test::TIMEOUT) -> getFortuneByDictionary('work') -> result) || ''; ok($r && ref($r = SOAP::Deserializer->deserialize($r)) && ($r = $r->valueof('//fortune') || '')); print $r ? "Your fortune cookie:\n$r\n" : "No fortune cookies for you today\n\n"; if (0) { # seems to be down as of 2001/04/18 # Public server with Lucin implementation (http://www.lucin.com/lu003/sal.htm) print "Lucin SOAP (lucin.com) server test(s)...\n"; $r = (SOAP::Lite -> proxy('http://srv.lucin.net/bin/SOAP002.asp', timeout => $SOAP::Test::TIMEOUT) -> uri('http://schema.soapranch.com/salACC/CAddress.xml') -> Ping(SOAP::Data->new(name => 'ApplicID', type => 'xsd:long', value => 1001)) -> result) || ''; ok($r && $r =~ /^OKO/); } # Public server with SOAP::Lite/ApacheSOAP implementations (http://www.xmethods.net/) print "XMethods (SOAP::Lite/ApacheSOAP) server test(s)...\n"; print "All connections are keep-alive\n"; $s = SOAP::Lite -> uri('urn:xmethods-BNPriceCheck') -> proxy('http://services.xmethods.net/soap/servlet/rpcrouter', timeout => $SOAP::Test::TIMEOUT); my $isbn = '0672319225'; $r = ($s->getPrice(SOAP::Data->type(string => $isbn))->result) || 0; print "Price for ISBN$isbn is \$$r\n"; ok($r > 20 && $r < 60); $s = SOAP::Lite -> uri('urn:xmethods-CurrencyExchange') -> proxy('http://services.xmethods.net/soap', timeout => $SOAP::Test::TIMEOUT); $r = ($s->getRate(SOAP::Data->name(country1 => 'England'), SOAP::Data->name(country2 => 'Japan')) ->result) || 0; print "Currency rate for England/Japan is $r\n"; ok($r > 1); $s = SOAP::Lite -> uri('urn:xmethods-delayed-quotes') -> proxy('http://services.xmethods.net/soap', timeout => $SOAP::Test::TIMEOUT); $r = ($s->getQuote('MSFT')->result) || 0; print "Quote for MSFT symbol is $r\n"; ok($r > 1); if (0) { # should work, but server wasn't ready as of 2001/04/18 $s = SOAP::Lite -> uri('urn:xmethods-delayed-quotes') -> proxy('https://services.xmethods.net/soap', timeout => $SOAP::Test::TIMEOUT); $r = ($s->getQuote('MSFT')->result) || 0; print "Quote for MSFT symbol from secure server is $r\n"; ok($r > 1); } ok((SOAP::Lite -> uri('urn:xmethods-DomainChecker') -> proxy('http://services.xmethods.net/soap', timeout => $SOAP::Test::TIMEOUT) -> checkDomain('yahoo.com') -> result or '') eq 'unavailable'); ok((SOAP::Lite -> uri('urn:xmethods-CATraffic') -> proxy('http://services.xmethods.net/soap/servlet/rpcrouter', timeout => $SOAP::Test::TIMEOUT) -> getTraffic(type SOAP::Data string => 101) -> result or '') =~ /reported/); ok((SOAP::Lite -> uri('urn:xmethods-Temperature') -> proxy('http://services.xmethods.net/soap/servlet/rpcrouter', timeout => $SOAP::Test::TIMEOUT) -> getTemp(type SOAP::Data string => 64151) -> result or '') =~ /\./); if (0) { # Tony brought it down as of 2001/06/11 ok((SOAP::Lite -> uri('urn:xmethodsSoapPing') -> proxy('http://services.xmethods.net/perl/soaplite.cgi', timeout => $SOAP::Test::TIMEOUT) -> pingHost(name SOAP::Data hostname => 'www.yahoo.com') -> result or 0) == 1); skip 'xmethods is unavailable', 1; print "BabelFish translator server test(s)...\n"; ok((SOAP::Lite -> uri('urn:xmethodsBabelFish') -> proxy('http://services.xmethods.net/perl/soaplite.cgi', timeout => $SOAP::Test::TIMEOUT) -> BabelFish(SOAP::Data->name(translationmode => 'en_it'), SOAP::Data->name(sourcedata => 'I want to work')) -> result or '') =~ /^Desidero lavorare$/); } } if (0) { # Kafka response has xsi:type="string" response which is invalid print "Kafka (http://www.vbxml.com/soapworkshop/utilities/kafka/) server test(s)...\n"; ok((SOAP::Lite -> service('http://www.vbxml.com/soapworkshop/services/id/id.xml') -> GetSecretIdentity('Superman') or '') eq 'Clark Kent'); } SOAP-Lite-1.19/t/22-interop_apache.t000644 000770 000024 00000007456 12567356463 017231 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n") : warn(join " ", "TRANSPORT ERROR:", $soap->transport->status, "\n"); return new SOAP::SOM; } ; my($a, $s, $r); # updated on 2001/08/17 # http://services.xmethods.net:80/soap/servlet/rpcrouter my $proxy = 'http://nagoya.apache.org:5049/axis/servlet/AxisServlet'; # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('http://something/somewhere')->proxy($proxy)->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 15; { # XMethod's JavaSOAP server (http://xmethods.net/detail.html?id=11) print "XMethod's JavaSOAP server test(s)...\n"; $s = SOAP::Lite -> uri('http://soapinterop.org/') -> proxy($proxy) ; $a = 'SOAP::Lite'; $r = $s->echoString($a)->result; ok($r eq $a); $a = ['a', 'b']; $r = $s->echoStringArray($a)->result; ok(ref $r && join('', @$r) eq join('', @$a)); $a = 11; $r = $s->echoInteger($a)->result; ok($r == $a); $a = [1, 3, 5]; $r = $s->echoIntegerArray($a)->result; ok(ref $r && join('', @$r) == join('', @$a)); $a = 11.02; $r = $s->echoFloat($a)->result; ok($r == $a); $a = [1.1, 3.3, 5.5]; $r = $s->echoFloatArray($a)->result; ok(ref $r && join('', @$r) eq join('', @$a)); # you may specify URI manually (but see maptype() below) $a = {varString => 'b', varInt => 2, varFloat => 95.7}; $r = $s->echoStruct( SOAP::Data->type('xx:SOAPStruct' => $a) ->attr({'xmlns:xx' => 'http://soapinterop.org/xsd'}) )->result; ok(ref $r && join('', sort values %$r) eq join('', sort values %$a)); # specify mapping to URI $s->maptype({SOAPStruct => 'http://soapinterop.org/xsd'}); $a = {varString => 'b', varInt => 2, varFloat => 95.7}; $r = $s->echoStruct($a)->result; ok(ref $r && join('', sort values %$r) eq join('', sort values %$a)); $a = {varString => 'b', varInt => 2, varFloat => 95.7}; $r = $s->echoStruct(SOAP::Data->name(something => $a))->result; ok(ref $r && join('', sort values %$r) eq join('', sort values %$a)); $a = [ {varString => 'b', varInt => 2, varFloat => 95.7}, {varString => 'c', varInt => 3, varFloat => 85.7}, {varString => 'd', varInt => 4, varFloat => 75.7}, ]; $r = $s->echoStructArray($a)->result; ok(ref $r && join('', map { sort values %$_ } @$r) eq join('', map { sort values %$_ } @$a)); $a = [ {varString => 'b', varInt => 2, varFloat => 95.7}, {varString => 'c', varInt => 3, varFloat => 85.7}, {varString => 'd', varInt => 4, varFloat => 75.7}, ]; $r = $s->echoStructArray(SOAP::Data->name(something => $a))->result; ok(ref $r && join('', map { sort values %$_ } @$r) eq join('', map { sort values %$_ } @$a)); my $key = "\0\1"; my $value = 456; { local $^W; # implicit, warning with -w $a = $s->echoMap({a => 123, $key => $value})->result; ok($a->{$key} == $value); } # explicit $a = $s->echoMap(SOAP::Data->type(map => {a => 123, $key => $value}))->result; ok($a->{$key} == $value); { local $^W; # implicit, warning with -w $a = $s->echoMapArray([{a => 123, $key => $value}, {b => 123, $key => 789}])->result; ok($a->[0]->{$key} == $value); } # explicit $a = $s->echoMapArray([SOAP::Data->type(map => {a => 123, $key => $value}), SOAP::Data->type(map => {b => 123, $key => 789})])->result; ok($a->[0]->{$key} == $value); } SOAP-Lite-1.19/t/23-ppm.t000644 000770 000024 00000002637 12567356463 015041 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } #use strict; BEGIN { print "1..0 # Skip: ActiveState's ppmserver.pl server seems to be broken - skipping tests\n"; exit 0; }; use Test; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n") : warn(join " ", "TRANSPORT ERROR:", $soap->transport->status, "\n"); return new SOAP::SOM; } ; my($a, $s, $r); my $proxy = 'http://ppm.activestate.com/cgibin/PPM/ppmserver.pl'; # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('urn:/PPMServer')->proxy($proxy)->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 3; { # ActiveState's PPM server (http://activestate.com/) print "ActiveState's PPM server test(s)...\n"; $s = SOAP::Lite -> uri('urn:/PPMServer') -> proxy($proxy) ; $r = $s->fetch_ppd('SOAP-Lite')->result; # use Data::Dumper; # print Dumper $r; ok($r =~ 'SOAP-Lite'); ok($r =~ 'Paul Kulchenko'); $r = $s->fetch_ppd('SOAP-Super-Lite')->result; ok(!defined $r); } SOAP-Lite-1.19/t/24-wsdl.t000644 000770 000024 00000006207 12567356463 015214 0ustar00phredstaff000000 000000 #!/bin/env perl BEGIN { unless(grep /blib/, @INC) { chdir 't' if -d 't'; unshift @INC, '../lib' if -d '../lib'; } } use strict; use Test; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join "\n", "--- SOAP FAULT ---", $res->faultcode, $res->faultstring, '') : warn(join "\n", "--- TRANSPORT ERROR ---", $soap->transport->status, ''); return new SOAP::SOM; } ; my($a, $s, $r, $serialized, $deserialized); # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('http://something/somewhere')->proxy('http://services.xmethods.net/soap/servlet/rpcrouter')->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 12; { # Service description (WSDL) (http://www.xmethods.net/) print "Service description (WSDL) test(s)...\n"; $s = SOAP::Lite -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl'); ok($s->getQuote('MSFT') > 1); ok(SOAP::Lite -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl') -> getQuote('MSFT') > 1); # WSDL with element and multiple ports (non-SOAP bindings) ok(SOAP::Lite -> service('http://www.xmethods.net/sd/StockQuoteImport.wsdl') -> getQuote('MSFT') > 1); my $schema = SOAP::Schema -> schema('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl') -> parse('net.xmethods.services.stockquote.StockQuoteService'); foreach (keys %{$schema->services}) { eval { $schema->stub($_) } or die; } # SOAP::Schema converts # net.xmethods.services.stockquote.StockQuoteService # into # net_xmethods_services_stockquote_StockQuoteService print "Service description static stub test(s)...\n"; ok(net_xmethods_services_stockquote_StockQuoteService->getQuote('MSFT') > 1); ok(defined net_xmethods_services_stockquote_StockQuoteService->self); ok(net_xmethods_services_stockquote_StockQuoteService->self->call); print "Service description static stub with import test(s)...\n"; net_xmethods_services_stockquote_StockQuoteService->import(':all'); ok(getQuote('MSFT') > 1); ok(defined net_xmethods_services_stockquote_StockQuoteService->self); ok(net_xmethods_services_stockquote_StockQuoteService->self->call); # ok, now we'll test for passing SOAP::Data and SOAP::Headers as a parameters my @params; { package TestStockQuoteService; @TestStockQuoteService::ISA = 'net_xmethods_services_stockquote_StockQuoteService'; sub call { shift; @params = @_; new SOAP::SOM } } my @testparams = (SOAP::Data->name(param1 => 'MSFT'), SOAP::Data->name('param2'), SOAP::Header->name(header1 => 'value')); TestStockQuoteService->new->getQuote(@testparams); ok($params[1]->value->name eq 'param1'); ok($params[2]->name eq 'param2'); ok(ref $params[3] eq 'SOAP::Header' && $params[3]->name eq 'header1'); } SOAP-Lite-1.19/t/36-leaks.t000644 000770 000024 00000003530 12567356463 015341 0ustar00phredstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Test::More; use SOAP::Lite on_fault => sub { my $soap = shift; my $res = shift; ref $res ? warn(join " ", "SOAP FAULT:", $res->faultstring, "\n") : warn(join " ", "TRANSPORT ERROR:", $soap->transport->status, "\n"); return new SOAP::SOM; } ; my ($a, $s, $r); my $proxy = 'http://services.soaplite.com/echo.cgi'; # ------------------------------------------------------ use SOAP::Test; $s = SOAP::Lite->uri('http://something/somewhere')->proxy($proxy)->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT = $SOAP::Test::TIMEOUT) }; $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 16; { print "Memory leaks test(s)...\n"; SOAP::Lite->self(undef); my %calls = (); SOAP::Lite->import(trace => [objects => sub { # warn join ', ' , caller(2); my @caller = caller(2); $calls{$2}{$1}++ if ($caller[3] =~ /^(.+)::([^\:]+)$/); }]); { my $soap = SOAP::Lite -> uri("Echo") -> proxy($proxy) -> echo; use Data::Dumper; # find_cycle $soap; } use Data::Dumper; foreach (keys %{$calls{new}}) { print "default parser: $_\n"; ok(exists $calls{DESTROY}{$_}); } SKIP: { eval "require XML::Parser::Lite; 1;"; skip "XML::Parser::Lite is required for this test", 8 if $@; %calls = (); { local $SOAP::Constants::DO_NOT_USE_XML_PARSER = 1; my $soap = SOAP::Lite -> uri("Echo") -> proxy($proxy) -> echo; } foreach (keys %{$calls{new}}) { print "XML::Parser::Lite: $_\n"; ok(exists $calls{DESTROY}{$_}); } } # SOAP::Lite->import(trace => '-objects'); } SOAP-Lite-1.19/t/38-packager.t000644 000770 000024 00000012617 12567356463 016027 0ustar00phredstaff000000 000000 #!/usr/bin/perl use strict; use warnings; use Test::More; BEGIN { eval { require MIME::Parser; }; plan(skip_all => "MIME::Parser not installed") if $@; } my ($mp, $env, $part, @part_data); use SOAP::Packager; $mp = SOAP::Packager::MIME->new; ok(ref $mp); # check attachment deserialization print "Attachment deserialization (Content-ID) test(s)...\n"; $env = $mp->unpackage(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: base64 Content-ID: AAECAyAgIAQFBg== --MIME_boundary Content-Type: image/jpeg Content-Transfer-Encoding: binary Content-ID: ...Raw JPEG image.. --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary Content-Type: text/xml Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary-- EOX # test to see how how many parts were found: ok(@{$mp->parts} == 4); ok(UNIVERSAL::isa(ref($mp->parts->[0]) => "MIME::Entity")); # Tests to see if data extraction works - TIFF not checked #@part_data = $mp->find_part( id => '' ); #ok($part_data[0] eq '...Raw JPEG image..'); #@part_data = $mp->find_part( id => '' ); #ok($part_data[0] eq 'c'); #@part_data = $mp->find_part( id => '' ); #ok($part_data[0] eq 'c'); # Test: no start parameter specified # Content-ID: # Content-Type: text/xml; charset=UTF-8 $env = $mp->unpackage(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Transfer-Encoding: 8bit --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary-- EOX # test to see how how many parts were found: ok(@{$mp->parts} == 1); # Tests to see if data extraction worked #@part_data = $mp->find_part( id => '' ); #ok($part_data[0] eq 'c'); # test to see if start parameter works if it doesn't point to root $env = $mp->unpackage(<<'EOX'); Content-Type: Multipart/Related; boundary=MIME_boundary; type="text/xml"; start="" SOAPAction: http://schemas.risky-stuff.com/Auto-Claim Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: c --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: --MIME_boundary-- EOX # test to see how how many parts were found: ok(@{$mp->parts} == 1); # Tests to see if data extraction worked #@part_data = $mp->find_part( id => '' ); #ok($part_data[0] eq 'c'); done_testing(); 1; SOAP-Lite-1.19/t/40-loopback.t000644 000770 000024 00000000400 12567356463 016020 0ustar00phredstaff000000 000000 use strict; use warnings; use Test; use SOAP::Lite; plan tests => 3; ok my $soap = SOAP::Lite->new( proxy => 'loopback://test', # outputxml => 1, ); ok my $som = $soap->call('test', SOAP::Data->name('test')->value(42)); ok $som->result() == 42;SOAP-Lite-1.19/t/Issues/000755 000770 000024 00000000000 12567356463 015101 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/release-kwalitee.t000644 000770 000024 00000000533 12567356463 017237 0ustar00phredstaff000000 000000 BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.11 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; SOAP-Lite-1.19/t/release-pod-syntax.t000644 000770 000024 00000000456 12567356463 017544 0ustar00phredstaff000000 000000 #!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use Test::More; use Test::Pod 1.41; all_pod_files_ok(); SOAP-Lite-1.19/t/SOAP/000755 000770 000024 00000000000 12567356463 014370 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Data.t000644 000770 000024 00000001455 12567356463 015433 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 33; #qw(no_plan); use_ok qw(SOAP::Lite); my @setter_from = qw( name value attr type actor encodingStyle prefix uri value signature ); my @option_from = qw( root mustUnderstand ); my $data = SOAP::Data->new(); isa_ok $data, 'SOAP::Data'; for my $method ( @option_from ) { no strict qw(refs); my $data = SOAP::Data->$method("foo_$method"); } for my $method ( @setter_from ) { no strict qw(refs); my $data = SOAP::Data->$method("foo_$method"); isa_ok $data, 'SOAP::Data'; is $data->$method(), "foo_$method", "SOAP::Data->$method() value"; $data = $data->$method("bar_$method"); is $data->$method(), "bar_$method", "\$data->$method() value"; } $data = SOAP::Data->set_value('foo'); is $data->value(), 'foo'; SOAP-Lite-1.19/t/SOAP/Lite/000755 000770 000024 00000000000 12567356463 015265 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Schema/000755 000770 000024 00000000000 12567356463 015570 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Serializer.t000644 000770 000024 00000004025 12567356463 016667 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 13; #qw(no_plan); use_ok qw(SOAP::Lite); my $serializer = SOAP::Serializer->new(); is $serializer->find_prefix('http://schemas.xmlsoap.org/soap/envelope/'), 'soap'; ok my $tag = $serializer->tag('fooxml', {}), 'serialize '; ok $tag = $serializer->tag('_xml', {}), 'serialize <_xml/>'; eval { $tag = $serializer->tag('---', {}); }; like $@, qr{^Element \s '---' \s can't \s be \s allowed}x, 'error on '; undef $@; eval { local $SIG{__WARN__} = sub { like $_[0], qr{^Element \s 'xmlfoo'}x; }; $tag = $serializer->tag('xmlfoo', {}); }; my $xml = $serializer->envelope('fault', faultstring => '>>> foo <<<'); like $xml, qr{\>\>\>}x, 'fault escaped OK'; unlike $xml, qr{\&gt;}x, 'fault escaped OK'; $xml = $serializer->envelope('response', foo => '>>> bar <<<'); like $xml, qr{\>\>\>}x, 'response escaped OK'; unlike $xml, qr{\&gt;}x, 'response escaped OK'; $xml = $serializer->envelope('method', foo => '>>> bar <<<'); like $xml, qr{\>\>\>}x, 'response escaped OK'; unlike $xml, qr{\&gt;}x, 'response escaped OK'; SKIP: { eval "require Test::Differences" or skip 'Cannot test without Test::Differences', 1; my $serializer = SOAP::Serializer->new()->autotype(1); my @som_data = ( SOAP::Data->name('Spec'), SOAP::Data->name('Version') ); my $complex_data = SOAP::Data->name( 'complex' ) ->attr( { attr => '123' } ) ->value( [ SOAP::Data->name('Spec'), SOAP::Data->name('Version') ] ); my $result = $serializer->encode_object($complex_data, 'test', undef, {}); # remove attributes created by autotype delete $result->[1]->{'soapenc:arrayType'}; delete $result->[1]->{'xsi:type'}; # turn off autotyping $serializer->autotype(0); # now we are able to compare both kinds of serialization Test::Differences::eq_or_diff( $result, $serializer->encode_object($complex_data, 'test', undef, {}), 'autotype off array serialization'); } SOAP-Lite-1.19/t/SOAP/Transport/000755 000770 000024 00000000000 12567356463 016364 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Transport/HTTP/000755 000770 000024 00000000000 12567356463 017143 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Transport/HTTP.t000644 000770 000024 00000007000 12567356463 017325 0ustar00phredstaff000000 000000 use strict; use Test::More qw(no_plan); use_ok qw(SOAP::Transport::HTTP); # Try mocking LWP::UserAgent to simulate sending something over the wire. # Skip if we don't have Test::MockObject. SKIP: { eval "require Test::MockObject" or skip 'Cannot simulate transport layer without Test::MockObject', 4; require HTTP::Response; my $mock = Test::MockObject->new(); $mock->fake_module( 'LWP::UserAgent', 'new' => sub { return bless {}, $_[0] }, 'agent' => sub { return $_[1] ? $_[0]->{ agent } = $_[1] : $_[0]->{ agent } }, # TODO return something meaningful 'request' => sub { return HTTP::Response->new(200, '200 OK'); }, ); my $client; ok $client = SOAP::Transport::HTTP::Client->new(), 'SOAP::Transport::HTTP::Client->new()'; my $response = $client->send_receive( endpoint => 'http://example.org', envelope => '' ); is $response, '', 'send_receive() returns ""'; is $client->code(), '200', 'after send_receive() code is 200'; is $client->message(), '200 OK', 'after send_receive() message is 200 OK'; } # client my $client; ok $client = SOAP::Transport::HTTP::Client->new(), 'SOAP::Transport::HTTP::Client->new()'; # just use twice to avoid warning undef $SOAP::Constants::PATCH_HTTP_KEEPALIVE; undef $SOAP::Constants::PATCH_HTTP_KEEPALIVE; ok $client = SOAP::Transport::HTTP::Client->new(), 'SOAP::Transport::HTTP::Client->new() - PATCH_KEEPALIVE = undef'; is $client, $client->new(), '$client->new() returns $client'; is $client->http_request('foo'), $client; is $client->http_request(), 'foo'; is $client->http_response('foo'), $client; is $client->http_response(), 'foo'; undef $client; # package SOAP::Transport::HTTP::Server; my $server; ok $server = SOAP::Transport::HTTP::Server->new(), 'SOAP::Transport::HTTP::Server->new()'; isa_ok $server, 'SOAP::Transport::HTTP::Server'; isa_ok $server, 'SOAP::Server'; is $server, $server->new(), '$server->new() returns $server'; like $server->product_tokens(), qr{SOAP::Lite}x; test_make_fault($server); undef $server; # package SOAP::Transport::HTTP::CGI; ok $server = SOAP::Transport::HTTP::CGI->new(); isa_ok $server, 'SOAP::Transport::HTTP::Server'; isa_ok $server, 'SOAP::Server'; test_make_fault($server); # package SOAP::Transport::HTTP::Daemon my $transport; ok $transport = SOAP::Transport::HTTP::Daemon->new(), 'SOAP::Transport::HTTP::Daemon->new()'; is $transport, $transport->new(), '$transport->new() is $transport'; is $transport->SSL(1), $transport; is $transport->SSL(), 1; is $transport->http_daemon_class(), 'HTTP::Daemon::SSL'; is $transport->SSL(0), $transport; is $transport->SSL(), 0; is $transport->http_daemon_class(), 'HTTP::Daemon'; undef $transport; # package SOAP::Transport::HTTP::Apache is untestable under mod_perl 1.x # due to missing exports in Apache::Constant SKIP: { eval "require FCGI;" or skip "Can't test without FCGI", 1; # package SOAP::Transport::HTTP::FCGI ok $transport = SOAP::Transport::HTTP::FCGI->new(), 'SOAP::Transport::HTTP::FCGI->new()'; undef $transport; } sub test_make_fault { my $server = shift; # try creating a fault my $request = HTTP::Request->new(); is $server->request($request), $server, '$server->request($request)'; is $server->request(), $request, '$server->request()'; $server->make_fault(); is $server->response()->code(), 500, 'fault response code is 500'; like $server->response->content(), qr{\bFault\b}x, 'Fault content'; } SOAP-Lite-1.19/t/SOAP/Transport/IO.t000644 000770 000024 00000001362 12567356463 017062 0ustar00phredstaff000000 000000 use strict; use Test::More qw(no_plan); use_ok qw(SOAP::Transport::IO); my $server; ok $server = SOAP::Transport::IO::Server->new(), 'new()'; SKIP: { eval "require IO::Scalar" or skip "cannot test Scalar IO without IO::Scalar", 1; my $input = q{}; my $input_handle = IO::Scalar->new(\$input); ok $server->in($input_handle); eval { $server->handle() }; ok !$@; } is $server, $server->new(), '$server->new() is $server'; my $name = __FILE__; $name =~s{ t $}{xml}x; ok $server = SOAP::Transport::IO::Server->in($name), 'in($filename)'; eval { $server->handle() }; ok !$@; ok $server->in(undef), 'in(undef)'; ok $server->out(undef), 'in(undef)'; # TODO: add some content to IO.xml and run it through a SOAP server... SOAP-Lite-1.19/t/SOAP/Transport/IO.xml000644 000770 000024 00000000000 12567356463 017403 0ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Transport/LOCAL.t000644 000770 000024 00000001411 12567356463 017400 0ustar00phredstaff000000 000000 use strict; use Test::More qw(no_plan); use_ok qw(SOAP::Transport::LOCAL); my $transport; ok $transport = SOAP::Transport::LOCAL::Client->new(); # call methods if known, pass through the rest as arguments # # ->new calls the methods $self->endpoint('local:main') and $self->options({}), # and calls SUPER::new("foo"); # ok $transport = SOAP::Transport::LOCAL::Client->new(endpoint => 'local:main', options => [], "foo"); is $transport, $transport->new() , '$transport->new() returns $transport'; use_ok qw(SOAP::Lite); my $soap = SOAP::Lite->proxy('local:main'); $soap->transport()->dispatch_to('main'); my $som = $soap->call('test'); die $som->fault()->{ faultstring } if $som->fault(); is $som->result, 'Zumsel', 'result is Zumsel'; sub test { return "Zumsel"; } SOAP-Lite-1.19/t/SOAP/Transport/LOOPBACK.t000644 000770 000024 00000000711 12567356463 017742 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More qw(no_plan); use_ok qw(SOAP::Transport::LOOPBACK); my $transport; ok $transport = SOAP::Transport::LOOPBACK::Client->new(); is $transport, $transport->new() , '$transport->new() returns $transport'; use_ok qw(SOAP::Lite); my $soap = SOAP::Lite->proxy('loopback:main'); my $som = $soap->call('test', 'Zumsel'); die $som->fault()->{ faultstring } if $som->fault(); is $som->result, 'Zumsel', 'result is Zumsel'; SOAP-Lite-1.19/t/SOAP/Transport/MAILTO.t000644 000770 000024 00000002557 12567356463 017547 0ustar00phredstaff000000 000000 use strict; use Test::More; eval { require Test::MockObject } or plan skip_all => 'Cannot test without Test::MockObject'; plan tests => 15; my $mock = Test::MockObject->new(); $mock->fake_module('MIME::Lite', new => sub { my $class = shift; my %arg_of = @_; return bless { %arg_of }, $class; }, send => sub {}, replace => sub {}, add => sub {}, as_string => sub {}, ); use_ok qw(SOAP::Transport::MAILTO); my $transport; ok $transport = SOAP::Transport::MAILTO::Client->new( endpoint => 'mailto:test@example.org' ), 'new( endpoint => mailto:test@example.org'; is $transport, $transport->new() , '$transport->new() returns $transport'; test_send_receive($transport); $transport = SOAP::Transport::MAILTO::Client->new( smtp => 'smtp.example.org', From => 'test@example.org', 'Reply-To' => 'test@example.org', Subject => 'MAILTO.t', Encoding => 'Quoted-printable', ); test_send_receive($transport, endpoint => 'mailto:arg_of@example.org'); test_send_receive($transport, endpoint => 'mailto:'); sub test_send_receive { my $transport = shift; my %arg_of = @_; $transport->send_receive(%arg_of); ok $transport->is_success(), 'is_success() is true'; ok ! $transport->code(), 'code() is false'; ok ! $transport->message(), 'message() is false'; ok ! $transport->status(), 'status() is false'; }SOAP-Lite-1.19/t/SOAP/Transport/POP3.t000644 000770 000024 00000000375 12567356463 017277 0ustar00phredstaff000000 000000 use strict; use Test::More qw(no_plan); use_ok qw(SOAP::Transport::POP3); my $uri = 'pop://user@mail.example.org'; my $server; #ok $server = SOAP::Transport::POP3::Server->new( # # $uri #); #is $server->new(), $server, '$server->new() is $server';SOAP-Lite-1.19/t/SOAP/Transport/TCP.t000644 000770 000024 00000001004 12567356463 017172 0ustar00phredstaff000000 000000 use strict; use Test::More tests => 7; use_ok qw(SOAP::Transport::TCP); my $transport; ok $transport = SOAP::Transport::TCP::Client->new( endpoint => 'tcp://127.0.0.1:0' ), 'new()'; is $transport, $transport->new(), '$transport->new() returns $transport'; { no warnings qw(uninitialized); $transport->send_receive(); } ok ! $transport->is_success(), 'is_success() is false'; like $transport->status(), qr{ Cannot }x; like $transport->message(), qr{ Cannot }x; like $transport->code(), qr{ Cannot }x; SOAP-Lite-1.19/t/SOAP/Transport/HTTP/CGI/000755 000770 000024 00000000000 12567356463 017545 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Transport/HTTP/CGI.t000644 000770 000024 00000003211 12567356463 017727 0ustar00phredstaff000000 000000 package SOAP::Transport::CGI_TEST::Client; use strict; use warnings; use IPC::Open2; use File::Basename qw(dirname); # make a send_receive which performs an open2, much like a web server # connects to STDIN and STDOUT... sub send_receive { my ($self, %parameters) = @_; my ($context, $envelope, $endpoint, $action, $encoding, $parts) = @parameters{qw(context envelope endpoint action encoding parts)}; # safety measure: Die if we hang $SIG{ALRM} = sub { die "did not return" }; alarm(3); my $perl = $^X; my $dir = dirname(__FILE__); my $cmd = "$dir/CGI/test_server.pl"; $ENV{'CONTENT_LENGTH'} = length($envelope); $ENV{'REQUEST_METHOD'} = 'POST'; my($child_out, $child_in); my $pid = open2($child_out, $child_in, $perl, '-Mblib', $cmd); die "Cannot open $cmd: $!" if not ($pid); print $child_in $envelope; print $child_in "\n"; close $child_in; my @result = <$child_out>; close $child_out; alarm(0); return $result[-1]; } package main; no strict; no warnings qw(redefine once uninitialized); use Test::More; use SOAP::Lite; # +trace; my $soap = SOAP::Lite->new()->proxy('http://'); # make override send_receive in CGI client *SOAP::Transport::HTTP::Client::send_receive = \&SOAP::Transport::CGI_TEST::Client::send_receive; my $som = $soap->call('test'); my $result = $som->result; if ($] >= 5.008) { ok utf8::is_utf8($result), 'return utf8 string'; { is $result, 'Уœberall', 'utf8 content: ' . $result; } } else { eval { use bytes; is length $result, 8, "length of >$result< is 8 due to wide character"; } } done_testing(); SOAP-Lite-1.19/t/SOAP/Transport/HTTP/CGI/test_server.pl000755 000770 000024 00000000534 12567356463 022454 0ustar00phredstaff000000 000000 package main; use strict; use warnings; use utf8; use Encode; use SOAP::Lite; use SOAP::Transport::HTTP; my $soap = SOAP::Transport::HTTP::CGI->new( dispatch_to => 'main' ); $soap->handle(); sub test { my ($self, $envelope) = @_; return SOAP::Data->name('testResult')->value(Encode::encode_utf8('Уœberall'))->type('string'); } 1;SOAP-Lite-1.19/t/SOAP/Schema/WSDL.t000644 000770 000024 00000000672 12567356463 016533 0ustar00phredstaff000000 000000 use Test::More qw(no_plan); use SOAP::Lite; ok my $schema = SOAP::Schema::WSDL->new(); my $element = SOAP::Custom::XML::Data -> SOAP::Data::name('schema') -> set_value( SOAP::Custom::XML::Data -> SOAP::Data::name('complexType') ->attr({ name => 'test' }) ); my @result = SOAP::Schema::WSDL::parse_schema_element( $element ); is @result, 0, 'empty elements on empty complexType' SOAP-Lite-1.19/t/SOAP/Lite/Deserializer/000755 000770 000024 00000000000 12567356463 017707 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/t/SOAP/Lite/Packager.t000644 000770 000024 00000000513 12567356463 017166 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 4; #qw(no_plan); use_ok qw(SOAP::Lite::Packager); ok SOAP::Lite::Packager->new(), 'SOAP::Lite::Packager->new()'; ok my $mime = SOAP::Lite::Packager::MIME->new(), 'SOAP::Lite::Packager::MIME->new()'; my $entity = bless {}, 'MIME::Entity'; ok $mime->is_supported_part($entity); SOAP-Lite-1.19/t/SOAP/Lite/Deserializer/XMLSchema1999.t000644 000770 000024 00000003214 12567356463 022211 0ustar00phredstaff000000 000000 use Test::More; plan tests => 42; use_ok qw(SOAP::Lite::Deserializer::XMLSchema1999); is SOAP::Lite::Deserializer::XMLSchema1999->anyTypeValue(), 'ur-type', 'anyTypeValue'; is SOAP::Lite::Deserializer::XMLSchema1999->as_boolean('false'), 0, 'as_boolean("false")'; is SOAP::Lite::Deserializer::XMLSchema1999->as_boolean('true'), 1, 'as_boolean("false")'; eval {SOAP::Lite::Deserializer::XMLSchema1999->as_boolean('foobar') }; ok $@, 'died on illegal boolean value'; undef $@; is ord SOAP::Lite::Deserializer::XMLSchema1999->as_hex('FF'), 255, 'as_hex(FF)'; is ord SOAP::Lite::Deserializer::XMLSchema1999->as_hex('65'), 101, 'as_hex(65)'; is SOAP::Lite::Deserializer::XMLSchema1999->as_hex('4142'), 'AB', 'as_hex(4142)'; is SOAP::Lite::Deserializer::XMLSchema1999->as_ur_type('4242'), '4242', 'as_ur_type(4242)'; is SOAP::Lite::Deserializer::XMLSchema1999->as_undef('true'), '1', 'as_undef("true")'; is SOAP::Lite::Deserializer::XMLSchema1999->as_undef('false'), '0', 'as_undef("false")'; eval {SOAP::XMLSchema1999::Deserializer->as_undef('ZUMSL')}; ok $@, 'died on illegal nil value'; undef $@; for (qw( string float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language) ) { no strict qw(refs); my $method = "as_$_"; is SOAP::Lite::Deserializer::XMLSchema1999->$method('something nice'), 'something nice', "$method('something nice')"; } SOAP-Lite-1.19/t/SOAP/Lite/Deserializer/XMLSchema2001.t000644 000770 000024 00000002554 12567356463 022166 0ustar00phredstaff000000 000000 use Test::More tests => 42; use_ok qw(SOAP::Lite::Deserializer::XMLSchema2001); is SOAP::Lite::Deserializer::XMLSchema2001->anyTypeValue(), 'anyType', 'anyTypeValue'; is SOAP::Lite::Deserializer::XMLSchema2001->as_boolean('false'), 0, 'as_boolean("false")'; is ord SOAP::Lite::Deserializer::XMLSchema2001->as_hexBinary('FF'), 255, 'as_hex(FF)'; is ord SOAP::Lite::Deserializer::XMLSchema2001->as_hexBinary('65'), 101, 'as_hex(65)'; is SOAP::Lite::Deserializer::XMLSchema2001->as_hexBinary('4142'), 'AB', 'as_hex(4142)'; #is SOAP::Lite::Deserializer::XMLSchema2001->as_ur_type('4242'), # '4242', 'as_ur_type(4242)'; is SOAP::Lite::Deserializer::XMLSchema2001->as_undef('true'), '1', 'as_undef("true")'; is SOAP::Lite::Deserializer::XMLSchema2001->as_undef('false'), '0', 'as_undef("false")'; for (qw( string anyType anySimpleType float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time dateTime QName) ) { no strict qw(refs); my $method = "as_$_"; is SOAP::Lite::Deserializer::XMLSchema2001->$method('something nice'), 'something nice', "$method('something nice')"; } SOAP-Lite-1.19/t/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.t000644 000770 000024 00000001635 12567356463 022646 0ustar00phredstaff000000 000000 use Test::More tests => 35; use_ok qw(SOAP::Lite::Deserializer::XMLSchemaSOAP1_1); is SOAP::Lite::Deserializer::XMLSchemaSOAP1_1->anyTypeValue(), 'ur-type', 'anyTypeValue'; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_1->as_boolean('false'), 0, 'as_boolean("false")'; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_1->as_ur_type('4242'), '4242', 'as_ur_type(4242)'; for (qw( string float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language anyURI ) ) { no strict qw(refs); my $method = "as_$_"; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_1->$method('something nice'), 'something nice', "$method('something nice')"; } SOAP-Lite-1.19/t/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.t000644 000770 000024 00000002001 12567356463 022633 0ustar00phredstaff000000 000000 use Test::More tests => 37; use_ok qw(SOAP::Lite::Deserializer::XMLSchemaSOAP1_2); is SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->anyTypeValue(), 'anyType', 'anyTypeValue'; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->as_boolean('true'), 1, 'as_boolean("true")'; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->as_boolean('false'), 0, 'as_boolean("false")'; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->as_anyType('4242'), '4242', 'as_anyType(4242)'; for (qw( string float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration anyURI language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time dateTime ) ) { no strict qw(refs); my $method = "as_$_"; is SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->$method('something nice'), 'something nice', "$method('something nice')"; } SOAP-Lite-1.19/t/Issues/recursion.pl000644 000770 000024 00000002063 12567356463 017450 0ustar00phredstaff000000 000000 use strict; use warnings; ## disable perl's warning mechanism no warnings 'recursion'; use B 'svref_2object'; use Symbol 'qualify_to_ref'; sub change_depth_warn { my($subname, $limit) = @_; my $subref = \&$subname; my $gv = svref_2object($subref)->GV; my $lineno = 0; no warnings 'redefine'; *{ qualify_to_ref $subname } = sub { if( $gv->CV->DEPTH % $limit == 0 ) { $lineno = do { my $i = 0; 1 while caller $i++; (caller($i - 2))[2] } unless $lineno; warn sprintf "Deep recursion on subroutine '%s' at %s line %d.\n", join('::', $gv->STASH->NAME, $gv->NAME), $0, $lineno; } &$subref(@_); }; } my $cnt = 0; sub foo { &foo while $cnt++ < $_[0] } my $maxdepth = 10; my $recdepth = 30; change_depth_warn('foo', $maxdepth); printf "calling foo(), expecting %d warnings ...\n", $recdepth / $maxdepth; foo($recdepth); SOAP-Lite-1.19/t/Issues/rt15176.t000644 000770 000024 00000000373 12567356463 016322 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 1; use SOAP::Lite; # When setting a value that contains wide characters (> U+00ff), it tries to encode as Base64 but then fails eval { my $header = SOAP::Header->value("\N{U+00ff}"); }; ok (!@$); SOAP-Lite-1.19/t/Issues/rt53375.t000644 000770 000024 00000001024 12567356463 016317 0ustar00phredstaff000000 000000 use Test::More tests => 4; use XML::Parser::Lite; my $comment = ''; my $parser = new XML::Parser::Lite( Handlers => { Comment => sub { $comment .= $_[1]; }, } ); my $xml = <<'EOT'; EOT eval { $parser->parse($xml); }; ok(! $@); is($comment, ' seed-viewer '); $comment = ''; $xml = <<'EOT'; EOT eval { $parser->parse($xml); }; ok(! $@); is($comment, ' seed_viewer '); SOAP-Lite-1.19/t/Issues/rt70329.t000644 000770 000024 00000001451 12567356463 016321 0ustar00phredstaff000000 000000 #!/usr/bin/perl # # Tests the error described in rt.cpan.org #70329 # # The error came from handling multiref ids, and unconditionally # overwriting the id attribute # # use Test::More tests => 1; use 5.006; use strict; use warnings; use SOAP::Lite +trace => [ 'debug' ]; my $req1 = SOAP::Lite->new( readable => 1, autotype => 0, proxy => 'LOOPBACK://', ); # req1 does not generate the XML attribute it just generates # my $content = SOAP::Data->new( name => 'item', attr => { "id" => 1 }, value => \SOAP::Data->new( name => 'foo', value => 1, ), ); my $response = $req1->requestMessage(\$content); my $response_item = $response->dataof("//item"); is($content->attr->{ id }, $response_item->attr->{ id }); SOAP-Lite-1.19/t/Issues/rt70381.t000644 000770 000024 00000002173 12567356463 016321 0ustar00phredstaff000000 000000 use Test::More; if (not $ENV{PROFILE_PERFORMANCE}) { plan ('skip_all' => 'This is a performance test. Set PROFILE_PERFORMANCE env var to a true value to run'); exit 1; } plan qw(no_plan); use SOAP::Lite; my $content = SOAP::Data->name('test')->uri('http://example.org') ->value([ \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), \SOAP::Data->name('level1')->value('value1')->uri('http:/example.org'), ]); my $soap = SOAP::Lite->proxy('loopback://'); for (1..100) { my $response = $soap->call('test', \$content); } SOAP-Lite-1.19/t/Issues/rt72836.t000644 000770 000024 00000004723 12567356463 016333 0ustar00phredstaff000000 000000 use strict; use warnings; package DoThingsWithStuff; use SOAP::Lite; our @ISA = qw(SOAP::Server::Parameters); sub new { my ( $class ) = @_; my $self = bless {}, ref($class) || $class; $self; } sub do_something { my $self = shift; my $som = pop; #$som->context->serializer->encodingStyle(""); # does adding this affect the fix? return SOAP::Data->name(wotsit => "doofer"); } package main; use Test::More; use SOAP::Lite; eval { require Test::XML } or plan skip_all => 'Cannot test without Test::XML'; my $req11 = 'things'; my $req12 = 'things'; my $expected_11 = 'doofer'; my $expected_12 = 'doofer'; my $t = DoThingsWithStuff->new; my $s = SOAP::Server->new; $s->dispatch_with({ "urn:Something" => $t }); my $res_11_1 = $s->handle($req11); Test::XML::is_xml($res_11_1, $expected_11, "Got correct SOAP 1.1 response"); my $res_12 = $s->handle($req12); Test::XML::is_xml($res_12, $expected_12, "Got correct SOAP 1.2 response"); my $res_11_2 = $s->handle($req11); Test::XML::is_xml($res_11_2, $expected_11, "Got correct SOAP 1.1 response after processing a SOAP 1.2 request"); done_testing; SOAP-Lite-1.19/t/Issues/rt74029.t000644 000770 000024 00000001721 12567356463 016322 0ustar00phredstaff000000 000000 #!/usr/bin/perl use Test::More skip_all => 'not fixed yet'; exit; use Data::Dumper; our %stack = (); use SOAP::Lite +trace => 'all'; use Storable qw(nstore retrieve); use B 'svref_2object'; use Symbol 'qualify_to_ref'; sub change_depth_warn { my($subname, $limit) = @_; my $subref = \&$subname; my $gv = svref_2object($subref)->GV; my $lineno = 0; no warnings 'redefine'; *{ qualify_to_ref $subname } = sub { if( $gv->CV->DEPTH % $limit == 0 ) { $lineno = do { my $i = 0; 1 while caller $i++; (caller($i - 2))[2] } unless $lineno; die sprintf "Deep recursion on subroutine '%s' at %s line %d.\n", join('::', $gv->STASH->NAME, $gv->NAME), $0, $lineno; } &$subref(@_); }; } my $obj = retrieve("$0.stored"); print Dumper $obj; change_depth_warn("SOAP::Serializer::encode_object", 100); my $ser = SOAP::Serializer->new( readable => 1); $ser->autotype(0); print $ser->freeform($obj); ok(1); done_testing(); SOAP-Lite-1.19/t/Issues/rt74029.t.stored000644 000770 000024 00000004567 12567356463 017634 0ustar00phredstaff000000 000000 pst0)Service::TestHostService::FCM::DB2ACS::PS;Service::StorageService::FlashCopyStorageService::DSService 0Service::StorageService::StorageVolume::DSVolumestoragestoragestoragestoragestoragestoragestoragestoragestoragestoragestoragestorage targetVolumesstoragestoragestoragestorage sourceVolumesOperatingSystem::Unix::AixLogger::TCTLoggerlogger+VolumeManager::LogicalVolumeManager::AIXLVMvolumes cacheResults8VolumeManager::LogicalVolumeManager::AIXLVM::VolumeGroup1 1370370102FvolumesmirroringVolumes:VolumeManager::LogicalVolumeManager::AIXLVM::LogicalVolumeFvg7VolumeManager::LogicalVolumeManager::AIXLVM::FileSystemOlv<logger fileSystem1 1370370102Fvolumes<logger lvDS0log1Fvg>VolumeManager::LogicalVolumeManager::AIXLVM::FileSystem::LogFSZlv<logger fileSystem1 1370370102Fvolumes<logger lvDS0log1loglogicalVolumes<logger> volumeManager DS0log1vg. 1370370102EvolumesmirroringVolumesgvg plv<logger fileSystem. 1370370102Evolumes<logger lvDS0data1loggvg{lv<logger fileSystem. 1370370102Evolumes<logger lvDS0data1logicalVolumes<logger> volumeManager DS0data1vg volumeGroups<logger volumeManageroperatingSystem<logger  #&) targetSetsstorages:operatingSystem"Service::FCMService::DB2ACSServicetestHost:operatingSystemService::DBService::DB2Service *** localNodes *** ***backupTimestamps:operatingSystemnodes<loggerinstanceUserInfo dbService<loggerservice<loggerSOAP-Lite-1.19/t/Issues/rt74308.t000644 000770 000024 00000000220 12567356463 016313 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 1; use SOAP::Lite; eval { my $soap = SOAP::Lite->service("file:$0.wsdl"); }; ok (! $@); SOAP-Lite-1.19/t/Issues/rt74308.t.wsdl000644 000770 000024 00000013020 12567356463 017265 0ustar00phredstaff000000 000000 SimpleType Test SimpleType Union test SimpleType Test SimpleType Union test Test-Methode Test-Methode SOAP-Lite-1.19/t/Issues/rt75169.t000644 000770 000024 00000000600 12567356463 016323 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More; use SOAP::Lite; use utf8; use Encode; my $data = "УМ"; my $soap = SOAP::Serializer->new(); $soap->autotype(0); my $xml = $soap->envelope( freeform => "$data" ); my ( $cycled ) = values %{ SOAP::Deserializer->deserialize( $xml )->body }; is( length( $data ), length( $cycled ), "UTF-8 string is the same after serializing" ); done_testing; SOAP-Lite-1.19/t/Issues/rt78588.t000644 000770 000024 00000000646 12567356463 016345 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More; use SOAP::Lite; use utf8; my $data = "mУМ\x{2013}"; my $serializer = SOAP::Serializer->new(); $serializer->typelookup()->{ base64Binary } = [ 10, sub { 0 }, undef]; my $xml = $serializer->envelope( freeform => $data ); my ( $cycled ) = values %{ SOAP::Deserializer->deserialize( $xml )->body }; is( $data, $cycled, "UTF-8 string is the same after serializing" ); done_testing; SOAP-Lite-1.19/t/Issues/rt88915.t000644 000770 000024 00000000323 12567356463 016330 0ustar00phredstaff000000 000000 use strict; use warnings; use Test::More tests => 1; use Test::Warn; warnings_are { eval q| use SOAP::Lite +trace => [ transport => sub { } ]; |; } [], "No warnings found when importing +trace with subs"; SOAP-Lite-1.19/lib/Apache/000755 000770 000024 00000000000 12567356463 015312 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/lib/SOAP/000755 000770 000024 00000000000 12567356463 014673 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/lib/SOAP/Client.pod000644 000770 000024 00000005704 12567356463 016623 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Client - exists purely as a superclass for client classes declared by the various SOAP::Lite transport modules. =head1 DESCRIPTION The SOAP::Client class exists purely as a superclass for client classes declared by the various SOAP::Lite transport modules. The methods it provides are all simple accessors; they return the current value when called with no arguments or set the attribute value and return the object reference when called with an argument. These attributes include: =head1 METHODS =over =item code, message, status Stores the response code, message, and status from the most-recent send attempt. For some protocols, such as FTP, the same value is used for all three because of the lack of finer-grained detail (the default is to ensure that all three attributes contain data, even if redundant). Other protocols (such as HTTP) have distinct values in each. =item endpoint Identifies the current endpoint to which messages are being sent. This should match the value of the transport method from the L class, but setting this doesn't propagate to the transport object. It is better to use the transport object (or the shortcut via the SOAP::Lite object itself) when setting this. =item is_success The success or failure of the most-recent transmission is noted here as a boolean value. =item options The options attribute keeps a hash-table reference of additional options and their values. At present, only one option is used by any of the transport modules: =over =item compress_threshold The value of this option should be a numerical value. If set, and if the Compress::Zlib library is available, messages whose size in bytes exceeds this value will be compressed before sending. Both ends of the conversation must have it enabled. =back Other options may be defined using this mechanism. Note that setting the options using this accessor requires a full hash reference be passed. To set just one or a few values, consider retrieving the current reference value and using it to set the key(s). =back =head1 SEE ALSO L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Constants.pm000644 000770 000024 00000020223 12567356463 017204 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Constants; use strict; use SOAP::Lite; our $VERSION = 1.17; use constant URI_1999_SCHEMA_XSD => "http://www.w3.org/1999/XMLSchema"; use constant URI_1999_SCHEMA_XSI => "http://www.w3.org/1999/XMLSchema-instance"; use constant URI_2000_SCHEMA_XSD => "http://www.w3.org/2000/10/XMLSchema"; use constant URI_2000_SCHEMA_XSI => "http://www.w3.org/2000/10/XMLSchema-instance"; use constant URI_2001_SCHEMA_XSD => "http://www.w3.org/2001/XMLSchema"; use constant URI_2001_SCHEMA_XSI => "http://www.w3.org/2001/XMLSchema-instance"; use constant URI_LITERAL_ENC => ""; use constant URI_SOAP11_ENC => "http://schemas.xmlsoap.org/soap/encoding/"; use constant URI_SOAP11_ENV => "http://schemas.xmlsoap.org/soap/envelope/"; use constant URI_SOAP11_NEXT_ACTOR => "http://schemas.xmlsoap.org/soap/actor/next"; use constant URI_SOAP12_ENC => "http://www.w3.org/2003/05/soap-encoding"; use constant URI_SOAP12_ENV => "http://www.w3.org/2003/05/soap-envelope"; use constant URI_SOAP12_NOENC => "http://www.w3.org/2003/05/soap-envelope/encoding/none"; use constant URI_SOAP12_NEXT_ACTOR => "http://www.w3.org/2003/05/soap-envelope/role/next"; use vars qw($NSMASK $ELMASK); $NSMASK = '[a-zA-Z_:][\w.\-:]*'; $ELMASK = '^(?![xX][mM][lL])[a-zA-Z_][\w.\-]*$'; use vars qw($NEXT_ACTOR $NS_ENV $NS_ENC $NS_APS $FAULT_CLIENT $FAULT_SERVER $FAULT_VERSION_MISMATCH $HTTP_ON_FAULT_CODE $HTTP_ON_SUCCESS_CODE $FAULT_MUST_UNDERSTAND $NS_XSI_ALL $NS_XSI_NILS %XML_SCHEMAS $DEFAULT_XML_SCHEMA $DEFAULT_HTTP_CONTENT_TYPE $SOAP_VERSION %SOAP_VERSIONS $WRONG_VERSION $NS_SL_HEADER $NS_SL_PERLTYPE $PREFIX_ENV $PREFIX_ENC $DO_NOT_USE_XML_PARSER $DO_NOT_CHECK_MUSTUNDERSTAND $DO_NOT_USE_CHARSET $DO_NOT_PROCESS_XML_IN_MIME $DO_NOT_USE_LWP_LENGTH_HACK $DO_NOT_CHECK_CONTENT_TYPE $MAX_CONTENT_SIZE $PATCH_HTTP_KEEPALIVE $DEFAULT_PACKAGER @SUPPORTED_ENCODING_STYLES $OBJS_BY_REF_KEEPALIVE $DEFAULT_CACHE_TTL %XML_SCHEMA_OF $HAS_ENCODE ); $FAULT_CLIENT = 'Client'; $FAULT_SERVER = 'Server'; $FAULT_VERSION_MISMATCH = 'VersionMismatch'; $FAULT_MUST_UNDERSTAND = 'MustUnderstand'; $HTTP_ON_SUCCESS_CODE = 200; # OK $HTTP_ON_FAULT_CODE = 500; # INTERNAL_SERVER_ERROR @SUPPORTED_ENCODING_STYLES = ( URI_LITERAL_ENC,URI_SOAP11_ENC,URI_SOAP12_ENC,URI_SOAP12_NOENC ); $WRONG_VERSION = 'Wrong SOAP version specified.'; $SOAP_VERSION = '1.1'; %SOAP_VERSIONS = ( 1.1 => { NEXT_ACTOR => URI_SOAP11_NEXT_ACTOR, NS_ENV => URI_SOAP11_ENV, NS_ENC => URI_SOAP11_ENC, DEFAULT_XML_SCHEMA => URI_2001_SCHEMA_XSD, DEFAULT_HTTP_CONTENT_TYPE => 'text/xml', }, 1.2 => { NEXT_ACTOR => URI_SOAP12_NEXT_ACTOR, NS_ENV => URI_SOAP12_ENV, NS_ENC => URI_SOAP12_ENC, DEFAULT_XML_SCHEMA => URI_2001_SCHEMA_XSD, DEFAULT_HTTP_CONTENT_TYPE => 'application/soap+xml', }, ); # schema namespaces %XML_SCHEMAS = ( # The '()' is necessary to put constants in SCALAR form URI_1999_SCHEMA_XSD() => 'SOAP::XMLSchema1999', URI_2001_SCHEMA_XSD() => 'SOAP::XMLSchema2001', URI_SOAP11_ENC() => 'SOAP::XMLSchemaSOAP1_1', URI_SOAP12_ENC() => 'SOAP::XMLSchemaSOAP1_2', ); # schema namespaces %XML_SCHEMA_OF = ( # The '()' is necessary to put constants in SCALAR form URI_1999_SCHEMA_XSD() => 'XMLSchema1999', URI_2001_SCHEMA_XSD() => 'XMLSchema2001', URI_SOAP11_ENC() => 'XMLSchemaSOAP1_1', URI_SOAP12_ENC() => 'XMLSchemaSOAP1_2', ); $NS_XSI_ALL = join join('|', map {"$_-instance"} grep {/XMLSchema/} keys %XML_SCHEMAS), '(?:', ')'; $NS_XSI_NILS = join join('|', map { my $class = $XML_SCHEMAS{$_} . '::Serializer'; "\{($_)-instance\}" . $class->nilValue } grep {/XMLSchema/} keys %XML_SCHEMAS), '(?:', ')'; # ApacheSOAP namespaces $NS_APS = 'http://xml.apache.org/xml-soap'; # SOAP::Lite namespace $NS_SL_HEADER = 'http://namespaces.soaplite.com/header'; $NS_SL_PERLTYPE = 'http://namespaces.soaplite.com/perl'; # default prefixes $PREFIX_ENV = 'soap'; $PREFIX_ENC = 'soapenc'; # others $DO_NOT_USE_XML_PARSER = 0; $DO_NOT_CHECK_MUSTUNDERSTAND = 0; $DO_NOT_USE_CHARSET = 0; $DO_NOT_PROCESS_XML_IN_MIME = 0; $DO_NOT_USE_LWP_LENGTH_HACK = 0; $DO_NOT_CHECK_CONTENT_TYPE = 0; $PATCH_HTTP_KEEPALIVE = 1; $OBJS_BY_REF_KEEPALIVE = 600; # seconds # TODO - use default packager constant somewhere $DEFAULT_PACKAGER = "SOAP::Packager::MIME"; $DEFAULT_CACHE_TTL = 0; $HAS_ENCODE = eval "require Encode; 1"; 1; __END__ =pod =head1 NAME SOAP::Constants - SOAP::Lite provides several variables to allows programmers and users to modify the behavior of SOAP::Lite in specific ways. =head1 DESCRIPTION A number of "constant" values are provided by means of this namespace. The values aren't constants in the strictest sense; the purpose of the values detailed here is to allow the application to change them if it desires to alter the specific behavior governed. =head1 CONSTANTS =head2 $DO_NOT_USE_XML_PARSER The SOAP::Lite package attempts to locate and use the L package, falling back on an internal, pure-Perl parser in its absence. This package is a fast parser, based on the Expat parser developed by James Clark. If the application sets this value to 1, there will be no attempt to locate or use XML::Parser. There are several reasons you might choose to do this. If the package will never be made available, there is no reason to perform the test. Setting this parameter is less time-consuming than the test for the package would be. Also, the XML::Parser code links against the Expat libraries for the C language. In some environments, this could cause a problem when mixed with other applications that may be linked against a different version of the same libraries. This was once the case with certain combinations of Apache, mod_perl and XML::Parser. =head2 $DO_NOT_USE_CHARSET Unless this parameter is set to 1, outgoing Content-Type headers will include specification of the character set used in encoding the message itself. Not all endpoints (client or server) may be able to properly deal with that data on the content header, however. If dealing with an endpoint that expects to do a more literal examination of the header as whole (as opposed to fully parsing it), this parameter may prove useful. =head2 $DO_NOT_CHECK_CONTENT_TYPE The content-type itself for a SOAP message is rather clearly defined, and in most cases, an application would have no reason to disable the testing of that header. This having been said, the content-type for SOAP 1.2 is still only a recommended draft, and badly coded endpoints might send valid messages with invalid Content-Type headers. While the "right" thing to do would be to reject such messages, that isn't always an option. Setting this parameter to 1 allows the toolkit to skip the content-type test. =head2 $PATCH_HTTP_KEEPALIVE SOAP::Lite's HTTP Transport module attempts to provide a simple patch to LWP::Protocol to enable HTTP Keep Alive. By default, this patch is turned off, if however you would like to turn on the experimental patch change the constant like so: $SOAP::Constants::PATCH_HTTP_KEEPALIVE = 1; =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Data.pod000644 000770 000024 00000023063 12567356463 016254 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Data - this class provides the means by which to explicitly manipulate and control all aspects of the way in which Perl data gets expressed as SOAP data entities. =head1 DESCRIPTION The SOAP::Data class provides the means by which to explicitly manipulate and control all aspects of the way in which Perl data gets expressed as SOAP data entities. Most of the methods are accessors, which like those in SOAP::Lite are designed to return the current value if no new one is passed, while returning the object reference otherwise (allowing for chained method calls). Note that most accessors (except value) accept a new value for the data object as a second argument. =head1 METHODS =over =item new(optional key/value pairs) $obj = SOAP::Data->new(name => 'idx', value => 5); This is the class constructor. Almost all of the attributes related to the class may be passed to the constructor as key/value pairs. This method isn't often used directly because SOAP::Data objects are generally created for temporary use. It is available for those situations that require it. =item name(new name, optional value) $obj->name('index'); Gets or sets the current value of the name, as the object regards it. The name is what the serializer will use for the tag when generating the XML for this object. It is what will become the accessor for the data element. Optionally, the object's value may be updated if passed as a second argument. =item type(new type, optional value) $obj->type('int'); Gets or sets the type associated with the current value in the object. This is useful for those cases where the SOAP::Data object is used to explicitly specify the type of data that would otherwise be interpreted as a different type completely (such as perceiving the string 123 as an integer, instead). Allows the setting of the object's value, if passed as a second argument to the method. =item uri(new uri, optional value) $obj->uri('http://www.perl.com/SOAP'); Gets or sets the URI that will be used as the namespace for the resulting XML entity, if one is desired. This doesn't set the label for the namespace. If one isn't provided by means of the prefix method, one is generated automatically when needed. Also allows the setting of the object's value, if passed as a second argument to the method. =item prefix(new prefix, optional value) $obj->prefix('perl'); Provides the prefix, or label, for use when associating the data object with a specific namespace. Also allows the setting of the object's value, if passed as a second argument to the method. =item attr(hash reference of attributes, optional value) $obj->attr({ attr1 => 'value' }); Allows for the setting of arbitrary attributes on the data object. Keep in mind the requirement that any attributes not natively known to SOAP must be namespace-qualified. Also allows the setting of the object's value, if passed as a second argument to the method. =item value(new value) $obj->value(10); Fetches the current value encapsulated by the object, or explicitly sets it. =back The last four methods are convenience shortcuts for the attributes that SOAP itself supports. Each also permits inclusion of a new value, as an optional second argument. =over =item actor(new actor, optional value) $obj->actor($new_actor_name); Gets or sets the value of the actor attribute; useful only when the object generates an entity for the message header. =item mustUnderstand(boolean, optional value) $obj->mustUnderstand(0); Manipulates the mustUnderstand attribute, which tells the SOAP processor whether it is required to understand the entity in question. =item encodingStyle(new encoding URN, optional value) $obj->encodingStyle($soap_11_encoding); This method is most likely to be used in places outside the header creation. Sets encodingStyle, which specifies an encoding that differs from the one that would otherwise be defaulted to. =item root(boolean, optional value) $obj->root(1); When the application must explicitly specify which data element is to be regarded as the root element for the sake of generating the object model, this method provides the access to the root attribute. =back =head1 TYPE DETECTION SOAP::Lite's serializer will detect the type of any scalar passed in as a SOAP::Data object's value. Because Perl is loosely typed, the serializer is only able to detect types based upon a predetermined set of regular expressions. Therefore, type detection is not always 100% accurate. In such a case you may need to explicitly set the type of the element being encoded. For example, by default the following code will be serialized as an integer: $elem = SOAP::Data->name('idx')->value(5); If, however, you need to serialize this into a long, then the following code will do so: $elem = SOAP::Data->name('idx')->value(5)->type('long'); =head1 EXAMPLES =head2 SIMPLE TYPES The following example will all produce the same XML: $elem1 = SOAP::Data->new(name => 'idx', value => 5); $elem2 = SOAP::Data->name('idx' => 5); $elem3 = SOAP::Data->name('idx')->value(5); =head2 COMPLEX TYPES A common question is how to do you created nested XML elements using SOAP::Lite. The following example demonstrates how: SOAP::Data->name('foo' => \SOAP::Data->value( SOAP::Data->name('bar' => '123'))); The above code will produce the following XML: 123 =head2 ARRAYS The following code: $elem1 = SOAP::Data->name('item' => 123)->type('SomeObject'); $elem2 = SOAP::Data->name('item' => 456)->type('SomeObject'); push(@array,$elem1); push(@array,$elem2); my $client = SOAP::Lite ->readable(1) ->uri($NS) ->proxy($HOST); $temp_elements = SOAP::Data ->name("CallDetails" => \SOAP::Data->value( SOAP::Data->name("elem1" => 'foo'), SOAP::Data->name("elem2" => 'baz'), SOAP::Data->name("someArray" => \SOAP::Data->value( SOAP::Data->name("someArrayItem" => @array) ->type("SomeObject")) )->type("ArrayOf_SomeObject") )) ->type("SomeObject"); $response = $client->someMethod($temp_elements); Will produce the following XML: foo baz 123 456 In the code above, the @array variable can be an array of anything. If you pass in an array of numbers, then SOAP::Lite will properly serialize that into such. If however you need to encode an array of complex types, then simply pass in an array of other SOAP::Data objects and you are all set. =head2 COMPOSING MESSAGES USING RAW XML In some circumstances you may need to encode a message using raw unserialized XML text. To instantiate a SOAP::Data object using raw XML, do the following: $xml_content = "123"; $elem = SOAP::Data->type('xml' => $xml_content); SOAP::Lite's serializer simple takes whatever text is passed to it, and inserts into the encoded SOAP::Data element I. The text input is NOT validated to ensure it is valid XML, nor is the resulting SOAP::Data element validated to ensure that it will produce valid XML. Therefore, it is incumbent upon the developer to ensure that any XML data used in this fashion is valid and will result in a valid XML document. =head2 MULTIPLE NAMESPACES When working with complex types it may be necessary to declare multiple namespaces. The following code demonstrates how to do so: $elem = SOAP::Data->name("myElement" => "myValue") ->attr( { 'xmlns:foo2' => 'urn:Foo2', 'xmlns:foo3' => 'urn:Foo3' } ); This will produce the following XML: myValue =head1 SEE ALSO L, L, L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Deserializer.pod000644 000770 000024 00000003662 12567356463 020030 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Deserializer - the means by which the toolkit manages the conversion of XML into an object manageable by a developer =head1 DESCRIPTION SOAP::Deserializer provides the means by which incoming XML is decoded into a Perl data structure. =head1 METHODS =over =item context This provides access to the calling context of C. In a client side context the often means a reference to an instance of SOAP::Lite. In a server side context this means a reference to a SOAP::Server instance. =back =head1 EXAMPLES =head2 DESERIALIZING RAW XML INTO A SOAP::SOM OBJECT A useful utility for SOAP::Deserializer is for parsing raw XML documents or fragments into a SOAP::SOM object. SOAP::Lite developers use this technique to write unit tests for the SOAP::Lite module itself. It is a lot more efficient for testing aspects of the toolkit than generating client calls over the network. This is a perfect way for developers to write unit tests for their custom data types for example. Here is an example of how raw XML content can be parsed into a SOAP::SOM object by using SOAP::Deserializer: $xml = < 123 456 789 012 END_XML my $som = SOAP::Deserializer->deserialize($xml); =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Fault.pod000644 000770 000024 00000007365 12567356463 016465 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Fault - encapsulates SOAP faults prior to their serialization or after their deserialization =head1 DESCRIPTION This class encapsulates SOAP faults prior to their serialization or after their deserialization. The methods available are a constructor and four accessors. Each accessor creates an object on demand, just as the other classes do, when called as a static method. Like other accessors in the SOAP::Lite package, they return the object itself when setting the attribute. =head1 GENERATING A SOAP FAULT To generate a SOAP Fault simply issue a Perl die command on the server side as you might normally. The SOAP processor will intercept the die command and return a SOAP Fault, using the string passed to the die command as the faultstring, to the client making the call. If you require having more control over the SOAP Fault returned to the client, then simply pass a SOAP::Fault object to the die command and the SOAP processor will behave accordingly. For example: die SOAP::Fault->faultcode('Server.Custom') # will be qualified ->faultstring('Died in server method') ->faultdetail(bless {code => 1} => 'BadError') ->faultactor('http://www.soaplite.com/custom'); =head1 METHODS =over =item new(optional data) $fault = SOAP::Fault->new(faultcode => 'Server'); Explicitly creates a new SOAP::Fault object. Any of the four attributes represented next by accessor methods may be passed in the argument list with values immediately following their attribute name. =item faultcode(optional value) $fault->faultcode('MethodUnknown'); Returns the current fault code or sets it if a value is given. =item faultstring(optional value) $fault->faultstring("There is no $method here"); Returns or sets the fault string. =item faultactor(optional value) $fault->faultcode($header->actor); Returns or sets the fault-actor element. Note that the actor isn't always required in a SOAP fault. =item faultdetail(optional value) $fault->faultcode(bless { proxy => $ip }, 'Err'); Returns or sets the fault's detail element. Like the actor, this isn't always a required element. Note that fault detail content in a message is represented as tag blocks. Thus, the values passed to this accessor when setting the value are either SOAP::Data objects, or more general blessed hash references. =back In addition to these methods, the SOAP::Fault package also provides detail as an alias for faultdetail. The former is the actual name of the element with SOAP faults, but the latter name is less ambiguous when regarded with the rest of the SOAP::Lite package. Objects of this class also have a special stringification enabled. If an object is printed or otherwise stringified, the value produced is faultcode: faultstring, with the attribute values of the object. =head1 SEE ALSO L, L, L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Header.pod000644 000770 000024 00000002541 12567356463 016571 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Header - similar to SOAP::Data elements, a SOAP::Header object simply is encoded in the SOAP Header block =head1 DESCRIPTION Objects instantiated from the SOAP::Header class are functionally the same as SOAP::Data objects, and as such share all the methods from that class. The distinction may be cosmetic, but it is present so that applications may more easily distinguish header blocks from more generic data elements. =head1 SEE ALSO L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Lite/000755 000770 000024 00000000000 12567356463 015570 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/lib/SOAP/Lite.pm000644 000770 000024 00000553602 12567356463 016141 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2005 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== # Formatting hint: # Target is the source code format laid out in Perl Best Practices (4 spaces # indent, opening brace on condition line, no cuddled else). # # October 2007, Martin Kutter package SOAP::Lite; use strict; use warnings; our $VERSION = '1.19'; package SOAP::XMLSchemaApacheSOAP::Deserializer; sub as_map { my $self = shift; return { map { my $hash = ($self->decode_object($_))[1]; ($hash->{key} => $hash->{value}) } @{$_[3] || []} }; } sub as_Map; *as_Map = \&as_map; # Thank to Kenneth Draper for this contribution sub as_vector { my $self = shift; return [ map { scalar(($self->decode_object($_))[1]) } @{$_[3] || []} ]; } sub as_Vector; *as_Vector = \&as_vector; # ---------------------------------------------------------------------- package SOAP::XMLSchema::Serializer; use vars qw(@ISA); sub xmlschemaclass { my $self = shift; return $ISA[0] unless @_; @ISA = (shift); return $self; } # ---------------------------------------------------------------------- package SOAP::XMLSchema1999::Serializer; use vars qw(@EXPORT $AUTOLOAD); sub AUTOLOAD { local($1,$2); my($package, $method) = $AUTOLOAD =~ m/(?:(.+)::)([^:]+)$/; return if $method eq 'DESTROY'; no strict 'refs'; my $export_var = $package . '::EXPORT'; my @export = @$export_var; # Removed in 0.69 - this is a total hack. For some reason this is failing # despite not being a fatal error condition. # die "Type '$method' can't be found in a schema class '$package'\n" # unless $method =~ s/^as_// && grep {$_ eq $method} @{$export_var}; # This was added in its place - it is still a hack, but it performs the # necessary substitution. It just does not die. if ($method =~ s/^as_// && grep {$_ eq $method} @{$export_var}) { # print STDERR "method is now '$method'\n"; } else { return; } $method =~ s/_/-/; # fix ur-type *$AUTOLOAD = sub { my $self = shift; my($value, $name, $type, $attr) = @_; return [$name, {'xsi:type' => "xsd:$method", %$attr}, $value]; }; goto &$AUTOLOAD; } BEGIN { @EXPORT = qw(ur_type float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language base64 hex string boolean ); # TODO: replace by symbol table operations... # predeclare subs, so ->can check will be positive foreach (@EXPORT) { eval "sub as_$_" } } sub nilValue { 'null' } sub anyTypeValue { 'ur-type' } sub as_base64 { my ($self, $value, $name, $type, $attr) = @_; # Fixes #30271 for 5.8 and above. # Won't fix for 5.6 and below - perl can't handle unicode before # 5.8, and applying pack() to everything is just a slowdown. if ($SOAP::Constants::HAS_ENCODE) { if (Encode::is_utf8($value)) { if (Encode->can('_utf8_off')) { # the quick way, but it may change in future Perl versions. Encode::_utf8_off($value); } else { $value = pack('C*',unpack('C*',$value)); # the slow but safe way, # but this fallback works always. } } } require MIME::Base64; return [ $name, { 'xsi:type' => SOAP::Utils::qualify($self->encprefix => 'base64'), %$attr }, MIME::Base64::encode_base64($value,'') ]; } sub as_hex { my ($self, $value, $name, $type, $attr) = @_; return [ $name, { 'xsi:type' => 'xsd:hex', %$attr }, join '', map { uc sprintf "%02x", ord } split '', $value ]; } sub as_long { my($self, $value, $name, $type, $attr) = @_; return [ $name, {'xsi:type' => 'xsd:long', %$attr}, $value ]; } sub as_dateTime { my ($self, $value, $name, $type, $attr) = @_; return [$name, {'xsi:type' => 'xsd:dateTime', %$attr}, $value]; } sub as_string { my ($self, $value, $name, $type, $attr) = @_; die "String value expected instead of @{[ref $value]} reference\n" if ref $value; return [ $name, {'xsi:type' => 'xsd:string', %$attr}, SOAP::Utils::encode_data($value) ]; } sub as_anyURI { my($self, $value, $name, $type, $attr) = @_; die "String value expected instead of @{[ref $value]} reference\n" if ref $value; return [ $name, {'xsi:type' => 'xsd:anyURI', %$attr}, SOAP::Utils::encode_data($value) ]; } sub as_undef { $_[1] ? '1' : '0' } sub as_boolean { my $self = shift; my($value, $name, $type, $attr) = @_; # fix [ 1.05279 ] Boolean serialization error return [ $name, {'xsi:type' => 'xsd:boolean', %$attr}, ( $value && $value ne 'false' ) ? 'true' : 'false' ]; } sub as_float { my($self, $value, $name, $type, $attr) = @_; return [ $name, {'xsi:type' => 'xsd:float', %$attr}, $value ]; } # ---------------------------------------------------------------------- package SOAP::XMLSchema2001::Serializer; use vars qw(@EXPORT); # no more warnings about "used only once" *AUTOLOAD if 0; *AUTOLOAD = \&SOAP::XMLSchema1999::Serializer::AUTOLOAD; BEGIN { @EXPORT = qw(anyType anySimpleType float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration anyURI language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time string hex base64 boolean QName ); # Add QName to @EXPORT # predeclare subs, so ->can check will be positive foreach (@EXPORT) { eval "sub as_$_" } } sub nilValue { 'nil' } sub anyTypeValue { 'anyType' } sub as_long; *as_long = \&SOAP::XMLSchema1999::Serializer::as_long; sub as_float; *as_float = \&SOAP::XMLSchema1999::Serializer::as_float; sub as_string; *as_string = \&SOAP::XMLSchema1999::Serializer::as_string; sub as_anyURI; *as_anyURI = \&SOAP::XMLSchema1999::Serializer::as_anyURI; # TODO - QNames still don't work for 2001 schema! sub as_QName; *as_QName = \&SOAP::XMLSchema1999::Serializer::as_string; sub as_hex; *as_hex = \&as_hexBinary; sub as_base64; *as_base64 = \&as_base64Binary; sub as_timeInstant; *as_timeInstant = \&as_dateTime; # only 0 and 1 allowed - that's easy... sub as_undef { $_[1] ? 'true' : 'false' } sub as_hexBinary { my ($self, $value, $name, $type, $attr) = @_; return [ $name, {'xsi:type' => 'xsd:hexBinary', %$attr}, join '', map { uc sprintf "%02x", ord } split '', $value ]; } sub as_base64Binary { my ($self, $value, $name, $type, $attr) = @_; # Fixes #30271 for 5.8 and above. # Won't fix for 5.6 and below - perl can't handle unicode before # 5.8, and applying pack() to everything is just a slowdown. if (eval "require Encode; 1") { if (Encode::is_utf8($value)) { if (Encode->can('_utf8_off')) { # the quick way, but it may change in future Perl versions. Encode::_utf8_off($value); } else { $value = pack('C*',unpack('C*',$value)); # the slow but safe way, # but this fallback works always. } } } require MIME::Base64; return [ $name, { 'xsi:type' => 'xsd:base64Binary', %$attr }, MIME::Base64::encode_base64($value,'') ]; } sub as_boolean { my ($self, $value, $name, $type, $attr) = @_; # fix [ 1.05279 ] Boolean serialization error return [ $name, { 'xsi:type' => 'xsd:boolean', %$attr }, ( $value && ($value ne 'false') ) ? 'true' : 'false' ]; } # ====================================================================== package SOAP::Utils; sub qualify { $_[1] ? $_[1] =~ /:/ ? $_[1] : join(':', $_[0] || (), $_[1]) : defined $_[1] ? $_[0] : '' } sub overqualify (&$) { for ($_[1]) { &{$_[0]}; s/^:|:$//g } } sub disqualify { (my $qname = shift) =~ s/^($SOAP::Constants::NSMASK?)://; return $qname; } sub splitqname { local($1,$2); return unless $_[0]; $_[0] =~ /^(?:([^:]+):)?(.+)$/; return ($1,$2) } sub longname { defined $_[0] ? sprintf('{%s}%s', $_[0], $_[1]) : $_[1] } sub splitlongname { local($1,$2); $_[0] =~ /^(?:\{(.*)\})?(.+)$/; return ($1,$2) } # Q: why only '&' and '<' are encoded, but not '>'? # A: because it is not required according to XML spec. # # [http://www.w3.org/TR/REC-xml#syntax] # The ampersand character (&) and the left angle bracket (<) may appear in # their literal form only when used as markup delimiters, or within a comment, # a processing instruction, or a CDATA section. If they are needed elsewhere, # they must be escaped using either numeric character references or the # strings "&" and "<" respectively. The right angle bracket (>) may be # represented using the string ">", and must, for compatibility, be # escaped using ">" or a character reference when it appears in the # string "]]>" in content, when that string is not marking the end of a # CDATA section. my %encode_attribute = ('&' => '&', '>' => '>', '<' => '<', '"' => '"'); sub encode_attribute { (my $e = $_[0]) =~ s/([&<>\"])/$encode_attribute{$1}/g; $e } my %encode_data = ('&' => '&', '>' => '>', '<' => '<', "\xd" => ' '); sub encode_data { my $e = $_[0]; if ($e) { $e =~ s/([&<>\015])/$encode_data{$1}/g; $e =~ s/\]\]>/\]\]>/g; } $e } # methods for internal tree (SOAP::Deserializer, SOAP::SOM and SOAP::Serializer) sub o_qname { $_[0]->[0] } sub o_attr { $_[0]->[1] } sub o_child { ref $_[0]->[2] ? $_[0]->[2] : undef } sub o_chars { ref $_[0]->[2] ? undef : $_[0]->[2] } # $_[0]->[3] is not used. Serializer stores object ID there sub o_value { $_[0]->[4] } sub o_lname { $_[0]->[5] } sub o_lattr { $_[0]->[6] } sub format_datetime { my ($s,$m,$h,$D,$M,$Y) = (@_)[0,1,2,3,4,5]; my $time = sprintf("%04d-%02d-%02dT%02d:%02d:%02d",($Y+1900),($M+1),$D,$h,$m,$s); return $time; } # make bytelength that calculates length in bytes regardless of utf/byte settings # either we can do 'use bytes' or length will count bytes already BEGIN { sub bytelength; *bytelength = eval('use bytes; 1') # 5.6.0 and later? ? sub { use bytes; length(@_ ? $_[0] : $_) } : sub { length(@_ ? $_[0] : $_) }; } # ====================================================================== package SOAP::Cloneable; sub clone { my $self = shift; return unless ref $self && UNIVERSAL::isa($self => __PACKAGE__); my $clone = bless {} => ref($self) || $self; for (keys %$self) { my $value = $self->{$_}; $clone->{$_} = ref $value && UNIVERSAL::isa($value => __PACKAGE__) ? $value->clone : $value; } return $clone; } # ====================================================================== package SOAP::Transport; use vars qw($AUTOLOAD @ISA); @ISA = qw(SOAP::Cloneable); use Class::Inspector; sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; return $self if ref $self; my $class = ref($self) || $self; SOAP::Trace::objects('()'); return bless {} => $class; } sub proxy { my $self = shift; $self = $self->new() if not ref $self; my $class = ref $self; return $self->{_proxy} unless @_; $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not specified\n"; my $protocol = uc "$1"; # untainted now # HTTPS is handled by HTTP class $protocol =~s/^HTTPS$/HTTP/; (my $protocol_class = "${class}::$protocol") =~ s/-/_/g; no strict 'refs'; unless (Class::Inspector->loaded("$protocol_class\::Client") && UNIVERSAL::can("$protocol_class\::Client" => 'new') ) { eval "require $protocol_class"; die "Unsupported protocol '$protocol'\n" if $@ =~ m!^Can\'t locate SOAP/Transport/!; die if $@; } $protocol_class .= "::Client"; return $self->{_proxy} = $protocol_class->new(endpoint => shift, @_); } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY'; no strict 'refs'; *$AUTOLOAD = sub { shift->proxy->$method(@_) }; goto &$AUTOLOAD; } # ====================================================================== package SOAP::Fault; use Carp (); use overload fallback => 1, '""' => "stringify"; sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; unless (ref $self) { my $class = $self; $self = bless {} => $class; SOAP::Trace::objects('()'); } Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); no strict qw(refs); while (@_) { my $method = shift; $self->$method(shift) if $self->can($method) } return $self; } sub stringify { my $self = shift; return join ': ', $self->faultcode, $self->faultstring; } sub BEGIN { no strict 'refs'; for my $method (qw(faultcode faultstring faultactor faultdetail)) { my $field = '_' . $method; *$method = sub { my $self = UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new : __PACKAGE__->new; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } *detail = \&faultdetail; } # ====================================================================== package SOAP::Data; use vars qw(@ISA @EXPORT_OK); use Exporter; use Carp (); use SOAP::Lite::Deserializer::XMLSchemaSOAP1_2; @ISA = qw(Exporter); @EXPORT_OK = qw(name type attr value uri); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; unless (ref $self) { my $class = $self; $self = bless {_attr => {}, _value => [], _signature => []} => $class; SOAP::Trace::objects('()'); } no strict qw(refs); Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); while (@_) { my $method = shift; $self->$method(shift) if $self->can($method) } return $self; } sub name { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new : __PACKAGE__->new; if (@_) { my $name = shift; my ($uri, $prefix); # predeclare, because can't declare in assign if ($name) { ($uri, $name) = SOAP::Utils::splitlongname($name); unless (defined $uri) { ($prefix, $name) = SOAP::Utils::splitqname($name); $self->prefix($prefix) if defined $prefix; } else { $self->uri($uri); } } $self->{_name} = $name; $self->value(@_) if @_; return $self; } return $self->{_name}; } sub attr { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); if (@_) { $self->{_attr} = shift; return $self->value(@_) if @_; return $self } return $self->{_attr}; } sub type { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); if (@_) { $self->{_type} = shift; $self->value(@_) if @_; return $self; } if (!defined $self->{_type} && (my @types = grep {/^\{$SOAP::Constants::NS_XSI_ALL}type$/o} keys %{$self->{_attr}})) { $self->{_type} = (SOAP::Utils::splitlongname(delete $self->{_attr}->{shift(@types)}))[1]; } return $self->{_type}; } BEGIN { no strict 'refs'; for my $method (qw(root mustUnderstand)) { my $field = '_' . $method; *$method = sub { my $attr = $method eq 'root' ? "{$SOAP::Constants::NS_ENC}$method" : "{$SOAP::Constants::NS_ENV}$method"; my $self = UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new : __PACKAGE__->new; if (@_) { $self->{_attr}->{$attr} = $self->{$field} = shift() ? 1 : 0; $self->value(@_) if @_; return $self; } $self->{$field} = SOAP::Lite::Deserializer::XMLSchemaSOAP1_2->as_boolean($self->{_attr}->{$attr}) if !defined $self->{$field} && defined $self->{_attr}->{$attr}; return $self->{$field}; } } for my $method (qw(actor encodingStyle)) { my $field = '_' . $method; *$method = sub { my $attr = "{$SOAP::Constants::NS_ENV}$method"; my $self = UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); if (@_) { $self->{_attr}->{$attr} = $self->{$field} = shift; $self->value(@_) if @_; return $self; } $self->{$field} = $self->{_attr}->{$attr} if !defined $self->{$field} && defined $self->{_attr}->{$attr}; return $self->{$field}; } } } sub prefix { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); return $self->{_prefix} unless @_; $self->{_prefix} = shift; if (scalar @_) { return $self->value(@_); } return $self; } sub uri { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); return $self->{_uri} unless @_; my $uri = $self->{_uri} = shift; warn "Usage of '::' in URI ($uri) deprecated. Use '/' instead\n" if defined $uri && $^W && $uri =~ /::/; if (scalar @_) { return $self->value(@_); } return $self; } sub set_value { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); $self->{_value} = [@_]; return $self; } sub value { my $self = ref $_[0] ? shift : UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new; if (@_) { return $self->set_value(@_); } else { return wantarray ? @{$self->{_value}} : $self->{_value}->[0]; } } sub signature { my $self = UNIVERSAL::isa($_[0] => __PACKAGE__) ? shift->new() : __PACKAGE__->new(); (@_) ? ($self->{_signature} = shift, return $self) : (return $self->{_signature}); } # ====================================================================== package SOAP::Header; use vars qw(@ISA); @ISA = qw(SOAP::Data); # ====================================================================== package SOAP::Serializer; use SOAP::Lite::Utils; use Carp (); use vars qw(@ISA); @ISA = qw(SOAP::Cloneable SOAP::XMLSchema::Serializer); BEGIN { # namespaces and anonymous data structures my $ns = 0; my $name = 0; my $prefix = 'c-'; sub gen_ns { 'namesp' . ++$ns } sub gen_name { join '', $prefix, 'gensym', ++$name } sub prefix { $prefix =~ s/^[^\-]+-/$_[1]-/; $_[0]; } } sub BEGIN { no strict 'refs'; __PACKAGE__->__mk_accessors(qw(readable level seen autotype attr maptype namespaces multirefinplace encoding signature on_nonserialized context ns_uri ns_prefix use_default_ns)); for my $method (qw(method fault freeform)) { # aliases for envelope *$method = sub { shift->envelope($method => @_) } } # Is this necessary? Seems like work for nothing when a user could just use # SOAP::Utils directly. # for my $method (qw(qualify overqualify disqualify)) { # import from SOAP::Utils # *$method = \&{'SOAP::Utils::'.$method}; # } } sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; return $self if ref $self; my $class = $self; $self = bless { _level => 0, _autotype => 1, _readable => 0, _ns_uri => '', _ns_prefix => '', _use_default_ns => 1, _multirefinplace => 0, _seen => {}, _encoding => 'UTF-8', _objectstack => {}, _signature => [], _maptype => {}, _bodyattr => {}, _headerattr => {}, _on_nonserialized => sub {Carp::carp "Cannot marshall @{[ref shift]} reference" if $^W; return}, _encodingStyle => $SOAP::Constants::NS_ENC, _attr => { "{$SOAP::Constants::NS_ENV}encodingStyle" => $SOAP::Constants::NS_ENC, }, _namespaces => {}, _soapversion => SOAP::Lite->soapversion, } => $class; $self->typelookup({ 'base64Binary' => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/ }, 'as_base64Binary'], 'zerostring' => [12, sub { $_[0] =~ /^0\d+$/ }, 'as_string'], # int (and actually long too) are subtle: the negative range is one greater... 'int' => [20, sub {$_[0] =~ /^([+-]?\d+)$/ && ($1 <= 2147483647) && ($1 >= -2147483648); }, 'as_int'], 'long' => [25, sub {$_[0] =~ /^([+-]?\d+)$/ && $1 <= 9223372036854775807;}, 'as_long'], 'float' => [30, sub {$_[0] =~ /^(-?(?:\d+(?:\.\d*)?|\.\d+|NaN|INF)|([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)$/}, 'as_float'], 'gMonth' => [35, sub { $_[0] =~ /^--\d\d--(-\d\d:\d\d)?$/; }, 'as_gMonth'], 'gDay' => [40, sub { $_[0] =~ /^---\d\d(-\d\d:\d\d)?$/; }, 'as_gDay'], 'gYear' => [45, sub { $_[0] =~ /^-?\d\d\d\d(-\d\d:\d\d)?$/; }, 'as_gYear'], 'gMonthDay' => [50, sub { $_[0] =~ /^-\d\d-\d\d(-\d\d:\d\d)?$/; }, 'as_gMonthDay'], 'gYearMonth' => [55, sub { $_[0] =~ /^-?\d\d\d\d-\d\d(Z|([+-]\d\d:\d\d))?$/; }, 'as_gYearMonth'], 'date' => [60, sub { $_[0] =~ /^-?\d\d\d\d-\d\d-\d\d(Z|([+-]\d\d:\d\d))?$/; }, 'as_date'], 'time' => [70, sub { $_[0] =~ /^\d\d:\d\d:\d\d(\.\d\d\d)?(Z|([+-]\d\d:\d\d))?$/; }, 'as_time'], 'dateTime' => [75, sub { $_[0] =~ /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d\d)?(Z|([+-]\d\d:\d\d))?$/; }, 'as_dateTime'], 'duration' => [80, sub { $_[0] !~m{^-?PT?$} && $_[0] =~ m{^ -? # a optional - sign P (:? \d+Y )? (:? \d+M )? (:? \d+D )? (:? T(:?\d+H)? (:?\d+M)? (:?\d+S)? )? $ }x; }, 'as_duration'], 'boolean' => [90, sub { $_[0] =~ /^(true|false)$/i; }, 'as_boolean'], 'anyURI' => [95, sub { $_[0] =~ /^(urn:|http:\/\/)/i; }, 'as_anyURI'], 'string' => [100, sub {1}, 'as_string'], }); $self->register_ns($SOAP::Constants::NS_ENC,$SOAP::Constants::PREFIX_ENC); $self->register_ns($SOAP::Constants::NS_ENV,$SOAP::Constants::PREFIX_ENV) if $SOAP::Constants::PREFIX_ENV; $self->xmlschema($SOAP::Constants::DEFAULT_XML_SCHEMA); SOAP::Trace::objects('()'); no strict qw(refs); Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); while (@_) { my $method = shift; $self->$method(shift) if $self->can($method) } return $self; } sub typelookup { my ($self, $lookup) = @_; if (defined $lookup) { $self->{ _typelookup } = $lookup; $self->{ _typelookup_order } = [ sort { $lookup->{$a}->[0] <=> $lookup->{$b}->[0] } keys %{ $lookup } ]; return $self; } return $self->{ _typelookup }; } sub ns { my $self = shift; $self = $self->new() if not ref $self; if (@_) { my ($u,$p) = @_; my $prefix; if ($p) { $prefix = $p; } elsif (!$p && !($prefix = $self->find_prefix($u))) { $prefix = gen_ns; } $self->{'_ns_uri'} = $u; $self->{'_ns_prefix'} = $prefix; $self->{'_use_default_ns'} = 0; # $self->register_ns($u,$prefix); $self->{'_namespaces'}->{$u} = $prefix; return $self; } return $self->{'_ns_uri'}; } sub default_ns { my $self = shift; $self = $self->new() if not ref $self; if (@_) { my ($u) = @_; $self->{'_ns_uri'} = $u; $self->{'_ns_prefix'} = ''; $self->{'_use_default_ns'} = 1; return $self; } return $self->{'_ns_uri'}; } sub use_prefix { my $self = shift; $self = $self->new() if not ref $self; warn 'use_prefix has been deprecated. if you wish to turn off or on the ' . 'use of a default namespace, then please use either ns(uri) or default_ns(uri)'; if (@_) { my $use = shift; $self->{'_use_default_ns'} = !$use || 0; return $self; } else { return $self->{'_use_default_ns'}; } } sub uri { my $self = shift; $self = $self->new() if not ref $self; # warn 'uri has been deprecated. if you wish to set the namespace for the request, then please use either ns(uri) or default_ns(uri)'; if (@_) { my $ns = shift; if ($self->{_use_default_ns}) { $self->default_ns($ns); } else { $self->ns($ns); } # $self->{'_ns_uri'} = $ns; # $self->register_ns($self->{'_ns_uri'}) if (!$self->{_use_default_ns}); return $self; } return $self->{'_ns_uri'}; } sub encodingStyle { my $self = shift; $self = $self->new() if not ref $self; return $self->{'_encodingStyle'} unless @_; my $cur_style = $self->{'_encodingStyle'}; delete($self->{'_namespaces'}->{$cur_style}); my $new_style = shift; if ($new_style eq "") { delete($self->{'_attr'}->{"{$SOAP::Constants::NS_ENV}encodingStyle"}); } else { $self->{'_attr'}->{"{$SOAP::Constants::NS_ENV}encodingStyle"} = $new_style; $self->{'_namespaces'}->{$new_style} = $SOAP::Constants::PREFIX_ENC; } } # TODO - changing SOAP version can affect previously set encodingStyle sub soapversion { my $self = shift; return $self->{_soapversion} unless @_; return $self if $self->{_soapversion} eq SOAP::Lite->soapversion; $self->{_soapversion} = shift; $self->attr({ "{$SOAP::Constants::NS_ENV}encodingStyle" => $SOAP::Constants::NS_ENC, }); $self->namespaces({ $SOAP::Constants::NS_ENC => $SOAP::Constants::PREFIX_ENC, $SOAP::Constants::PREFIX_ENV ? ($SOAP::Constants::NS_ENV => $SOAP::Constants::PREFIX_ENV) : (), }); $self->xmlschema($SOAP::Constants::DEFAULT_XML_SCHEMA); return $self; } sub xmlschema { my $self = shift->new; return $self->{_xmlschema} unless @_; my @schema; if ($_[0]) { @schema = grep {/XMLSchema/ && /$_[0]/} keys %SOAP::Constants::XML_SCHEMAS; Carp::croak "More than one schema match parameter '$_[0]': @{[join ', ', @schema]}" if @schema > 1; Carp::croak "No schema match parameter '$_[0]'" if @schema != 1; } # do nothing if current schema is the same as new # return $self if $self->{_xmlschema} && $self->{_xmlschema} eq $schema[0]; my $ns = $self->namespaces; # delete current schema from namespaces if (my $schema = $self->{_xmlschema}) { delete $ns->{$schema}; delete $ns->{"$schema-instance"}; } # add new schema into namespaces if (my $schema = $self->{_xmlschema} = shift @schema) { $ns->{$schema} = 'xsd'; $ns->{"$schema-instance"} = 'xsi'; } # and here is the class serializer should work with my $class = exists $SOAP::Constants::XML_SCHEMAS{$self->{_xmlschema}} ? $SOAP::Constants::XML_SCHEMAS{$self->{_xmlschema}} . '::Serializer' : $self; $self->xmlschemaclass($class); return $self; } sub headerattr { my $self = shift->new(); return $self->{_headerattr} unless @_; $self->{_headerattr} = shift; return $self; } sub bodyattr { my $self = shift->new(); return $self->{_bodyattr} unless @_; $self->{_bodyattr} = shift; return $self; } sub envprefix { my $self = shift->new(); return $self->namespaces->{$SOAP::Constants::NS_ENV} unless @_; $self->namespaces->{$SOAP::Constants::NS_ENV} = shift; return $self; } sub encprefix { my $self = shift->new(); return $self->namespaces->{$SOAP::Constants::NS_ENC} unless @_; $self->namespaces->{$SOAP::Constants::NS_ENC} = shift; return $self; } sub gen_id { sprintf "%U", $_[1] } sub multiref_object { my ($self, $object) = @_; my $id = $self->gen_id($object); if (! exists $self->{ _seen }->{ $id }) { $self->{ _seen }->{ $id } = { count => 1, multiref => 0, value => $object, recursive => 0 }; } else { my $id_seen = $self->{ _seen }->{ $id }; $id_seen->{count}++; $id_seen->{multiref} = 1; $id_seen->{value} = $object; $id_seen->{recursive} ||= 0; } return $id; } sub recursive_object { my $self = shift; $self->seen->{$self->gen_id(shift)}->{recursive} = 1; } sub is_href { my $self = shift; my $seen = $self->seen->{shift || return} or return; return 1 if $seen->{id}; return $seen->{multiref} && !($seen->{id} = (shift || $seen->{recursive} || $seen->{multiref} && $self->multirefinplace)); } sub multiref_anchor { my ($self, $id) = @_; no warnings qw(uninitialized); if ($self->{ _seen }->{ $id }->{multiref}) { return "ref-$id" } else { return undef; } } sub encode_multirefs { my $self = shift; return if $self->multirefinplace(); my $seen = $self->{ _seen }; map { $_->[1]->{_id} = 1; $_ } map { $self->encode_object($seen->{$_}->{value}) } grep { $seen->{$_}->{multiref} && !$seen->{$_}->{recursive} } keys %$seen; } sub maptypetouri { my($self, $type, $simple) = @_; return $type unless defined $type; my($prefix, $name) = SOAP::Utils::splitqname($type); unless (defined $prefix) { $name =~ s/__|\./::/g; $self->maptype->{$name} = $simple ? die "Schema/namespace for type '$type' is not specified\n" : $SOAP::Constants::NS_SL_PERLTYPE unless exists $self->maptype->{$name}; $type = $self->maptype->{$name} ? SOAP::Utils::qualify($self->namespaces->{$self->maptype->{$name}} ||= gen_ns, $type) : undef; } return $type; } sub encode_object { my($self, $object, $name, $type, $attr) = @_; $attr ||= {}; return $self->encode_scalar($object, $name, $type, $attr) unless ref $object; my $id = $self->multiref_object($object); use vars '%objectstack'; # we'll play with symbol table local %objectstack = %objectstack; # want to see objects ONLY in the current tree # did we see this object in current tree? Seems to be recursive refs # same as call to $self->recursive_object($object) - but # recursive_object($object) has to re-compute the object's id if (++$objectstack{ $id } > 1) { $self->{ _seen }->{ $id }->{recursive} = 1 } # return if we already saw it twice. It should be already properly serialized return if $objectstack{$id} > 2; if (UNIVERSAL::isa($object => 'SOAP::Data')) { # use $object->SOAP::Data:: to enable overriding name() and others in inherited classes $object->SOAP::Data::name($name) unless defined $object->SOAP::Data::name; # apply ->uri() and ->prefix() which can modify name and attributes of # element, but do not modify SOAP::Data itself my($name, $attr) = $self->fixattrs($object); $attr = $self->attrstoqname($attr); my @realvalues = $object->SOAP::Data::value; return [$name || gen_name, $attr] unless @realvalues; my $method = "as_" . ($object->SOAP::Data::type || '-'); # dummy type if not defined # try to call method specified for this type no strict qw(refs); my @values = map { # store null/nil attribute if value is undef local $attr->{SOAP::Utils::qualify(xsi => $self->xmlschemaclass->nilValue)} = $self->xmlschemaclass->as_undef(1) unless defined; $self->can($method) && $self->$method($_, $name || gen_name, $object->SOAP::Data::type, $attr) || $self->typecast($_, $name || gen_name, $object->SOAP::Data::type, $attr) || $self->encode_object($_, $name, $object->SOAP::Data::type, $attr) } @realvalues; $object->SOAP::Data::signature([map {join $;, $_->[0], SOAP::Utils::disqualify($_->[1]->{'xsi:type'} || '')} @values]) if @values; return wantarray ? @values : $values[0]; } my $class = ref $object; if ($class !~ /^(?:SCALAR|ARRAY|HASH|REF)$/o) { # we could also check for CODE|GLOB|LVALUE, but we cannot serialize # them anyway, so they'll be caught by check below $class =~ s/::/__/g; $name = $class if !defined $name; $type = $class if !defined $type && $self->autotype; my $method = 'as_' . $class; if ($self->can($method)) { no strict qw(refs); my $encoded = $self->$method($object, $name, $type, $attr); return $encoded if ref $encoded; # return only if handled, otherwise handle with default handlers } } if (UNIVERSAL::isa($object => 'REF') || UNIVERSAL::isa($object => 'SCALAR')) { return $self->encode_scalar($object, $name, $type, $attr); } elsif (UNIVERSAL::isa($object => 'ARRAY')) { # Added in SOAP::Lite 0.65_6 to fix an XMLRPC bug return $self->encodingStyle eq "" || $self->isa('XMLRPC::Serializer') ? $self->encode_array($object, $name, $type, $attr) : $self->encode_literal_array($object, $name, $type, $attr); } elsif (UNIVERSAL::isa($object => 'HASH')) { return $self->encode_hash($object, $name, $type, $attr); } else { return $self->on_nonserialized->($object); } } sub encode_scalar { my($self, $value, $name, $type, $attr) = @_; $name ||= gen_name; my $schemaclass = $self->xmlschemaclass; # null reference return [$name, {%$attr, SOAP::Utils::qualify(xsi => $schemaclass->nilValue) => $schemaclass->as_undef(1)}] unless defined $value; # object reference return [$name, {'xsi:type' => $self->maptypetouri($type), %$attr}, [$self->encode_object($$value)], $self->gen_id($value)] if ref $value; # autodefined type if ($self->{ _autotype}) { my $lookup = $self->{_typelookup}; no strict qw(refs); #for (sort {$lookup->{$a}->[0] <=> $lookup->{$b}->[0]} keys %$lookup) { for (@{ $self->{ _typelookup_order } }) { my $method = $lookup->{$_}->[2]; return $self->can($method) && $self->$method($value, $name, $type, $attr) || $method->($value, $name, $type, $attr) if $lookup->{$_}->[1]->($value); } } # invariant return [$name, $attr, $value]; } sub encode_array { my ($self, $array, $name, $type, $attr) = @_; my $items = 'item'; # If typing is disabled, just serialize each of the array items # with no type information, each using the specified name, # and do not create a wrapper array tag. if (!$self->autotype) { $name ||= gen_name; return map {$self->encode_object($_, $name)} @$array; } # TODO: add support for multidimensional, partially transmitted and sparse arrays my @items = map {$self->encode_object($_, $items)} @$array; my $num = @items; my($arraytype, %types) = '-'; for (@items) { $arraytype = $_->[1]->{'xsi:type'} || '-'; $types{$arraytype}++ } $arraytype = sprintf "%s\[$num]", keys %types > 1 || $arraytype eq '-' ? SOAP::Utils::qualify(xsd => $self->xmlschemaclass->anyTypeValue) : $arraytype; # $type = SOAP::Utils::qualify($self->encprefix => 'Array') if $self->autotype && !defined $type; $type = qualify($self->encprefix => 'Array') if !defined $type; return [$name || SOAP::Utils::qualify($self->encprefix => 'Array'), { SOAP::Utils::qualify($self->encprefix => 'arrayType') => $arraytype, 'xsi:type' => $self->maptypetouri($type), %$attr }, [@items], $self->gen_id($array) ]; } # Will encode arrays using doc-literal style sub encode_literal_array { my($self, $array, $name, $type, $attr) = @_; if ($self->autotype) { my $items = 'item'; # TODO: add support for multidimensional, partially transmitted and sparse arrays my @items = map {$self->encode_object($_, $items)} @$array; my $num = @items; my($arraytype, %types) = '-'; for (@items) { $arraytype = $_->[1]->{'xsi:type'} || '-'; $types{$arraytype}++ } $arraytype = sprintf "%s\[$num]", keys %types > 1 || $arraytype eq '-' ? SOAP::Utils::qualify(xsd => $self->xmlschemaclass->anyTypeValue) : $arraytype; $type = SOAP::Utils::qualify($self->encprefix => 'Array') if !defined $type; return [$name || SOAP::Utils::qualify($self->encprefix => 'Array'), { SOAP::Utils::qualify($self->encprefix => 'arrayType') => $arraytype, 'xsi:type' => $self->maptypetouri($type), %$attr }, [ @items ], $self->gen_id($array) ]; } else { # # literal arrays are different - { array => [ 5,6 ] } # results in 56 # This means that if there's a literal inside the array (not a # reference), we have to encode it this way. If there's only # nested tags, encode as # 12 # my $literal = undef; my @items = map { ref $_ ? $self->encode_object($_) : do { $literal++; $_ } } @$array; if ($literal) { return map { [ $name , $attr , $_, $self->gen_id($array) ] } @items; } else { return [$name || SOAP::Utils::qualify($self->encprefix => 'Array'), $attr, [ @items ], $self->gen_id($array) ]; } } } sub encode_hash { my($self, $hash, $name, $type, $attr) = @_; if ($self->autotype && grep {!/$SOAP::Constants::ELMASK/o} keys %$hash) { warn qq!Cannot encode @{[$name ? "'$name'" : 'unnamed']} element as 'hash'. Will be encoded as 'map' instead\n! if $^W; return $self->as_map($hash, $name || gen_name, $type, $attr); } $type = 'SOAPStruct' if $self->autotype && !defined($type) && exists $self->maptype->{SOAPStruct}; return [$name || gen_name, $self->autotype ? {'xsi:type' => $self->maptypetouri($type), %$attr} : { %$attr }, [map {$self->encode_object($hash->{$_}, $_)} keys %$hash], $self->gen_id($hash) ]; } sub as_ordered_hash { my ($self, $value, $name, $type, $attr) = @_; die "Not an ARRAY reference for 'ordered_hash' type" unless UNIVERSAL::isa($value => 'ARRAY'); return [ $name, $attr, [map{$self->encode_object(@{$value}[2*$_+1,2*$_])} 0..$#$value/2 ], $self->gen_id($value) ]; } sub as_map { my ($self, $value, $name, $type, $attr) = @_; die "Not a HASH reference for 'map' type" unless UNIVERSAL::isa($value => 'HASH'); my $prefix = ($self->namespaces->{$SOAP::Constants::NS_APS} ||= 'apachens'); my @items = map { $self->encode_object( SOAP::Data->type( ordered_hash => [ key => $_, value => $value->{$_} ] ), 'item', '' )} sort keys %$value; return [ $name, {'xsi:type' => "$prefix:Map", %$attr}, [@items], $self->gen_id($value) ]; } sub as_xml { my $self = shift; my($value, $name, $type, $attr) = @_; return [$name, {'_xml' => 1}, $value]; } sub typecast { my $self = shift; my($value, $name, $type, $attr) = @_; return if ref $value; # skip complex object, caller knows how to deal with it return if $self->autotype && !defined $type; # we don't know, autotype knows return [$name, {(defined $type && $type gt '' ? ('xsi:type' => $self->maptypetouri($type, 'simple type')) : ()), %$attr}, $value ]; } sub register_ns { my $self = shift->new(); my ($ns,$prefix) = @_; $prefix = gen_ns if !$prefix; $self->{'_namespaces'}->{$ns} = $prefix if $ns; } sub find_prefix { my ($self, $ns) = @_; return (exists $self->{'_namespaces'}->{$ns}) ? $self->{'_namespaces'}->{$ns} : (); } sub fixattrs { my ($self, $data) = @_; my ($name, $attr) = ($data->SOAP::Data::name, {%{$data->SOAP::Data::attr}}); my ($xmlns, $prefix) = ($data->uri, $data->prefix); unless (defined($xmlns) || defined($prefix)) { $self->register_ns($xmlns,$prefix) unless ($self->use_default_ns); return ($name, $attr); } $name ||= gen_name(); # local name $prefix = gen_ns() if !defined $prefix && $xmlns gt ''; $prefix = '' if defined $xmlns && $xmlns eq '' || defined $prefix && $prefix eq ''; $attr->{join ':', xmlns => $prefix || ()} = $xmlns if defined $xmlns; $name = join ':', $prefix, $name if $prefix; $self->register_ns($xmlns,$prefix) unless ($self->use_default_ns); return ($name, $attr); } sub toqname { my $self = shift; my $long = shift; return $long unless $long =~ /^\{(.*)\}(.+)$/; return SOAP::Utils::qualify $self->namespaces->{$1} ||= gen_ns, $2; } sub attrstoqname { my $self = shift; my $attrs = shift; return { map { /^\{(.*)\}(.+)$/ ? ($self->toqname($_) => $2 eq 'type' || $2 eq 'arrayType' ? $self->toqname($attrs->{$_}) : $attrs->{$_}) : ($_ => $attrs->{$_}) } keys %$attrs }; } sub tag { my ($self, $tag, $attrs, @values) = @_; my $readable = $self->{ _readable }; my $value = join '', @values; my $indent = $readable ? ' ' x (($self->{ _level }-1)*2) : ''; # check for special attribute return "$indent$value" if exists $attrs->{_xml} && delete $attrs->{_xml}; die "Element '$tag' can't be allowed in valid XML message. Died." if $tag !~ /^$SOAP::Constants::NSMASK$/o; warn "Element '$tag' uses the reserved prefix 'XML' (in any case)" if $tag !~ /^(?![Xx][Mm][Ll])/; my $prolog = $readable ? "\n" : ""; my $epilog = $readable ? "\n" : ""; my $tagjoiner = " "; if ($self->{ _level } == 1) { my $namespaces = $self->namespaces; foreach (keys %$namespaces) { $attrs->{SOAP::Utils::qualify(xmlns => $namespaces->{$_})} = $_ } $prolog = qq!encoding]}"?>! if defined $self->encoding; $prolog .= "\n" if $readable; $tagjoiner = " \n".(' ' x 4 ) if $readable; } my $tagattrs = join($tagjoiner, '', map { sprintf '%s="%s"', $_, SOAP::Utils::encode_attribute($attrs->{$_}) } grep { $_ && defined $attrs->{$_} && ($_ ne 'xsi:type' || $attrs->{$_} ne '') } sort keys %$attrs); if ($value gt '') { return sprintf("$prolog$indent<%s%s>%s%s$epilog",$tag,$tagattrs,$value,($value =~ /^\s*$epilog$indent",$tag,$tagattrs); } } sub xmlize { my $self = shift; my($name, $attrs, $values, $id) = @{$_[0]}; $attrs ||= {}; local $self->{_level} = $self->{_level} + 1; return $self->tag($name, $attrs) unless defined $values; return $self->tag($name, $attrs, $values) unless ref $values eq "ARRAY"; return $self->tag($name, {%$attrs, href => '#'.$self->multiref_anchor($id)}) if $self->is_href($id, delete($attrs->{_id})); # we have seen this element as a reference if (defined $id && $self->{ _seen }->{ $id }->{ multiref}) { return $self->tag($name, { %$attrs, id => $self->multiref_anchor($id) }, map {$self->xmlize($_)} @$values ); } else { return $self->tag($name, $attrs, map {$self->xmlize($_)} @$values); } } sub uriformethod { my $self = shift; my $method_is_data = ref $_[0] && UNIVERSAL::isa($_[0] => 'SOAP::Data'); # drop prefix from method that could be string or SOAP::Data object my($prefix, $method) = $method_is_data ? ($_[0]->prefix, $_[0]->name) : SOAP::Utils::splitqname($_[0]); my $attr = {reverse %{$self->namespaces}}; # try to define namespace that could be stored as # a) method is SOAP::Data # ? attribute in method's element as xmlns= or xmlns:${prefix}= # : uri # b) attribute in Envelope element as xmlns= or xmlns:${prefix}= # c) no prefix or prefix equal serializer->envprefix # ? '', but see comment below # : die with error message my $uri = $method_is_data ? ref $_[0]->attr && ($_[0]->attr->{$prefix ? "xmlns:$prefix" : 'xmlns'} || $_[0]->uri) : $self->uri; defined $uri or $uri = $attr->{$prefix || ''}; defined $uri or $uri = !$prefix || $prefix eq $self->envprefix # still in doubts what should namespace be in this case # but will keep it like this for now and be compatible with our server ? ( $method_is_data && $^W && warn("URI is not provided as an attribute for method ($method)\n"), '' ) : die "Can't find namespace for method ($prefix:$method)\n"; return ($uri, $method); } sub serialize { SOAP::Trace::trace('()'); my $self = shift->new; @_ == 1 or Carp::croak "serialize() method accepts one parameter"; $self->seen({}); # reinitialize multiref table my($encoded) = $self->encode_object($_[0]); # now encode multirefs if any # v -------------- subelements of Envelope push(@{$encoded->[2]}, $self->encode_multirefs) if ref $encoded->[2]; return $self->xmlize($encoded); } sub envelope { SOAP::Trace::trace('()'); my $self = shift->new; my $type = shift; my(@parameters, @header); for (@_) { # Find all the SOAP Headers if (defined($_) && ref($_) && UNIVERSAL::isa($_ => 'SOAP::Header')) { push(@header, $_); } # Find all the SOAP Message Parts (attachments) elsif (defined($_) && ref($_) && $self->context && $self->context->packager->is_supported_part($_) ) { $self->context->packager->push_part($_); } # Find all the SOAP Body elements else { # proposed resolution for [ 1700326 ] encode_data called incorrectly in envelope push(@parameters, $_); # push (@parameters, SOAP::Utils::encode_data($_)); } } my $header = @header ? SOAP::Data->set_value(@header) : undef; my($body,$parameters); if ($type eq 'method' || $type eq 'response') { SOAP::Trace::method(@parameters); my $method = shift(@parameters); # or die "Unspecified method for SOAP call\n"; $parameters = @parameters ? SOAP::Data->set_value(@parameters) : undef; if (!defined($method)) {} elsif (UNIVERSAL::isa($method => 'SOAP::Data')) { $body = $method; } elsif ($self->use_default_ns) { if ($self->{'_ns_uri'}) { $body = SOAP::Data->name($method) ->attr({'xmlns' => $self->{'_ns_uri'} } ); } else { $body = SOAP::Data->name($method); } } else { # Commented out by Byrne on 1/4/2006 - to address default namespace problems # $body = SOAP::Data->name($method)->uri($self->{'_ns_uri'}); # $body = $body->prefix($self->{'_ns_prefix'}) if ($self->{'_ns_prefix'}); # Added by Byrne on 1/4/2006 - to avoid the unnecessary creation of a new # namespace # Begin New Code (replaces code commented out above) $body = SOAP::Data->name($method); my $pre = $self->find_prefix($self->{'_ns_uri'}); $body = $body->prefix($pre) if ($self->{'_ns_prefix'}); # End new code } # This is breaking a unit test right now... # proposed resolution for [ 1700326 ] encode_data called incorrectly in envelope # $body->set_value(SOAP::Utils::encode_data($parameters ? \$parameters : ())) # if $body; # must call encode_data on nothing to enforce xsi:nil="true" to be set. $body->set_value($parameters ? \$parameters : SOAP::Utils::encode_data()) if $body; } elsif ($type eq 'fault') { SOAP::Trace::fault(@parameters); # -> attr({'xmlns' => ''}) # Parameter order fixed thanks to Tom Fischer $body = SOAP::Data-> name(SOAP::Utils::qualify($self->envprefix => 'Fault')) -> value(\SOAP::Data->set_value( SOAP::Data->name(faultcode => SOAP::Utils::qualify($self->envprefix => $parameters[0]))->type(""), SOAP::Data->name(faultstring => SOAP::Utils::encode_data($parameters[1]))->type(""), defined($parameters[3]) ? SOAP::Data->name(faultactor => $parameters[3])->type("") : (), defined($parameters[2]) ? SOAP::Data->name(detail => do{ my $detail = $parameters[2]; ref $detail ? \$detail : SOAP::Utils::encode_data($detail) }) : (), )); } elsif ($type eq 'freeform') { SOAP::Trace::freeform(@parameters); $body = SOAP::Data->set_value(@parameters); } elsif (!defined($type)) { # This occurs when the Body is intended to be null. When no method has been # passed in of any kind. } else { die "Wrong type of envelope ($type) for SOAP call\n"; } $self->{ _seen } = {}; # reinitialize multiref table # Build the envelope # Right now it is possible for $body to be a SOAP::Data element that has not # XML escaped any values. How do you remedy this? my($encoded) = $self->encode_object( SOAP::Data->name( SOAP::Utils::qualify($self->envprefix => 'Envelope') => \SOAP::Data->value( ($header ? SOAP::Data->name( SOAP::Utils::qualify($self->envprefix => 'Header') => \$header)->attr( $self->headerattr) : () ), ($body ? SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body') => \$body) : SOAP::Data->name(SOAP::Utils::qualify($self->envprefix => 'Body')) )->attr( $self->bodyattr), ) )->attr($self->attr) ); $self->signature($parameters->signature) if ref $parameters; # IMHO multirefs should be encoded after Body, but only some # toolkits understand this encoding, so we'll keep them for now (04/15/2001) # as the last element inside the Body # v -------------- subelements of Envelope # vv -------- last of them (Body) # v --- subelements push(@{$encoded->[2]->[-1]->[2]}, $self->encode_multirefs) if ref $encoded->[2]->[-1]->[2]; # Sometimes SOAP::Serializer is invoked statically when there is no context. # So first check to see if a context exists. # TODO - a context needs to be initialized by a constructor? if ($self->context && $self->context->packager->parts) { # TODO - this needs to be called! Calling it though wraps the payload twice! # return $self->context->packager->package($self->xmlize($encoded)); } return $self->xmlize($encoded); } # ====================================================================== package SOAP::Parser; sub DESTROY { SOAP::Trace::objects('()') } sub xmlparser { my $self = shift; return eval { $SOAP::Constants::DO_NOT_USE_XML_PARSER ? undef : do { require XML::Parser; XML::Parser->new( NoExpand => 1, Handlers => { Default => sub {} } ) } } || eval { require XML::Parser::Lite; XML::Parser::Lite->new } || die "XML::Parser is not @{[$SOAP::Constants::DO_NOT_USE_XML_PARSER ? 'used' : 'available']} and ", $@; } sub parser { my $self = shift->new; # set the parser if passed if (my $parser = shift) { $self->{'_parser'} = shift; return $self; } # else return the parser or use XML::Parser::Lite return ($self->{'_parser'} ||= $self->xmlparser); } sub new { my $self = shift; return $self if ref $self; my $class = $self; SOAP::Trace::objects('()'); return bless {_parser => shift}, $class; } sub decode { SOAP::Trace::trace('()'); my $self = shift; $self->parser->setHandlers( Final => sub { shift; $self->final(@_) }, Start => sub { shift; $self->start(@_) }, End => sub { shift; $self->end(@_) }, Char => sub { shift; $self->char(@_) }, ExternEnt => sub { shift; die "External entity (pointing to '$_[1]') is not allowed" }, ); # my $parsed = $self->parser->parse($_[0]); # return $parsed; # my $ret = undef; eval { $ret = $self->parser->parse($_[0]); }; if ($@) { $self->final; # Clean up in the event of an error die $@; # Pass back the error } return $ret; } sub final { my $self = shift; # clean handlers, otherwise SOAP::Parser won't be deleted: # it refers to XML::Parser which refers to subs from SOAP::Parser # Thanks to Ryan Adams # and Craig Johnston # checked by number of tests in t/02-payload.t undef $self->{_values}; $self->parser->setHandlers( Final => undef, Start => undef, End => undef, Char => undef, ExternEnt => undef, ); $self->{_done}; } sub start { push @{shift->{_values}}, [shift, {@_}] } # string concatenation changed to arrays which should improve performance # for strings with many entity-encoded elements. # Thanks to Mathieu Longtin sub char { push @{shift->{_values}->[-1]->[3]}, shift } sub end { my $self = shift; my $done = pop @{$self->{_values}}; $done->[2] = defined $done->[3] ? join('',@{$done->[3]}) : '' unless ref $done->[2]; undef $done->[3]; @{$self->{_values}} ? (push @{$self->{_values}->[-1]->[2]}, $done) : ($self->{_done} = $done); } # ====================================================================== package SOAP::SOM; use Carp (); use SOAP::Lite::Utils; sub BEGIN { no strict 'refs'; my %path = ( root => '/', envelope => '/Envelope', body => '/Envelope/Body', header => '/Envelope/Header', headers => '/Envelope/Header/[>0]', fault => '/Envelope/Body/Fault', faultcode => '/Envelope/Body/Fault/faultcode', faultstring => '/Envelope/Body/Fault/faultstring', faultactor => '/Envelope/Body/Fault/faultactor', faultdetail => '/Envelope/Body/Fault/detail', ); for my $method (keys %path) { *$method = sub { my $self = shift; ref $self or return $path{$method}; Carp::croak "Method '$method' is readonly and doesn't accept any parameters" if @_; return $self->valueof($path{$method}); }; } my %results = ( method => '/Envelope/Body/[1]', result => '/Envelope/Body/[1]/[1]', freeform => '/Envelope/Body/[>0]', paramsin => '/Envelope/Body/[1]/[>0]', paramsall => '/Envelope/Body/[1]/[>0]', paramsout => '/Envelope/Body/[1]/[>1]' ); for my $method (keys %results) { *$method = sub { my $self = shift; ref $self or return $results{$method}; Carp::croak "Method '$method' is readonly and doesn't accept any parameters" if @_; defined $self->fault ? return : return $self->valueof($results{$method}); }; } for my $method (qw(o_child o_value o_lname o_lattr o_qname)) { # import from SOAP::Utils *$method = \&{'SOAP::Utils::'.$method}; } __PACKAGE__->__mk_accessors('context'); } # use object in boolean context return true/false on last match # Ex.: $som->match('//Fault') ? 'SOAP call failed' : 'success'; use overload fallback => 1, 'bool' => sub { @{shift->{_current}} > 0 }; sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; my $class = ref($self) || $self; my $content = shift; SOAP::Trace::objects('()'); return bless { _content => $content, _current => [$content] } => $class; } sub parts { my $self = shift; if (@_) { $self->context->packager->parts(@_); return $self; } else { return $self->context->packager->parts; } } sub is_multipart { my $self = shift; return defined($self->parts); } sub current { my $self = shift; $self->{_current} = [@_], return $self if @_; return wantarray ? @{$self->{_current}} : $self->{_current}->[0]; } sub valueof { my $self = shift; local $self->{_current} = $self->{_current}; $self->match(shift) if @_; return wantarray ? map {o_value($_)} @{$self->{_current}} : @{$self->{_current}} ? o_value($self->{_current}->[0]) : undef; } sub headerof { # SOAP::Header is the same as SOAP::Data, so just rebless it wantarray ? map { bless $_ => 'SOAP::Header' } shift->dataof(@_) : do { # header returned by ->dataof can be undef in scalar context my $header = shift->dataof(@_); ref $header ? bless($header => 'SOAP::Header') : undef; }; } sub dataof { my $self = shift; local $self->{_current} = $self->{_current}; $self->match(shift) if @_; return wantarray ? map {$self->_as_data($_)} @{$self->{_current}} : @{$self->{_current}} ? $self->_as_data($self->{_current}->[0]) : undef; } sub namespaceuriof { my $self = shift; local $self->{_current} = $self->{_current}; $self->match(shift) if @_; return wantarray ? map {(SOAP::Utils::splitlongname(o_lname($_)))[0]} @{$self->{_current}} : @{$self->{_current}} ? (SOAP::Utils::splitlongname(o_lname($self->{_current}->[0])))[0] : undef; } #sub _as_data { # my $self = shift; # my $pointer = shift; # # SOAP::Data # -> new(prefix => '', name => o_qname($pointer), name => o_lname($pointer), attr => o_lattr($pointer)) # -> set_value(o_value($pointer)); #} sub _as_data { my $self = shift; my $node = shift; my $data = SOAP::Data->new( prefix => '', # name => o_qname has side effect: sets namespace ! name => o_qname($node), name => o_lname($node), attr => o_lattr($node) ); if ( defined o_child($node) ) { my @children; foreach my $child ( @{ o_child($node) } ) { push( @children, $self->_as_data($child) ); } $data->set_value( \SOAP::Data->value(@children) ); } else { $data->set_value( o_value($node) ); } return $data; } sub match { my $self = shift; my $path = shift; $self->{_current} = [ $path =~ s!^/!! || !@{$self->{_current}} ? $self->_traverse($self->{_content}, 1 => split '/' => $path) : map {$self->_traverse_tree(o_child($_), split '/' => $path)} @{$self->{_current}} ]; return $self; } sub _traverse { my ($self, $pointer, $itself, $path, @path) = @_; die "Incorrect parameter" unless $itself =~/^\d+$/; if ($path && substr($path, 0, 1) eq '{') { $path = join '/', $path, shift @path while @path && $path !~ /}/; } my($op, $num) = $path =~ /^\[(<=|<|>=|>|=|!=?)?(\d+)\]$/ if defined $path; return $pointer unless defined $path; if (! $op) { $op = '=='; } elsif ($op eq '=' || $op eq '!') { $op .= '='; } my $numok = defined $num && eval "$itself $op $num"; my $nameok = (o_lname($pointer) || '') =~ /(?:^|\})$path$/ if defined $path; # name can be with namespace my $anynode = $path eq ''; unless ($anynode) { if (@path) { return if defined $num && !$numok || !defined $num && !$nameok; } else { return $pointer if defined $num && $numok || !defined $num && $nameok; return; } } my @walk; push @walk, $self->_traverse_tree([$pointer], @path) if $anynode; push @walk, $self->_traverse_tree(o_child($pointer), $anynode ? ($path, @path) : @path); return @walk; } sub _traverse_tree { my ($self, $pointer, @path) = @_; # can be list of children or value itself. Traverse only children return unless ref $pointer eq 'ARRAY'; my $itself = 1; grep {defined} map {$self->_traverse($_, $itself++, @path)} grep {!ref o_lattr($_) || !exists o_lattr($_)->{"{$SOAP::Constants::NS_ENC}root"} || o_lattr($_)->{"{$SOAP::Constants::NS_ENC}root"} ne '0'} @$pointer; } # ====================================================================== package SOAP::Deserializer; use vars qw(@ISA); use SOAP::Lite::Utils; use Class::Inspector; use URI::Escape qw{uri_unescape}; @ISA = qw(SOAP::Cloneable); sub DESTROY { SOAP::Trace::objects('()') } sub BEGIN { __PACKAGE__->__mk_accessors( qw(ids hrefs parts parser base xmlschemas xmlschema context) ); } # Cache (slow) Class::Inspector results my %_class_loaded=(); sub new { my $self = shift; return $self if ref $self; my $class = $self; SOAP::Trace::objects('()'); return bless { '_ids' => {}, '_hrefs' => {}, '_parser' => SOAP::Parser->new, '_xmlschemas' => { $SOAP::Constants::NS_APS => 'SOAP::XMLSchemaApacheSOAP::Deserializer', # map { # $_ => $SOAP::Constants::XML_SCHEMAS{$_} . '::Deserializer' # } keys %SOAP::Constants::XML_SCHEMAS map { $_ => 'SOAP::Lite::Deserializer::' . $SOAP::Constants::XML_SCHEMA_OF{$_} } keys %SOAP::Constants::XML_SCHEMA_OF }, }, $class; } sub is_xml { # Added check for envelope delivery. Fairly standard with MMDF and sendmail # Thanks to Chris Davies $_[1] =~ /^\s*new($location); # make absolute location if relative $location = $uri->abs($self->base || 'thismessage:/')->as_string unless $uri->scheme; } return $location; } # Returns the envelope and populates SOAP::Packager with parts sub decode_parts { my $self = shift; my $env = $self->context->packager->unpackage($_[0],$self->context); my $body = $self->parser->decode($env); # TODO - This shouldn't be here! This is packager specific! # However this does need to pull out all the cid's # to populate ids hash with. foreach (@{$self->context->packager->parts}) { my $data = $_->bodyhandle->as_string; my $type = $_->head->mime_attr('Content-Type'); my $location = $_->head->mime_attr('Content-Location'); my $id = $_->head->mime_attr('Content-Id'); $location = $self->baselocation($location); my $part = lc($type) eq 'text/xml' && !$SOAP::Constants::DO_NOT_PROCESS_XML_IN_MIME ? $self->parser->decode($data) : ['mimepart', {}, $data]; # This below looks like unnecessary bloat!!! # I should probably dereference the mimepart, provide a callback to get the string data $self->ids->{$1} = $part if ($id && $id =~ m/^<([^>]+)>$/); # strip any leading and trailing brackets $self->ids->{$location} = $part if $location; } return $body; } # decode returns a parsed body in the form of an ARRAY # each element of the ARRAY is a HASH, ARRAY or SCALAR sub decode { my $self = shift->new; # this actually is important return $self->is_xml($_[0]) ? $self->parser->decode($_[0]) : $self->decode_parts($_[0]); } # deserialize returns a SOAP::SOM object and parses straight # text as input sub deserialize { SOAP::Trace::trace('()'); my $self = shift->new; # initialize $self->hrefs({}); $self->ids({}); # If the document is XML, then ids will be empty # If the document is MIME, then ids will hold a list of cids my $parsed = $self->decode($_[0]); # Having this code here makes multirefs in the Body work, but multirefs # that reference XML fragments in a MIME part do not work. if (keys %{$self->ids()}) { $self->traverse_ids($parsed); } else { # delay - set ids to be traversed later in decode_object, they only get # traversed if an href is found that is referencing an id. $self->ids($parsed); } $self->decode_object($parsed); my $som = SOAP::SOM->new($parsed); $som->context($self->context); # TODO - try removing this and see if it works! return $som; } sub traverse_ids { my $self = shift; my $ref = shift; my($undef, $attrs, $children) = @$ref; # ^^^^^^ to fix nasty error on Mac platform (Carl K. Cunningham) $self->ids->{$attrs->{'id'}} = $ref if exists $attrs->{'id'}; return unless ref $children; for (@$children) { $self->traverse_ids($_) }; } use constant _ATTRS => 6; use constant _NAME => 5; sub decode_object { my $self = shift; my $ref = shift; my($name, $attrs_ref, $children, $value) = @$ref; my %attrs = %{ $attrs_ref }; $ref->[ _ATTRS ] = \%attrs; # make a copy for long attributes use vars qw(%uris); local %uris = (%uris, map { do { (my $ns = $_) =~ s/^xmlns:?//; $ns } => delete $attrs{$_} } grep {/^xmlns(:|$)/} keys %attrs); foreach (keys %attrs) { next unless m/^($SOAP::Constants::NSMASK?):($SOAP::Constants::NSMASK)$/; $1 =~ /^[xX][mM][lL]/ || $uris{$1} && do { $attrs{SOAP::Utils::longname($uris{$1}, $2)} = do { my $value = $attrs{$_}; $2 ne 'type' && $2 ne 'arrayType' ? $value : SOAP::Utils::longname($value =~ m/^($SOAP::Constants::NSMASK?):(${SOAP::Constants::NSMASK}(?:\[[\d,]*\])*)/ ? ($uris{$1} || die("Unresolved prefix '$1' for attribute value '$value'\n"), $2) : ($uris{''} || die("Unspecified namespace for type '$value'\n"), $value) ); }; 1; } || die "Unresolved prefix '$1' for attribute '$_'\n"; } # and now check the element my $ns = ($name =~ s/^($SOAP::Constants::NSMASK?):// ? $1 : ''); $ref->[ _NAME ] = SOAP::Utils::longname( $ns ? ($uris{$ns} || die "Unresolved prefix '$ns' for element '$name'\n") : (defined $uris{''} ? $uris{''} : undef), $name ); ($children, $value) = (undef, $children) unless ref $children; return $name => ($ref->[4] = $self->decode_value( [$ref->[ _NAME ], \%attrs, $children, $value] )); } sub decode_value { my $self = shift; my($name, $attrs, $children, $value) = @{ $_[0] }; # check SOAP version if applicable use vars '$level'; local $level = $level || 0; if (++$level == 1) { my($namespace, $envelope) = SOAP::Utils::splitlongname($name); SOAP::Lite->soapversion($namespace) if $envelope eq 'Envelope' && $namespace; } if (exists $attrs->{"{$SOAP::Constants::NS_ENV}encodingStyle"}) { # check encodingStyle # future versions may bind deserializer to encodingStyle my $encodingStyle = $attrs->{"{$SOAP::Constants::NS_ENV}encodingStyle"}; # TODO - SOAP 1.2 and 1.1 have different rules about valid encodingStyle values # For example, in 1.1 - any http://schemas.xmlsoap.org/soap/encoding/* # value is valid if (defined $encodingStyle && length($encodingStyle)) { my %styles = map { $_ => undef } @SOAP::Constants::SUPPORTED_ENCODING_STYLES; my $found = 0; foreach my $e (split(/ +/,$encodingStyle)) { if (exists $styles{$e}) { $found ++; } } die "Unrecognized/unsupported value of encodingStyle attribute '$encodingStyle'" if (! $found) && !(SOAP::Lite->soapversion == 1.1 && $encodingStyle =~ /(?:^|\b)$SOAP::Constants::NS_ENC/); } } use vars '$arraytype'; # type of Array element specified on Array itself # either specified with xsi:type, or or array element my ($type) = grep { defined } map($attrs->{$_}, sort grep {/^\{$SOAP::Constants::NS_XSI_ALL\}type$/o} keys %$attrs), $name =~ /^\{$SOAP::Constants::NS_ENC\}/ ? $name : $arraytype; local $arraytype; # it's used only for one level, we don't need it anymore # $name is not used here since type should be encoded as type, not as name my ($schema, $class) = SOAP::Utils::splitlongname($type) if $type; my $schemaclass = defined($schema) && $self->{ _xmlschemas }->{$schema} || $self; if (! exists $_class_loaded{$schemaclass}) { no strict qw(refs); if (! Class::Inspector->loaded($schemaclass) ) { eval "require $schemaclass" or die $@ if not ref $schemaclass; } $_class_loaded{$schemaclass} = undef; } # store schema that is used in parsed message $self->{ _xmlschema } = $schema if ($schema) && $schema =~ /XMLSchema/; # don't use class/type if anyType/ur-type is specified on wire undef $class if $schemaclass->can('anyTypeValue') && $schemaclass->anyTypeValue eq $class; my $method = 'as_' . ($class || '-'); # dummy type if not defined $class =~ s/__|\./::/g if $class; my $id = $attrs->{id}; if (defined $id && exists $self->hrefs->{$id}) { return $self->hrefs->{$id}; } elsif (exists $attrs->{href}) { (my $id = delete $attrs->{href}) =~ s/^(#|cid:|uuid:)?//; my $type=$1; $id=uri_unescape($id) if (defined($type) and $type eq 'cid:'); # convert to absolute if not internal '#' or 'cid:' $id = $self->baselocation($id) unless $type; return $self->hrefs->{$id} if exists $self->hrefs->{$id}; # First time optimization. we don't traverse IDs unless asked for it. # This is where traversing id's is delayed from before # - the first time through - ids should contain a copy of the parsed XML # structure! seems silly to make so many copies my $ids = $self->ids; if (ref($ids) ne 'HASH') { $self->ids({}); # reset list of ids first time through $self->traverse_ids($ids); } if (exists($self->ids->{$id})) { my $obj = ($self->decode_object(delete($self->ids->{$id})))[1]; return $self->hrefs->{$id} = $obj; } else { die "Unresolved (wrong?) href ($id) in element '$name'\n"; } } return undef if grep { /^$SOAP::Constants::NS_XSI_NILS$/ && do { my $class = $self->xmlschemas->{ $1 || $2 }; eval "require $class" or die @$;; $class->as_undef($attrs->{$_}) } } keys %$attrs; # try to handle with typecasting my $res = $self->typecast($value, $name, $attrs, $children, $type); return $res if defined $res; # ok, continue with others if (exists $attrs->{"{$SOAP::Constants::NS_ENC}arrayType"}) { my $res = []; $self->hrefs->{$id} = $res if defined $id; # check for arrayType which could be [1], [,2][5] or [] # [,][1] will NOT be allowed right now (multidimensional sparse array) my($type, $multisize) = $attrs->{"{$SOAP::Constants::NS_ENC}arrayType"} =~ /^(.+)\[(\d*(?:,\d+)*)\](?:\[(?:\d+(?:,\d+)*)\])*$/ or die qq!Unrecognized/unsupported format of arrayType attribute '@{[$attrs->{"{$SOAP::Constants::NS_ENC}arrayType"}]}'\n!; my @dimensions = map { $_ || undef } split /,/, $multisize; my $size = 1; foreach (@dimensions) { $size *= $_ || 0 } # TODO УЄhm, shouldn't this local be my? local $arraytype = $type; # multidimensional if ($multisize =~ /,/) { @$res = splitarray( [@dimensions], [map { scalar(($self->decode_object($_))[1]) } @{$children || []}] ); } # normal else { @$res = map { scalar(($self->decode_object($_))[1]) } @{$children || []}; } # sparse (position) if (ref $children && exists SOAP::Utils::o_lattr($children->[0])->{"{$SOAP::Constants::NS_ENC}position"}) { my @new; for (my $pos = 0; $pos < @$children; $pos++) { # TBD implement position in multidimensional array my($position) = SOAP::Utils::o_lattr($children->[$pos])->{"{$SOAP::Constants::NS_ENC}position"} =~ /^\[(\d+)\]$/ or die "Position must be specified for all elements of sparse array\n"; $new[$position] = $res->[$pos]; } @$res = @new; } # partially transmitted (offset) # TBD implement offset in multidimensional array my($offset) = $attrs->{"{$SOAP::Constants::NS_ENC}offset"} =~ /^\[(\d+)\]$/ if exists $attrs->{"{$SOAP::Constants::NS_ENC}offset"}; unshift(@$res, (undef) x $offset) if $offset; die "Too many elements in array. @{[scalar@$res]} instead of claimed $multisize ($size)\n" if $multisize && $size < @$res; # extend the array if number of elements is specified $#$res = $dimensions[0]-1 if defined $dimensions[0] && @$res < $dimensions[0]; return defined $class && $class ne 'Array' ? bless($res => $class) : $res; } elsif ($name =~ /^\{$SOAP::Constants::NS_ENC\}Struct$/ || !$schemaclass->can($method) && (ref $children || defined $class && $value =~ /^\s*$/)) { my $res = {}; $self->hrefs->{$id} = $res if defined $id; # Patch code introduced in 0.65 - deserializes array properly # Decode each element of the struct. my %child_count_of = (); foreach my $child (@{$children || []}) { my ($child_name, $child_value) = $self->decode_object($child); # Store the decoded element in the struct. If the element name is # repeated, replace the previous scalar value with a new array # containing both values. if (not $child_count_of{$child_name}) { # first time to see this value: use scalar $res->{$child_name} = $child_value; } elsif ($child_count_of{$child_name} == 1) { # second time to see this value: convert scalar to array $res->{$child_name} = [ $res->{$child_name}, $child_value ]; } else { # already have an array: append to it push @{$res->{$child_name}}, $child_value; } $child_count_of{$child_name}++; } # End patch code return defined $class && $class ne 'SOAPStruct' ? bless($res => $class) : $res; } else { my $res; if (my $method_ref = $schemaclass->can($method)) { $res = $method_ref->($self, $value, $name, $attrs, $children, $type); } else { $res = $self->typecast($value, $name, $attrs, $children, $type); $res = $class ? die "Unrecognized type '$type'\n" : $value unless defined $res; } $self->hrefs->{$id} = $res if defined $id; return $res; } } sub splitarray { my @sizes = @{+shift}; my $size = shift @sizes; my $array = shift; return splice(@$array, 0, $size) unless @sizes; my @array = (); push @array, [ splitarray([@sizes], $array) ] while @$array && (!defined $size || $size--); return @array; } sub typecast { } # typecast is called for both objects AND scalar types # check ref of the second parameter (first is the object) # return undef if you don't want to handle it # ====================================================================== package SOAP::Client; use SOAP::Lite::Utils; $VERSION = $SOAP::Lite::VERSION; sub BEGIN { __PACKAGE__->__mk_accessors(qw(endpoint code message is_success status options)); } # ====================================================================== package SOAP::Server::Object; sub gen_id; *gen_id = \&SOAP::Serializer::gen_id; my %alive; my %objects; sub objects_by_reference { shift; while (@_) { @alive{shift()} = ref $_[0] ? shift : sub { $_[1]-$_[$_[5] ? 5 : 4] > $SOAP::Constants::OBJS_BY_REF_KEEPALIVE } } keys %alive; } sub reference { my $self = shift; my $stamp = time; my $object = shift; my $id = $stamp . $self->gen_id($object); # this is code for garbage collection my $time = time; my $type = ref $object; my @objects = grep { $objects{$_}->[1] eq $type } keys %objects; for (grep { $alive{$type}->(scalar @objects, $time, @{$objects{$_}}) } @objects) { delete $objects{$_}; } $objects{$id} = [$object, $type, $stamp]; bless { id => $id } => ref $object; } sub references { my $self = shift; return @_ unless %alive; # small optimization return map { ref($_) && exists $alive{ref $_} ? $self->reference($_) : $_ } @_; } sub object { my $self = shift; my $class = ref($self) || $self; my $object = shift; return $object unless ref($object) && $alive{ref $object} && exists $object->{id}; my $reference = $objects{$object->{id}}; die "Object with specified id couldn't be found\n" unless ref $reference->[0]; $reference->[3] = time; # last access time return $reference->[0]; # reference to actual object } sub objects { my $self = shift; return @_ unless %alive; # small optimization return map { ref($_) && exists $alive{ref $_} && exists $_->{id} ? $self->object($_) : $_ } @_; } # ====================================================================== package SOAP::Server::Parameters; sub byNameOrOrder { unless (UNIVERSAL::isa($_[-1] => 'SOAP::SOM')) { warn "Last parameter is expected to be envelope\n" if $^W; pop; return @_; } my $params = pop->method; my @mandatory = ref $_[0] eq 'ARRAY' ? @{shift()} : die "list of parameters expected as the first parameter for byName"; my $byname = 0; my @res = map { $byname += exists $params->{$_}; $params->{$_} } @mandatory; return $byname ? @res : @_; } sub byName { unless (UNIVERSAL::isa($_[-1] => 'SOAP::SOM')) { warn "Last parameter is expected to be envelope\n" if $^W; pop; return @_; } return @{pop->method}{ref $_[0] eq 'ARRAY' ? @{shift()} : die "list of parameters expected as the first parameter for byName"}; } # ====================================================================== package SOAP::Server; use Carp (); use Scalar::Util qw(weaken); sub DESTROY { SOAP::Trace::objects('()') } sub initialize { return ( packager => SOAP::Packager::MIME->new, transport => SOAP::Transport->new, serializer => SOAP::Serializer->new, deserializer => SOAP::Deserializer->new, on_action => sub { ; }, on_dispatch => sub { return; }, ); } sub new { my $self = shift; return $self if ref $self; unless (ref $self) { my $class = $self; my(@params, @methods); while (@_) { my($method, $params) = splice(@_,0,2); $class->can($method) ? push(@methods, $method, $params) : $^W && Carp::carp "Unrecognized parameter '$method' in new()"; } $self = bless { _dispatch_to => [], _dispatch_with => {}, _dispatched => [], _action => '', _options => {}, } => $class; unshift(@methods, $self->initialize); no strict qw(refs); while (@methods) { my($method, $params) = splice(@methods,0,2); $self->$method(ref $params eq 'ARRAY' ? @$params : $params) } SOAP::Trace::objects('()'); } Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); no strict qw(refs); while (@_) { my($method, $params) = splice(@_,0,2); $self->can($method) ? $self->$method(ref $params eq 'ARRAY' ? @$params : $params) : $^W && Carp::carp "Unrecognized parameter '$method' in new()" } return $self; } sub init_context { my $self = shift; $self->{'_deserializer'}->{'_context'} = $self; # weaken circular reference to avoid a memory hole weaken($self->{'_deserializer'}->{'_context'}); $self->{'_serializer'}->{'_context'} = $self; # weaken circular reference to avoid a memory hole weaken($self->{'_serializer'}->{'_context'}); } sub BEGIN { no strict 'refs'; for my $method (qw(serializer deserializer transport)) { my $field = '_' . $method; *$method = sub { my $self = shift->new(); if (@_) { my $context = $self->{$field}->{'_context'}; # save the old context $self->{$field} = shift; $self->{$field}->{'_context'} = $context; # restore the old context return $self; } else { return $self->{$field}; } } } for my $method (qw(action myuri options dispatch_with packager)) { my $field = '_' . $method; *$method = sub { my $self = shift->new(); (@_) ? do { $self->{$field} = shift; return $self; } : return $self->{$field}; } } for my $method (qw(on_action on_dispatch)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; # my $self = shift; return $self->{$field} unless @_; local $@; # commented out because that 'eval' was unsecure # > ref $_[0] eq 'CODE' ? shift : eval shift; # Am I paranoid enough? $self->{$field} = shift; Carp::croak $@ if $@; Carp::croak "$method() expects subroutine (CODE) or string that evaluates into subroutine (CODE)" unless ref $self->{$field} eq 'CODE'; return $self; } } # __PACKAGE__->__mk_accessors( qw(dispatch_to) ); for my $method (qw(dispatch_to)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; # my $self = shift; (@_) ? do { $self->{$field} = [@_]; return $self; } : return @{ $self->{$field} }; } } } sub objects_by_reference { my $self = shift; $self = $self->new() if not ref $self; @_ ? (SOAP::Server::Object->objects_by_reference(@_), return $self) : SOAP::Server::Object->objects_by_reference; } sub dispatched { my $self = shift; $self = $self->new() if not ref $self; @_ ? (push(@{$self->{_dispatched}}, @_), return $self) : return @{$self->{_dispatched}}; } sub find_target { my $self = shift; my $request = shift; # try to find URI/method from on_dispatch call first my($method_uri, $method_name) = $self->on_dispatch->($request); # if nothing there, then get it from envelope itself $request->match((ref $request)->method); ($method_uri, $method_name) = ($request->namespaceuriof || '', $request->dataof->name) unless $method_name; $self->on_action->(my $action = $self->action, $method_uri, $method_name); # check to avoid security vulnerability: Protected->Unprotected::method(@parameters) # see for more details: http://www.phrack.org/phrack/58/p58-0x09 die "Denied access to method ($method_name)\n" unless $method_name =~ /^\w+$/; my ($class, $static); # try to bind directly if (defined($class = $self->dispatch_with->{$method_uri} || $self->dispatch_with->{$action || ''} || (defined($action) && $action =~ /^"(.+)"$/ ? $self->dispatch_with->{$1} : undef))) { # return object, nothing else to do here return ($class, $method_uri, $method_name) if ref $class; $static = 1; } else { die "URI path shall map to class" unless defined ($class = URI->new($method_uri)->path); for ($class) { s!^/|/$!!g; s!/!::!g; s/^$/main/; } die "Failed to access class ($class)" unless $class =~ /^(\w[\w:]*)$/; my $fullname = "$class\::$method_name"; foreach ($self->dispatch_to) { return ($_, $method_uri, $method_name) if ref eq $class; # $OBJECT next if ref; # skip other objects # will ignore errors, because it may complain on # d:\foo\bar, which is PATH and not regexp eval { $static ||= $class =~ /^$_$/ # MODULE || $fullname =~ /^$_$/ # MODULE::method || $method_name =~ /^$_$/ && ($class eq 'main'); # method ('main' assumed) }; } } no strict 'refs'; # TODO - sort this mess out: # The task is to test whether the class in question has already been loaded. # # SOAP::Lite 0.60: # unless (defined %{"${class}::"}) { # Patch to SOAP::Lite 0.60: # The following patch does not work for packages defined within a BEGIN block # unless (exists($INC{join '/', split /::/, $class.'.pm'})) { # Combination of 0.60 and patch did not work reliably, either. # # Now we do the following: Check whether the class is main (always loaded) # or the class implements the method in question # or the package exists as file in %INC. # # This is still sort of a hack - but I don't know anything better # If you have some idea, please help me out... # unless (($class eq 'main') || $class->can($method_name) || exists($INC{join '/', split /::/, $class . '.pm'})) { # allow all for static and only specified path for dynamic bindings local @INC = (($static ? @INC : ()), grep {!ref && m![/\\.]!} $self->dispatch_to()); eval 'local $^W; ' . "require $class"; die "Failed to access class ($class): $@" if $@; $self->dispatched($class) unless $static; } die "Denied access to method ($method_name) in class ($class)" unless $static || grep {/^$class$/} $self->dispatched; return ($class, $method_uri, $method_name); } sub handle { SOAP::Trace::trace('()'); my $self = shift; $self = $self->new if !ref $self; # inits the server when called in a static context $self->init_context(); # we want to restore it when we are done local $SOAP::Constants::DEFAULT_XML_SCHEMA = $SOAP::Constants::DEFAULT_XML_SCHEMA; # SOAP version WILL NOT be restored when we are done. # is it problem? my $result = eval { local $SIG{__DIE__}; # why is this here: $self->serializer->soapversion(1.1); my $request = eval { $self->deserializer->deserialize($_[0]) }; die SOAP::Fault ->faultcode($SOAP::Constants::FAULT_VERSION_MISMATCH) ->faultstring($@) if $@ && $@ =~ /^$SOAP::Constants::WRONG_VERSION/; die "Application failed during request deserialization: $@" if $@; my $som = ref $request; die "Can't find root element in the message" unless $request->match($som->envelope); $self->serializer->soapversion(SOAP::Lite->soapversion); $self->serializer->xmlschema($SOAP::Constants::DEFAULT_XML_SCHEMA = $self->deserializer->xmlschema) if $self->deserializer->xmlschema; die SOAP::Fault ->faultcode($SOAP::Constants::FAULT_MUST_UNDERSTAND) ->faultstring("Unrecognized header has mustUnderstand attribute set to 'true'") if !$SOAP::Constants::DO_NOT_CHECK_MUSTUNDERSTAND && grep { $_->mustUnderstand && (!$_->actor || $_->actor eq $SOAP::Constants::NEXT_ACTOR) } $request->dataof($som->headers); die "Can't find method element in the message" unless $request->match($som->method); # TODO - SOAP::Dispatcher plugs in here # my $handler = $self->dispatcher->find_handler($request); my($class, $method_uri, $method_name) = $self->find_target($request); my @results = eval { local $^W; my @parameters = $request->paramsin; # SOAP::Trace::dispatch($fullname); SOAP::Trace::parameters(@parameters); push @parameters, $request if UNIVERSAL::isa($class => 'SOAP::Server::Parameters'); no strict qw(refs); SOAP::Server::Object->references( defined $parameters[0] && ref $parameters[0] && UNIVERSAL::isa($parameters[0] => $class) ? do { my $object = shift @parameters; SOAP::Server::Object->object(ref $class ? $class : $object )->$method_name(SOAP::Server::Object->objects(@parameters)), # send object back as a header # preserve name, specify URI SOAP::Header ->uri($SOAP::Constants::NS_SL_HEADER => $object) ->name($request->dataof($som->method.'/[1]')->name) } # end do block # SOAP::Dispatcher will plug-in here as well # $handler->dispatch(SOAP::Server::Object->objects(@parameters) : $class->$method_name(SOAP::Server::Object->objects(@parameters)) ); }; # end eval block SOAP::Trace::result(@results); # let application errors pass through with 'Server' code die ref $@ ? $@ : $@ =~ /^Can\'t locate object method "$method_name"/ ? "Failed to locate method ($method_name) in class ($class)" : SOAP::Fault->faultcode($SOAP::Constants::FAULT_SERVER)->faultstring($@) if $@; my $result = $self->serializer ->prefix('s') # distinguish generated element names between client and server ->uri($method_uri) ->envelope(response => $method_name . 'Response', @results); return $result; }; # void context return unless defined wantarray; # normal result return $result unless $@; # check fails, something wrong with message return $self->make_fault($SOAP::Constants::FAULT_CLIENT, $@) unless ref $@; # died with SOAP::Fault return $self->make_fault($@->faultcode || $SOAP::Constants::FAULT_SERVER, $@->faultstring || 'Application error', $@->faultdetail, $@->faultactor) if UNIVERSAL::isa($@ => 'SOAP::Fault'); # died with complex detail return $self->make_fault($SOAP::Constants::FAULT_SERVER, 'Application error' => $@); } # end of handle() sub make_fault { my $self = shift; my($code, $string, $detail, $actor) = @_; $self->serializer->fault($code, $string, $detail, $actor || $self->myuri); } # ====================================================================== package SOAP::Trace; use Carp (); my @list = qw( transport dispatch result parameters headers objects method fault freeform trace debug); { no strict 'refs'; for (@list) { *$_ = sub {} } } sub defaultlog { my $caller = (caller(1))[3]; # the 4th element returned by caller is the subroutine name $caller = (caller(2))[3] if $caller =~ /eval/; chomp(my $msg = join ' ', @_); printf STDERR "%s: %s\n", $caller, $msg; } sub import { no strict 'refs'; no warnings qw{ redefine }; # suppress warnings about redefining my $pack = shift; my(@notrace, @symbols); for (@_) { if (ref eq 'CODE') { my $call = $_; foreach (@symbols) { *$_ = sub { $call->(@_) } } @symbols = (); } else { local $_ = $_; my $minus = s/^-//; my $all = $_ eq 'all'; Carp::carp "Illegal symbol for tracing ($_)" unless $all || $pack->can($_); $minus ? push(@notrace, $all ? @list : $_) : push(@symbols, $all ? @list : $_); } } foreach (@symbols) { *$_ = \&defaultlog } foreach (@notrace) { *$_ = sub {} } } # ====================================================================== package SOAP::Custom::XML::Data; use vars qw(@ISA $AUTOLOAD); @ISA = qw(SOAP::Data); use overload fallback => 1, '""' => sub { shift->value }; sub _compileit { no strict 'refs'; my $method = shift; *$method = sub { return __PACKAGE__->SUPER::name($method => $_[0]->attr->{$method}) if exists $_[0]->attr->{$method}; my @elems = grep { ref $_ && UNIVERSAL::isa($_ => __PACKAGE__) && $_->SUPER::name =~ /(^|:)$method$/ } $_[0]->value; return wantarray? @elems : $elems[0]; }; } sub BEGIN { foreach (qw(name type import use)) { _compileit($_) } } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY'; _compileit($method); goto &$AUTOLOAD; } # ====================================================================== package SOAP::Custom::XML::Deserializer; use vars qw(@ISA); @ISA = qw(SOAP::Deserializer); sub decode_value { my $self = shift; my $ref = shift; my($name, $attrs, $children, $value) = @$ref; # base class knows what to do with it return $self->SUPER::decode_value($ref) if exists $attrs->{href}; SOAP::Custom::XML::Data -> SOAP::Data::name($name) -> attr($attrs) -> set_value(ref $children && @$children ? map(scalar(($self->decode_object($_))[1]), @$children) : $value); } # ====================================================================== package SOAP::Schema::Deserializer; use vars qw(@ISA); @ISA = qw(SOAP::Custom::XML::Deserializer); # ====================================================================== package SOAP::Schema::WSDL; use vars qw(%imported @ISA); @ISA = qw(SOAP::Schema); sub new { my $self = shift; unless (ref $self) { my $class = $self; $self = $class->SUPER::new(@_); } return $self; } sub base { my $self = shift->new; @_ ? ($self->{_base} = shift, return $self) : return $self->{_base}; } sub import { my $self = shift->new; my $s = shift; my $base = shift || $self->base || die "Missing base argument for ", __PACKAGE__, "\n"; my @a = $s->import; local %imported = %imported; foreach (@a) { next unless $_->location; my $location = URI->new_abs($_->location->value, $base)->as_string; if ($imported{$location}++) { warn "Recursion loop detected in service description from '$location'. Ignored\n" if $^W; return $s; } my $root = $self->import( $self->deserializer->deserialize( $self->access($location) )->root, $location); $root->SOAP::Data::name eq 'definitions' ? $s->set_value($s->value, $root->value) : $root->SOAP::Data::name eq 'schema' ? do { # add element if there is no one $s->set_value($s->value, $self->deserializer->deserialize('')->root) unless $s->types; $s->types->set_value($s->types->value, $root) } : die "Don't know what to do with '@{[$root->SOAP::Data::name]}' in schema imported from '$location'\n"; } # return the parsed WSDL file $s; } # TODO - This is woefully incomplete! sub parse_schema_element { my $element = shift; # Current element is a complex type if (defined($element->complexType)) { my @elements = (); if (defined($element->complexType->sequence)) { foreach my $e ($element->complexType->sequence->element) { push @elements,parse_schema_element($e); } } return @elements; } elsif ($element->simpleType) { } else { return $element; } } sub parse { my $self = shift->new; my($s, $service, $port) = @_; my @result; # handle imports $self->import($s); # handle descriptions without , aka tModel-type descriptions my @services = $s->service; my $tns = $s->{'_attr'}->{'targetNamespace'}; # if there is no element we'll provide it @services = $self->deserializer->deserialize(<<"FAKE")->root->service unless @services; FAKE my $has_warned = 0; foreach (@services) { my $name = $_->name; next if $service && $service ne $name; my %services; foreach ($_->port) { next if $port && $port ne $_->name; my $binding = SOAP::Utils::disqualify($_->binding); my $endpoint = ref $_->address ? $_->address->location : undef; foreach ($s->binding) { # is this a SOAP binding? next unless grep { $_->uri eq 'http://schemas.xmlsoap.org/wsdl/soap/' } $_->binding; next unless $_->name eq $binding; my $default_style = $_->binding->style; my $porttype = SOAP::Utils::disqualify($_->type); foreach ($_->operation) { my $opername = $_->name; $services{$opername} = {}; # should be initialized in 5.7 and after my $soapaction = $_->operation->soapAction; my $invocationStyle = $_->operation->style || $default_style || "rpc"; my $encodingStyle = $_->input->body->use || "encoded"; my $namespace = $_->input->body->namespace || $tns; my @parts; foreach ($s->portType) { next unless $_->name eq $porttype; foreach ($_->operation) { next unless $_->name eq $opername; my $inputmessage = SOAP::Utils::disqualify($_->input->message); foreach my $msg ($s->message) { next unless $msg->name eq $inputmessage; if ($invocationStyle eq "document" && $encodingStyle eq "literal") { # warn "document/literal support is EXPERIMENTAL in SOAP::Lite" # if !$has_warned && ($has_warned = 1); my ($input_ns,$input_name) = SOAP::Utils::splitqname($msg->part->element); if ($input_name) { foreach my $schema ($s->types->schema) { foreach my $element ($schema->element) { next unless $element->name eq $input_name; push @parts,parse_schema_element($element); } $services{$opername}->{parameters} = [ @parts ]; } } } else { # TODO - support all combinations of doc|rpc/lit|enc. #warn "$invocationStyle/$encodingStyle is not supported in this version of SOAP::Lite"; @parts = $msg->part; $services{$opername}->{parameters} = [ @parts ]; } } } for ($services{$opername}) { $_->{endpoint} = $endpoint; $_->{soapaction} = $soapaction; $_->{namespace} = $namespace; # $_->{parameters} = [@parts]; } } } } } # fix nonallowed characters in package name, and add 's' if started with digit for ($name) { s/\W+/_/g; s/^(\d)/s$1/ } push @result, $name => \%services; } return @result; } # ====================================================================== # Naming? SOAP::Service::Schema? package SOAP::Schema; use Carp (); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; return $self if ref $self; unless (ref $self) { my $class = $self; require LWP::UserAgent; $self = bless { '_deserializer' => SOAP::Schema::Deserializer->new, '_useragent' => LWP::UserAgent->new, }, $class; SOAP::Trace::objects('()'); } Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); no strict qw(refs); while (@_) { my $method = shift; $self->$method(shift) if $self->can($method) } return $self; } sub schema { warn "SOAP::Schema->schema has been deprecated. " . "Please use SOAP::Schema->schema_url instead."; return shift->schema_url(@_); } sub BEGIN { no strict 'refs'; for my $method (qw(deserializer schema_url services useragent stub cache_dir cache_ttl)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; @_ ? ($self->{$field} = shift, return $self) : return $self->{$field}; } } } sub parse { my $self = shift; my $s = $self->deserializer->deserialize($self->access)->root; # here should be something that defines what schema description we want to use $self->services({SOAP::Schema::WSDL->base($self->schema_url)->useragent($self->useragent)->parse($s, @_)}); } sub refresh_cache { my $self = shift; my ($filename,$contents) = @_; open CACHE,">$filename" or Carp::croak "Could not open cache file for writing: $!"; print CACHE $contents; close CACHE; } sub load { my $self = shift->new; local $^W; # suppress warnings about redefining foreach (keys %{$self->services || Carp::croak 'Nothing to load. Schema is not specified'}) { # TODO - check age of cached file, and delete if older than configured amount if ($self->cache_dir) { my $cached_file = File::Spec->catfile($self->cache_dir,$_.".pm"); my $ttl = $self->cache_ttl || $SOAP::Constants::DEFAULT_CACHE_TTL; open (CACHE, "<$cached_file"); my @stat = stat($cached_file) unless eof(CACHE); close CACHE; if (@stat) { # Cache exists my $cache_lived = time() - $stat[9]; if ($ttl > 0 && $cache_lived > $ttl) { $self->refresh_cache($cached_file,$self->generate_stub($_)); } } else { # Cache doesn't exist $self->refresh_cache($cached_file,$self->generate_stub($_)); } push @INC,$self->cache_dir; eval "require $_" or Carp::croak "Could not load cached file: $@"; } else { eval $self->generate_stub($_) or Carp::croak "Bad stub: $@"; } } $self; } sub access { my $self = shift->new; my $url = shift || $self->schema_url || Carp::croak 'Nothing to access. URL is not specified'; $self->useragent->env_proxy if $ENV{'HTTP_proxy'}; my $req = HTTP::Request->new(GET => $url); $req->proxy_authorization_basic($ENV{'HTTP_proxy_user'}, $ENV{'HTTP_proxy_pass'}) if ($ENV{'HTTP_proxy_user'} && $ENV{'HTTP_proxy_pass'}); my $resp = $self->useragent->request($req); $resp->is_success ? $resp->content : die "Service description '$url' can't be loaded: ", $resp->status_line, "\n"; } sub generate_stub { my $self = shift->new; my $package = shift; my $services = $self->services->{$package}; my $schema_url = $self->schema_url; $self->{'_stub'} = <<"EOP"; package $package; # Generated by SOAP::Lite (v$SOAP::Lite::VERSION) for Perl -- soaplite.com # Copyright (C) 2000-2006 Paul Kulchenko, Byrne Reese # -- generated at [@{[scalar localtime]}] EOP $self->{'_stub'} .= "# -- generated from $schema_url\n" if $schema_url; $self->{'_stub'} .= 'my %methods = ('."\n"; foreach my $service (keys %$services) { $self->{'_stub'} .= "'$service' => {\n"; foreach (qw(endpoint soapaction namespace)) { $self->{'_stub'} .= " $_ => '".$services->{$service}{$_}."',\n"; } $self->{'_stub'} .= " parameters => [\n"; foreach (@{$services->{$service}{parameters}}) { # This is a workaround for https://sourceforge.net/tracker/index.php?func=detail&aid=2001592&group_id=66000&atid=513017 next unless ref $_; $self->{'_stub'} .= " SOAP::Data->new(name => '".$_->name."', type => '".$_->type."', attr => {"; $self->{'_stub'} .= do { my %attr = %{$_->attr}; join(', ', map {"'$_' => '$attr{$_}'"} grep {/^xmlns:(?!-)/} keys %attr); }; $self->{'_stub'} .= "}),\n"; } $self->{'_stub'} .= " ], # end parameters\n"; $self->{'_stub'} .= " }, # end $service\n"; } $self->{'_stub'} .= "); # end my %methods\n"; $self->{'_stub'} .= <<'EOP'; use SOAP::Lite; use Exporter; use Carp (); use vars qw(@ISA $AUTOLOAD @EXPORT_OK %EXPORT_TAGS); @ISA = qw(Exporter SOAP::Lite); @EXPORT_OK = (keys %methods); %EXPORT_TAGS = ('all' => [@EXPORT_OK]); sub _call { my ($self, $method) = (shift, shift); my $name = UNIVERSAL::isa($method => 'SOAP::Data') ? $method->name : $method; my %method = %{$methods{$name}}; $self->proxy($method{endpoint} || Carp::croak "No server address (proxy) specified") unless $self->proxy; my @templates = @{$method{parameters}}; my @parameters = (); foreach my $param (@_) { if (@templates) { my $template = shift @templates; my ($prefix,$typename) = SOAP::Utils::splitqname($template->type); my $method = 'as_'.$typename; # TODO - if can('as_'.$typename) {...} my $result = $self->serializer->$method($param, $template->name, $template->type, $template->attr); push(@parameters, $template->value($result->[2])); } else { push(@parameters, $param); } } $self->endpoint($method{endpoint}) ->ns($method{namespace}) ->on_action(sub{qq!"$method{soapaction}"!}); EOP my $namespaces = $self->deserializer->ids->[1]; foreach my $key (keys %{$namespaces}) { my ($ns,$prefix) = SOAP::Utils::splitqname($key); $self->{'_stub'} .= ' $self->serializer->register_ns("'.$namespaces->{$key}.'","'.$prefix.'");'."\n" if (defined $ns && ($ns eq "xmlns")); } $self->{'_stub'} .= <<'EOP'; my $som = $self->SUPER::call($method => @parameters); if ($self->want_som) { return $som; } UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall : $som->result : $som; } sub BEGIN { no strict 'refs'; for my $method (qw(want_som)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; @_ ? ($self->{$field} = shift, return $self) : return $self->{$field}; } } } no strict 'refs'; for my $method (@EXPORT_OK) { my %method = %{$methods{$method}}; *$method = sub { my $self = UNIVERSAL::isa($_[0] => __PACKAGE__) ? ref $_[0] ? shift # OBJECT # CLASS, either get self or create new and assign to self : (shift->self || __PACKAGE__->self(__PACKAGE__->new)) # function call, either get self or create new and assign to self : (__PACKAGE__->self || __PACKAGE__->self(__PACKAGE__->new)); $self->_call($method, @_); } } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY' || $method eq 'want_som'; die "Unrecognized method '$method'. List of available method(s): @EXPORT_OK\n"; } 1; EOP return $self->stub; } # ====================================================================== package SOAP; use vars qw($AUTOLOAD); require URI; my $soap; # shared between SOAP and SOAP::Lite packages { no strict 'refs'; *AUTOLOAD = sub { local($1,$2); my($package, $method) = $AUTOLOAD =~ m/(?:(.+)::)([^:]+)$/; return if $method eq 'DESTROY'; my $soap = ref $_[0] && UNIVERSAL::isa($_[0] => 'SOAP::Lite') ? $_[0] : $soap || die "SOAP:: prefix shall only be used in combination with +autodispatch option\n"; my $uri = URI->new($soap->uri); my $currenturi = $uri->path; $package = ref $_[0] && UNIVERSAL::isa($_[0] => 'SOAP::Lite') ? $currenturi : $package eq 'SOAP' ? ref $_[0] || ($_[0] eq 'SOAP' ? $currenturi || Carp::croak "URI is not specified for method call" : $_[0]) : $package eq 'main' ? $currenturi || $package : $package; # drop first parameter if it's a class name { my $pack = $package; for ($pack) { s!^/!!; s!/!::!g; } shift @_ if @_ && !ref $_[0] && ($_[0] eq $pack || $_[0] eq 'SOAP') || ref $_[0] && UNIVERSAL::isa($_[0] => 'SOAP::Lite'); } for ($package) { s!::!/!g; s!^/?!/!; } $uri->path($package); my $som = $soap->uri($uri->as_string)->call($method => @_); UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall : $som->result : $som; }; } # ====================================================================== package SOAP::Lite; use vars qw($AUTOLOAD @ISA); use Carp (); use SOAP::Lite::Utils; use SOAP::Constants; use SOAP::Packager; use Scalar::Util qw(weaken blessed); @ISA = qw(SOAP::Cloneable); # provide access to global/autodispatched object sub self { @_ > 1 ? $soap = $_[1] : $soap } # no more warnings about "used only once" *UNIVERSAL::AUTOLOAD if 0; sub autodispatched { \&{*UNIVERSAL::AUTOLOAD} eq \&{*SOAP::AUTOLOAD} }; sub on_debug { my $self = shift; my ($logger) = @_; #print "DEBUG: self=$self\n"; #print "DEBUG: logger=$logger\n"; #print "DEBUG: transport=$self->transport\n"; #print "DEBUG: Lite.pm: calling setDebugLogger\n"; $self->transport->setDebugLogger($logger); } sub soapversion { my $self = shift; my $version = shift or return $SOAP::Constants::SOAP_VERSION; ($version) = grep { $SOAP::Constants::SOAP_VERSIONS{$_}->{NS_ENV} eq $version } keys %SOAP::Constants::SOAP_VERSIONS unless exists $SOAP::Constants::SOAP_VERSIONS{$version}; die qq!$SOAP::Constants::WRONG_VERSION Supported versions:\n@{[ join "\n", map {" $_ ($SOAP::Constants::SOAP_VERSIONS{$_}->{NS_ENV})"} keys %SOAP::Constants::SOAP_VERSIONS ]}\n! unless defined($version) && defined(my $def = $SOAP::Constants::SOAP_VERSIONS{$version}); foreach (keys %$def) { eval "\$SOAP::Constants::$_ = '$SOAP::Constants::SOAP_VERSIONS{$version}->{$_}'"; } $SOAP::Constants::SOAP_VERSION = $version; return $self; } BEGIN { SOAP::Lite->soapversion(1.1) } sub import { my $pkg = shift; my $caller = caller; no strict 'refs'; # emulate 'use SOAP::Lite 0.99' behavior $pkg->require_version(shift) if defined $_[0] && $_[0] =~ /^\d/; while (@_) { my $command = shift; my @parameters = UNIVERSAL::isa($_[0] => 'ARRAY') ? @{shift()} : shift if @_ && $command ne 'autodispatch'; if ($command eq 'autodispatch' || $command eq 'dispatch_from') { $soap = ($soap||$pkg)->new; no strict 'refs'; foreach ($command eq 'autodispatch' ? 'UNIVERSAL' : @parameters ) { my $sub = "${_}::AUTOLOAD"; defined &{*$sub} ? (\&{*$sub} eq \&{*SOAP::AUTOLOAD} ? () : Carp::croak "$sub already assigned and won't work with DISPATCH. Died") : (*$sub = *SOAP::AUTOLOAD); } } elsif ($command eq 'service') { foreach (keys %{SOAP::Schema->schema_url(shift(@parameters))->parse(@parameters)->load->services}) { $_->export_to_level(1, undef, ':all'); } } elsif ($command eq 'debug' || $command eq 'trace') { SOAP::Trace->import(@parameters ? @parameters : 'all'); } elsif ($command eq 'import') { local $^W; # suppress warnings about redefining my $package = shift(@parameters); $package->export_to_level(1, undef, @parameters ? @parameters : ':all') if $package; } else { Carp::carp "Odd (wrong?) number of parameters in import(), still continue" if $^W && !(@parameters & 1); $soap = ($soap||$pkg)->$command(@parameters); } } } sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; return $self if ref $self; unless (ref $self) { my $class = $self; # Check whether we can clone. Only the SAME class allowed, no inheritance $self = ref($soap) eq $class ? $soap->clone : { _transport => SOAP::Transport->new, _serializer => SOAP::Serializer->new, _deserializer => SOAP::Deserializer->new, _packager => SOAP::Packager::MIME->new, _schema => undef, _autoresult => 0, _on_action => sub { sprintf '"%s#%s"', shift || '', shift }, _on_fault => sub {ref $_[1] ? return $_[1] : Carp::croak $_[0]->transport->is_success ? $_[1] : $_[0]->transport->status}, }; bless $self => $class; $self->on_nonserialized($self->on_nonserialized || $self->serializer->on_nonserialized); SOAP::Trace::objects('()'); } Carp::carp "Odd (wrong?) number of parameters in new()" if $^W && (@_ & 1); no strict qw(refs); while (@_) { my($method, $params) = splice(@_,0,2); $self->can($method) ? $self->$method(ref $params eq 'ARRAY' ? @$params : $params) : $^W && Carp::carp "Unrecognized parameter '$method' in new()" } return $self; } sub init_context { my $self = shift->new; $self->{'_deserializer'}->{'_context'} = $self; # weaken circular reference to avoid a memory hole weaken $self->{'_deserializer'}->{'_context'}; $self->{'_serializer'}->{'_context'} = $self; # weaken circular reference to avoid a memory hole weaken $self->{'_serializer'}->{'_context'}; } # Naming? wsdl_parser sub schema { my $self = shift; if (@_) { $self->{'_schema'} = shift; return $self; } else { if (!defined $self->{'_schema'}) { $self->{'_schema'} = SOAP::Schema->new; } return $self->{'_schema'}; } } sub BEGIN { no strict 'refs'; for my $method (qw(serializer deserializer)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; if (@_) { my $context = $self->{$field}->{'_context'}; # save the old context $self->{$field} = shift; $self->{$field}->{'_context'} = $context; # restore the old context return $self; } else { return $self->{$field}; } } } __PACKAGE__->__mk_accessors( qw(endpoint transport outputxml autoresult packager) ); # for my $method () { # my $field = '_' . $method; # *$method = sub { # my $self = shift->new; # @_ ? ($self->{$field} = shift, return $self) : return $self->{$field}; # } # } for my $method (qw(on_action on_fault on_nonserialized)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; return $self->{$field} unless @_; local $@; # commented out because that 'eval' was unsecure # > ref $_[0] eq 'CODE' ? shift : eval shift; # Am I paranoid enough? $self->{$field} = shift; Carp::croak $@ if $@; Carp::croak "$method() expects subroutine (CODE) or string that evaluates into subroutine (CODE)" unless ref $self->{$field} eq 'CODE'; return $self; } } # SOAP::Transport Shortcuts # TODO - deprecate proxy() in favor of new language endpoint_url() no strict qw(refs); for my $method (qw(proxy)) { *$method = sub { my $self = shift->new; @_ ? ($self->transport->$method(@_), return $self) : return $self->transport->$method(); } } # SOAP::Seriailizer Shortcuts for my $method (qw(autotype readable envprefix encodingStyle bodyattr headerattr encprefix multirefinplace encoding typelookup header maptype xmlschema uri ns_prefix ns_uri use_prefix use_default_ns ns default_ns)) { *$method = sub { my $self = shift->new; @_ ? ($self->serializer->$method(@_), return $self) : return $self->serializer->$method(); } } # SOAP::Schema Shortcuts for my $method (qw(cache_dir cache_ttl)) { *$method = sub { my $self = shift->new; @_ ? ($self->schema->$method(@_), return $self) : return $self->schema->$method(); } } } sub parts { my $self = shift; $self->packager->parts(@_); return $self; } # Naming? wsdl sub service { my $self = shift->new; return $self->{'_service'} unless @_; $self->schema->schema_url($self->{'_service'} = shift); my %services = %{$self->schema->parse(@_)->load->services}; Carp::croak "More than one service in service description. Service and port names have to be specified\n" if keys %services > 1; my $service = (keys %services)[0]->new; return $service; } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY'; ref $_[0] or Carp::croak qq!Can\'t locate class method "$method" via package \"! . __PACKAGE__ .'\"'; no strict 'refs'; *$AUTOLOAD = sub { my $self = shift; my $som = $self->call($method => @_); return $self->autoresult && UNIVERSAL::isa($som => 'SOAP::SOM') ? wantarray ? $som->paramsall : $som->result : $som; }; goto &$AUTOLOAD; } sub call { SOAP::Trace::trace('()'); my $self = shift; die "A service address has not been specified either by using SOAP::Lite->proxy() or a service description)\n" unless defined $self->proxy && UNIVERSAL::isa($self->proxy => 'SOAP::Client'); $self->init_context(); my $serializer = $self->serializer; $serializer->on_nonserialized($self->on_nonserialized); my $response = $self->transport->send_receive( context => $self, # this is provided for context endpoint => $self->endpoint, action => scalar($self->on_action->($serializer->uriformethod($_[0]))), # leave only parameters so we can later update them if required envelope => $serializer->envelope(method => shift, @_), encoding => $serializer->encoding, parts => @{$self->packager->parts} ? $self->packager->parts : undef, ); return $response if $self->outputxml; my $result = eval { $self->deserializer->deserialize($response) } if $response; if (!$self->transport->is_success || # transport fault $@ || # not deserializible # fault message even if transport OK # or no transport error (for example, fo TCP, POP3, IO implementations) UNIVERSAL::isa($result => 'SOAP::SOM') && $result->fault) { return ($self->on_fault->($self, $@ ? $@ . ($response || '') : $result) || $result ); # ? # trick editors } # this might be trouble for connection close... return unless $response; # nothing to do for one-ways # little bit tricky part that binds in/out parameters if (UNIVERSAL::isa($result => 'SOAP::SOM') && ($result->paramsout || $result->headers) && $serializer->signature) { my $num = 0; my %signatures = map {$_ => $num++} @{$serializer->signature}; for ($result->dataof(SOAP::SOM::paramsout), $result->dataof(SOAP::SOM::headers)) { my $signature = join $;, $_->name, $_->type || ''; if (exists $signatures{$signature}) { my $param = $signatures{$signature}; my($value) = $_->value; # take first value # fillup parameters UNIVERSAL::isa($_[$param] => 'SOAP::Data') ? $_[$param]->SOAP::Data::value($value) : UNIVERSAL::isa($_[$param] => 'ARRAY') ? (@{$_[$param]} = @$value) : UNIVERSAL::isa($_[$param] => 'HASH') ? (%{$_[$param]} = %$value) : UNIVERSAL::isa($_[$param] => 'SCALAR') ? (${$_[$param]} = $$value) : ($_[$param] = $value) } } } return $result; } # end of call() # ====================================================================== package SOAP::Lite::COM; require SOAP::Lite; sub required { foreach (qw( URI::_foreign URI::http URI::https LWP::Protocol::http LWP::Protocol::https LWP::Authen::Basic LWP::Authen::Digest HTTP::Daemon Compress::Zlib SOAP::Transport::HTTP XMLRPC::Lite XMLRPC::Transport::HTTP )) { eval join ';', 'local $SIG{__DIE__}', "require $_"; } } sub new { required; SOAP::Lite->new(@_) } sub create; *create = \&new; # make alias. Somewhere 'new' is registered keyword sub soap; *soap = \&new; # also alias. Just to be consistent with .xmlrpc call sub xmlrpc { required; XMLRPC::Lite->new(@_) } sub server { required; shift->new(@_) } sub data { SOAP::Data->new(@_) } sub header { SOAP::Header->new(@_) } sub hash { +{@_} } sub instanceof { my $class = shift; die "Incorrect class name" unless $class =~ /^(\w[\w:]*)$/; eval "require $class"; $class->new(@_); } # ====================================================================== 1; __END__ =pod =head1 NAME SOAP::Lite - Perl's Web Services Toolkit =head1 DESCRIPTION SOAP::Lite is a collection of Perl modules which provides a simple and lightweight interface to the Simple Object Access Protocol (SOAP) both on client and server side. =head1 PERL VERSION WARNING As of version SOAP::Lite version 1.05, no perl versions before 5.8 will be supported. SOAP::Lite 0.71 will be the last version of SOAP::Lite running on perl 5.005 Future versions of SOAP::Lite will require at least perl 5.6.0 If you have not had the time to upgrade your perl, you should consider this now. =head1 OVERVIEW OF CLASSES AND PACKAGES =over =item F L - Main class provides all logic L - Transport backend L - Data objects L - Header Data Objects L - Serializes data structures to SOAP messages L - Deserializes SOAP messages into SOAP::SOM objects L - SOAP Message objects L - Provides access to common constants and defaults L - Tracing facilities L - Provides access and stub(s) for schema(s) L - WSDL implementation for SOAP::Schema L - Handles requests on server side SOAP::Server::Object - Handles objects-by-reference L - Provides support for Faults on server side L - A set of private and public utility subroutines =item F L - Provides an abstract class for implementing custom packagers. L - Provides MIME support to SOAP::Lite L - Provides DIME support to SOAP::Lite =item F L - Client interface to HTTP transport L - Server interface to HTTP transport L - CGI implementation of server interface L - Daemon implementation of server interface L - mod_perl implementation of server interface =item F L - Server interface to POP3 protocol =item F L - Client interface to SMTP/sendmail =item F L - Client interface to local transport =item F L - Server interface to TCP protocol L - Client interface to TCP protocol =item F L - Server interface to IO transport =back =head1 METHODS All accessor methods return the current value when called with no arguments, while returning the object reference itself when called with a new value. This allows the set-attribute calls to be chained together. =over =item new(optional key/value pairs) $client = SOAP::Lite->new(proxy => $endpoint) Constructor. Many of the accessor methods defined here may be initialized at creation by providing their name as a key, followed by the desired value. The example provides the value for the proxy element of the client. =item transport(optional transport object) $transp = $client->transport( ); Gets or sets the transport object used for sending/receiving SOAP messages. See L for details. =item serializer(optional serializer object) $serial = $client->serializer( ) Gets or sets the serializer object used for creating XML messages. See L for details. =item packager(optional packager object) $packager = $client->packager( ) Provides access to the C object that the client uses to manage the use of attachments. The default packager is a MIME packager, but unless you specify parts to send, no MIME formatting will be done. See also: L. =item proxy(endpoint, optional extra arguments) $client->proxy('http://soap.xml.info/ endPoint'); The proxy is the server or endpoint to which the client is going to connect. This method allows the setting of the endpoint, along with any extra information that the transport object may need when communicating the request. This method is actually an alias to the proxy method of L. It is the same as typing: $client->transport( )->proxy(...arguments); Extra parameters can be passed to proxy() - see below. =over =item compress_threshold See L in L. =item All initialization options from the underlying transport layer The options for HTTP(S) are the same as for LWP::UserAgent's new() method. A common option is to create a instance of HTTP::Cookies and pass it as cookie_jar option: my $cookie_jar = HTTP::Cookies->new() $client->proxy('http://www.example.org/webservice', cookie_jar => $cookie_jar, ); =back For example, if you wish to set the HTTP timeout for a SOAP::Lite client to 5 seconds, use the following code: my $soap = SOAP::Lite ->uri($uri) ->proxy($proxyUrl, timeout => 5 ); See L. =item endpoint(optional new endpoint address) $client->endpoint('http://soap.xml.info/ newPoint') It may be preferable to set a new endpoint without the additional work of examining the new address for protocol information and checking to ensure the support code is loaded and available. This method allows the caller to change the endpoint that the client is currently set to connect to, without reloading the relevant transport code. Note that the proxy method must have been called before this method is used. =item service(service URL) $client->service('http://svc.perl.org/Svc.wsdl'); C offers some support for creating method stubs from service descriptions. At present, only WSDL support is in place. This method loads the specified WSDL schema and uses it as the basis for generating stubs. =item outputxml(boolean) $client->outputxml('true'); When set to a true value, the raw XML is returned by the call to a remote method. The default is to return the a L object (false). =item autotype(boolean) $client->autotype(0); This method is a shortcut for: $client->serializer->autotype(boolean); By default, the serializer tries to automatically deduce types for the data being sent in a message. Setting a false value with this method disables the behavior. =item readable(boolean) $client->readable(1); This method is a shortcut for: $client->serializer->readable(boolean); When this is used to set a true value for this property, the generated XML sent to the endpoint has extra characters (spaces and new lines) added in to make the XML itself more readable to human eyes (presumably for debugging). The default is to not send any additional characters. =item headerattr(hash reference of attributes) $obj->headerattr({ attr1 => 'value' }); Allows for the setting of arbitrary attributes on the header object. Keep in mind the requirement that any attributes not natively known to SOAP must be namespace-qualified. If using $session->call ($method, $callData, $callHeader), SOAP::Lite serializes the informations as xxxxx yyyyy The attributes, given to headerattr are placed into the Header as =item bodyattr(hash reference of attributes) $obj->bodyattr({ attr1 => 'value' }); Allows for the setting of arbitrary attributes on the body object. Keep in mind the requirement that any attributes not natively known to SOAP must be namespace-qualified. See L =item default_ns($uri) Sets the default namespace for the request to the specified uri. This overrides any previous namespace declaration that may have been set using a previous call to C or C. Setting the default namespace causes elements to be serialized without a namespace prefix, like this: Some .NET web services have been reported to require this XML namespace idiom. =item ns($uri,$prefix=undef) Sets the namespace uri and optionally the namespace prefix for the request to the specified values. This overrides any previous namespace declaration that may have been set using a previous call to C or C. If a prefix is not specified, one will be generated for you automatically. Setting the namespace causes elements to be serialized with a declared namespace prefix, like this: =item use_prefix(boolean) Deprecated. Use the C and C methods described above. Shortcut for C<< serializer->use_prefix() >>. This lets you turn on/off the use of a namespace prefix for the children of the /Envelope/Body element. Default is 'true'. When use_prefix is set to 'true', serialized XML will look like this: When use_prefix is set to 'false', serialized XML will look like this: Some .NET web services have been reported to require this XML namespace idiom. =item soapversion(optional value) $client->soapversion('1.2'); If no parameter is given, returns the current version of SOAP that is being used by the client object to encode requests. If a parameter is given, the method attempts to set that as the version of SOAP being used. The value should be either 1.1 or 1.2. =item envprefix(QName) $client->envprefix('env'); This method is a shortcut for: $client->serializer->envprefix(QName); Gets or sets the namespace prefix for the SOAP namespace. The default is SOAP. The prefix itself has no meaning, but applications may wish to chose one explicitly to denote different versions of SOAP or the like. =item encprefix(QName) $client->encprefix('enc'); This method is a shortcut for: $client->serializer->encprefix(QName); Gets or sets the namespace prefix for the encoding rules namespace. The default value is SOAP-ENC. =back While it may seem to be an unnecessary operation to set a value that isn't relevant to the message, such as the namespace labels for the envelope and encoding URNs, the ability to set these labels explicitly can prove to be a great aid in distinguishing and debugging messages on the server side of operations. =over =item encoding(encoding URN) $client->encoding($soap_12_encoding_URN); This method is a shortcut for: $client->serializer->encoding(args); Where the earlier method dealt with the label used for the attributes related to the SOAP encoding scheme, this method actually sets the URN to be specified as the encoding scheme for the message. The default is to specify the encoding for SOAP 1.1, so this is handy for applications that need to encode according to SOAP 1.2 rules. =item typelookup $client->typelookup; This method is a shortcut for: $client->serializer->typelookup; Gives the application access to the type-lookup table from the serializer object. See the section on L. =item uri(service specifier) Deprecated - the C subroutine is deprecated in order to provide a more intuitive naming scheme for subroutines that set namespaces. In the future, you will be required to use either the C or C subroutines instead of C. $client->uri($service_uri); This method is a shortcut for: $client->serializer->uri(service); The URI associated with this accessor on a client object is the service-specifier for the request, often encoded for HTTP-based requests as the SOAPAction header. While the names may seem confusing, this method doesn't specify the endpoint itself. In most circumstances, the C refers to the namespace used for the request. Often times, the value may look like a valid URL. Despite this, it doesn't have to point to an existing resource (and often doesn't). This method sets and retrieves this value from the object. Note that no transport code is triggered by this because it has no direct effect on the transport of the object. =item multirefinplace(boolean) $client->multirefinplace(1); This method is a shortcut for: $client->serializer->multirefinplace(boolean); Controls how the serializer handles values that have multiple references to them. Recall from previous SOAP chapters that a value may be tagged with an identifier, then referred to in several places. When this is the case for a value, the serializer defaults to putting the data element towards the top of the message, right after the opening tag of the method-specification. It is serialized as a standalone entity with an ID that is then referenced at the relevant places later on. If this method is used to set a true value, the behavior is different. When the multirefinplace attribute is true, the data is serialized at the first place that references it, rather than as a separate element higher up in the body. This is more compact but may be harder to read or trace in a debugging environment. =item parts( ARRAY ) Used to specify an array of L's to be attached to the transmitted SOAP message. Attachments that are returned in a response can be accessed by C. =item self $ref = SOAP::Lite->self; Returns an object reference to the default global object the C package maintains. This is the object that processes many of the arguments when provided on the use line. =back The following method isn't an accessor style of method but neither does it fit with the group that immediately follows it: =over =item call(arguments) $client->call($method => @arguments); As has been illustrated in previous chapters, the C client objects can manage remote calls with auto-dispatching using some of Perl's more elaborate features. call is used when the application wants a greater degree of control over the details of the call itself. The method may be built up from a L object, so as to allow full control over the namespace associated with the tag, as well as other attributes like encoding. This is also important for calling methods that contain characters not allowable in Perl function names, such as A.B.C. =back The next four methods used in the C class are geared towards handling the types of events than can occur during the message lifecycle. Each of these sets up a callback for the event in question: =over =item on_action(callback) $client->on_action(sub { qq("$_[0]") }); Triggered when the transport object sets up the SOAPAction header for an HTTP-based call. The default is to set the header to the string, uri#method, in which URI is the value set by the uri method described earlier, and method is the name of the method being called. When called, the routine referenced (or the closure, if specified as in the example) is given two arguments, uri and method, in that order. .NET web services usually expect C as separator for C and C. To change SOAP::Lite's behaviour to use uri/method as SOAPAction header, use the following code: $client->on_action( sub { join '/', @_ } ); =item on_fault(callback) $client->on_fault(sub { popup_dialog($_[1]) }); Triggered when a method call results in a fault response from the server. When it is called, the argument list is first the client object itself, followed by the object that encapsulates the fault. In the example, the fault object is passed (without the client object) to a hypothetical GUI function that presents an error dialog with the text of fault extracted from the object (which is covered shortly under the L methods). =item on_nonserialized(callback) $client->on_nonserialized(sub { die "$_[0]?!?" }); Occasionally, the serializer may be given data it can't turn into SOAP-savvy XML; for example, if a program bug results in a code reference or something similar being passed in as a parameter to method call. When that happens, this callback is activated, with one argument. That argument is the data item that could not be understood. It will be the only argument. If the routine returns, the return value is pasted into the message as the serialization. Generally, an error is in order, and this callback allows for control over signaling that error. =item on_debug(callback) $client->on_debug(sub { print @_ }); Deprecated. Use the global +debug and +trace facilities described in L Note that this method will not work as expected: Instead of affecting the debugging behaviour of the object called on, it will globally affect the debugging behaviour for all objects of that class. =back =head1 WRITING A SOAP CLIENT This chapter guides you to writing a SOAP client by example. The SOAP service to be accessed is a simple variation of the well-known hello world program. It accepts two parameters, a name and a given name, and returns "Hello $given_name $name". We will use "Martin Kutter" as the name for the call, so all variants will print the following message on success: Hello Martin Kutter! =head2 SOAP message styles There are three common (and one less common) variants of SOAP messages. These address the message style (positional parameters vs. specified message documents) and encoding (as-is vs. typed). The different message styles are: =over =item * rpc/encoded Typed, positional parameters. Widely used in scripting languages. The type of the arguments is included in the message. Arrays and the like may be encoded using SOAP encoding rules (or others). =item * rpc/literal As-is, positional parameters. The type of arguments is defined by some pre-exchanged interface definition. =item * document/encoded Specified message with typed elements. Rarely used. =item * document/literal Specified message with as-is elements. The message specification and element types are defined by some pre-exchanged interface definition. =back As of 2008, document/literal has become the predominant SOAP message variant. rpc/literal and rpc/encoded are still in use, mainly with scripting languages, while document/encoded is hardly used at all. You will see clients for the rpc/encoded and document/literal SOAP variants in this section. =head2 Example implementations =head3 RPC/ENCODED Rpc/encoded is most popular with scripting languages like perl, php and python without the use of a WSDL. Usual method descriptions look like this: Method: sayHello(string, string) Parameters: name: string givenName: string Such a description usually means that you can call a method named "sayHello" with two positional parameters, "name" and "givenName", which both are strings. The message corresponding to this description looks somewhat like this: Kutter Martin Any XML tag names may be used instead of the "s-gensym01" stuff - parameters are positional, the tag names have no meaning. A client producing such a call is implemented like this: use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', 'Kutter', 'Martin'); die $som->faultstring if ($som->fault); print $som->result, "\n"; You can of course use a one-liner, too... Sometimes, rpc/encoded interfaces are described with WSDL definitions. A WSDL accepting "named" parameters with rpc/encoded looks like this: The message corresponding to this schema looks like this: Kutter Martin A web service client using this schema looks like this: use SOAP::Lite; my $soap = SOAP::Lite->service("file:say_hello_rpcenc.wsdl"); eval { my $result = $soap->sayHello('Kutter', 'Martin'); }; if ($@) { die $@; } print $som->result(); You may of course also use the following one-liner: perl -MSOAP::Lite -e 'print SOAP::Lite->service("file:say_hello_rpcenc.wsdl")\ ->sayHello('Kutter', 'Martin'), "\n";' A web service client (without a service description) looks like this. use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('name')->value('Kutter'), SOAP::Data->name('givenName')->value('Martin') ); die $som->faultstring if ($som->fault); print $som->result, "\n"; =head3 RPC/LITERAL SOAP web services using the document/literal message encoding are usually described by some Web Service Definition. Our web service has the following WSDL description: The XML message (inside the SOAP Envelope) look like this: Kutter Martin Hello Martin Kutter! This is the SOAP::Lite implementation for the web service client: use SOAP::Lite +trace; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0)->readable(1); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('parameters')->value( \SOAP::Data->value([ SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ])) ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n"; =head3 DOCUMENT/LITERAL SOAP web services using the document/literal message encoding are usually described by some Web Service Definition. Our web service has the following WSDL description: The XML message (inside the SOAP Envelope) look like this: Kutter Martin Hello Martin Kutter! You can call this web service with the following client code: use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call("sayHello", SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n"; =head2 Differences between the implementations You may have noticed that there's little difference between the rpc/encoded, rpc/literal and the document/literal example's implementation. In fact, from SOAP::Lite's point of view, the only differences between rpc/literal and document/literal that parameters are always named. In our example, the rpc/encoded variant already used named parameters (by using two messages), so there's no difference at all. You may have noticed the somewhat strange idiom for passing a list of named parameters in the rpc/literal example: my $som = $soap->call('sayHello', SOAP::Data->name('parameters')->value( \SOAP::Data->value([ SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ])) ); While SOAP::Data provides full control over the XML generated, passing hash-like structures require additional coding. =head1 WRITING A SOAP SERVER See L, or L. =head1 FEATURES =head2 ATTACHMENTS C features support for the SOAP with Attachments specification. Currently, SOAP::Lite only supports MIME based attachments. DIME based attachments are yet to be fully functional. =head3 EXAMPLES =head4 Client sending an attachment C clients can specify attachments to be sent along with a request by using the C method, which takes as an argument an ARRAY of C's. use SOAP::Lite; use MIME::Entity; my $ent = build MIME::Entity Type => "image/gif", Encoding => "base64", Path => "somefile.gif", Filename => "saveme.gif", Disposition => "attachment"; my $som = SOAP::Lite ->uri($SOME_NAMESPACE) ->parts([ $ent ]) ->proxy($SOME_HOST) ->some_method(SOAP::Data->name("foo" => "bar")); =head4 Client retrieving an attachment A client accessing attachments that were returned in a response by using the C accessor. use SOAP::Lite; use MIME::Entity; my $soap = SOAP::Lite ->uri($NS) ->proxy($HOST); my $som = $soap->foo(); foreach my $part (${$som->parts}) { print $part->stringify; } =head4 Server receiving an attachment Servers, like clients, use the S module to access attachments transmitted to it. package Attachment; use SOAP::Lite; use MIME::Entity; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub someMethod { my $self = shift; my $envelope = pop; foreach my $part (@{$envelope->parts}) { print "AttachmentService: attachment found! (".ref($part).")\n"; } # do something } =head4 Server responding with an attachment Servers wishing to return an attachment to the calling client need only return C objects along with SOAP::Data elements, or any other data intended for the response. package Attachment; use SOAP::Lite; use MIME::Entity; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub someMethod { my $self = shift; my $envelope = pop; my $ent = build MIME::Entity 'Id' => "<1234>", 'Type' => "text/xml", 'Path' => "some.xml", 'Filename' => "some.xml", 'Disposition' => "attachment"; return SOAP::Data->name("foo" => "blah blah blah"),$ent; } =head2 DEFAULT SETTINGS Though this feature looks similar to L they have (almost) nothing in common. This capability allows you specify default settings so that all objects created after that will be initialized with the proper default settings. If you wish to provide common C or C settings for all C objects in your application you may do: use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi', uri => 'http://my.own.com/My/Examples'; my $soap1 = new SOAP::Lite; # will get the same proxy()/uri() as above print $soap1->getStateName(1)->result; my $soap2 = SOAP::Lite->new; # same thing as above print $soap2->getStateName(2)->result; # or you may override any settings you want my $soap3 = SOAP::Lite->proxy('http://localhost/'); print $soap3->getStateName(1)->result; B C properties can be propagated this way. Changes in object copies will not affect global settings and you may still change global settings with C<< SOAP::Lite->self >> call which returns reference to global object. Provided parameter will update this object and you can even set it to C: SOAP::Lite->self(undef); The C syntax also lets you specify default event handlers for your code. If you have different SOAP objects and want to share the same C (or C for that matter) handler. You can specify C during initialization for every object, but you may also do: use SOAP::Lite on_action => sub {sprintf '%s#%s', @_}; and this handler will be the default handler for all your SOAP objects. You can override it if you specify a handler for a particular object. See F for example of on_fault() handler. Be warned, that since C is executed at compile time B C statements will be executed B script execution that can make unexpected results. Consider code: use SOAP::Lite proxy => 'http://localhost/'; print SOAP::Lite->getStateName(1)->result; use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi'; print SOAP::Lite->getStateName(1)->result; B SOAP calls will go to C<'http://localhost/cgi-bin/soap.cgi'>. If you want to execute C at run-time, put it in C: eval "use SOAP::Lite proxy => 'http://localhost/cgi-bin/soap.cgi'; 1" or die; Or alternatively, SOAP::Lite->self->proxy('http://localhost/cgi-bin/soap.cgi'); =head2 SETTING MAXIMUM MESSAGE SIZE One feature of C is the ability to control the maximum size of a message a SOAP::Lite server will be allowed to process. To control this feature simply define C<$SOAP::Constants::MAX_CONTENT_SIZE> in your code like so: use SOAP::Transport::HTTP; use MIME::Entity; $SOAP::Constants::MAX_CONTENT_SIZE = 10000; SOAP::Transport::HTTP::CGI ->dispatch_to('TemperatureService') ->handle; =head2 IN/OUT, OUT PARAMETERS AND AUTOBINDING C gives you access to all parameters (both in/out and out) and also does some additional work for you. Lets consider following example: name1 name2 name3 In that case: $result = $r->result; # gives you 'name1' $paramout1 = $r->paramsout; # gives you 'name2', because of scalar context $paramout1 = ($r->paramsout)[0]; # gives you 'name2' also $paramout2 = ($r->paramsout)[1]; # gives you 'name3' or @paramsout = $r->paramsout; # gives you ARRAY of out parameters $paramout1 = $paramsout[0]; # gives you 'res2', same as ($r->paramsout)[0] $paramout2 = $paramsout[1]; # gives you 'res3', same as ($r->paramsout)[1] Generally, if server returns C you will get C<1> as the result and C<2> and C<3> as out parameters. If the server returns C you will get an ARRAY reference from C and C from C. Results can be arbitrary complex: they can be an array references, they can be objects, they can be anything and still be returned by C . If only one parameter is returned, C will return C. Furthermore, if you have in your output parameters a parameter with the same signature (name+type) as in the input parameters this parameter will be mapped into your input automatically. For example: B: sub mymethod { shift; # object/class reference my $param1 = shift; my $param2 = SOAP::Data->name('myparam' => shift() * 2); return $param1, $param2; } B: $a = 10; $b = SOAP::Data->name('myparam' => 12); $result = $soap->mymethod($a, $b); After that, C<< $result == 10 and $b->value == 24 >>! Magic? Sort of. Autobinding gives it to you. That will work with objects also with one difference: you do not need to worry about the name and the type of object parameter. Consider the C example (F and F): B: package My::PingPong; sub new { my $self = shift; my $class = ref($self) || $self; bless {_num=>shift} => $class; } sub next { my $self = shift; $self->{_num}++; } B: use SOAP::Lite +autodispatch => uri => 'urn:', proxy => 'http://localhost/'; my $p = My::PingPong->new(10); # $p->{_num} is 10 now, real object returned print $p->next, "\n"; # $p->{_num} is 11 now!, object autobinded =head2 STATIC AND DYNAMIC SERVICE DEPLOYMENT Let us scrutinize the deployment process. When designing your SOAP server you can consider two kind of deployment: B and B. For both, static and dynamic, you should specify C, C, C or C when creating Cing the SOAP::Lite module. The difference between static and dynamic deployment is that in case of 'dynamic', any module which is not present will be loaded on demand. See the L section for detailed description. When statically deploying a SOAP Server, you need to know all modules handling SOAP requests before. Dynamic deployment allows extending your SOAP Server's interface by just installing another module into the dispatch_to path (see below). =head3 STATIC DEPLOYMENT EXAMPLE use SOAP::Transport::HTTP; use My::Examples; # module is preloaded SOAP::Transport::HTTP::CGI # deployed module should be present here or client will get # 'access denied' -> dispatch_to('My::Examples') -> handle; For static deployment you should specify the MODULE name directly. You should also use static binding when you have several different classes in one file and want to make them available for SOAP calls. =head3 DYNAMIC DEPLOYMENT EXAMPLE use SOAP::Transport::HTTP; # name is unknown, module will be loaded on demand SOAP::Transport::HTTP::CGI # deployed module should be present here or client will get 'access denied' -> dispatch_to('/Your/Path/To/Deployed/Modules', 'My::Examples') -> handle; For dynamic deployment you can specify the name either directly (in that case it will be Cd without any restriction) or indirectly, with a PATH. In that case, the ONLY path that will be available will be the PATH given to the dispatch_to() method). For information how to handle this situation see L section. =head3 SUMMARY dispatch_to( # dynamic dispatch that allows access to ALL modules in specified directory PATH/TO/MODULES # 1. specifies directory # -- AND -- # 2. gives access to ALL modules in this directory without limits # static dispatch that allows access to ALL methods in particular MODULE MODULE # 1. gives access to particular module (all available methods) # PREREQUISITES: # module should be loaded manually (for example with 'use ...') # -- OR -- # you can still specify it in PATH/TO/MODULES # static dispatch that allows access to particular method ONLY MODULE::method # same as MODULE, but gives access to ONLY particular method, # so there is not much sense to use both MODULE and MODULE::method # for the same MODULE ); In addition to this C also supports an experimental syntax that allows you to bind a specific URL or SOAPAction to a CLASS/MODULE or object. For example: dispatch_with({ URI => MODULE, # 'http://www.soaplite.com/' => 'My::Class', SOAPAction => MODULE, # 'http://www.soaplite.com/method' => 'Another::Class', URI => object, # 'http://www.soaplite.com/obj' => My::Class->new, }) C is checked before C. You may use both the C and C methods in the same server, but note that C has a higher order of precedence. C will be checked only after C and C has been checked. See also: L, L =head2 COMPRESSION C provides you option to enable transparent compression over the wire. Compression can be enabled by specifying a threshold value (in the form of kilobytes) for compression on both the client and server sides: I B print SOAP::Lite ->uri('http://localhost/My/Parameters') ->proxy('http://localhost/', options => {compress_threshold => 10000}) ->echo(1 x 10000) ->result; B my $server = SOAP::Transport::HTTP::CGI ->dispatch_to('My::Parameters') ->options({compress_threshold => 10000}) ->handle; For more information see L in L. =head1 SECURITY For security reasons, the existing path for Perl modules (C<@INC>) will be disabled once you have chosen dynamic deployment and specified your own C. If you wish to access other modules in your included package you have several options: =over 4 =item 1 Switch to static linking: use MODULE; $server->dispatch_to('MODULE'); Which can also be useful when you want to import something specific from the deployed modules: use MODULE qw(import_list); =item 2 Change C to C. The path is only unavailable during the initialization phase. It is available once more during execution. Therefore, if you utilize C somewhere in your package, it will work. =item 3 Wrap C in an C block: eval 'use MODULE qw(import_list)'; die if $@; =item 4 Set your include path in your package and then specify C. Don't forget to put C<@INC> in a C block or it won't work. For example, BEGIN { @INC = qw(my_directory); use MODULE } =back =head1 INTEROPERABILITY =head2 Microsoft .NET client with SOAP::Lite Server In order to use a .NET client with a SOAP::Lite server, be sure you use fully qualified names for your return values. For example: return SOAP::Data->name('myname') ->type('string') ->uri($MY_NAMESPACE) ->value($output); In addition see comment about default encoding in .NET Web Services below. =head2 SOAP::Lite client with a .NET server If experiencing problems when using a SOAP::Lite client to call a .NET Web service, it is recommended you check, or adhere to all of the following recommendations: =over 4 =item Declare a proper soapAction in your call For example, use C. =item Disable charset definition in Content-type header Some users have said that Microsoft .NET prefers the value of the Content-type header to be a mimetype exclusively, but SOAP::Lite specifies a character set in addition to the mimetype. This results in an error similar to: Server found request content type to be 'text/xml; charset=utf-8', but expected 'text/xml' To turn off this behavior specify use the following code: use SOAP::Lite; $SOAP::Constants::DO_NOT_USE_CHARSET = 1; # The rest of your code =item Use fully qualified name for method parameters For example, the following code is preferred: SOAP::Data->name(Query => 'biztalk') ->uri('http://tempuri.org/') As opposed to: SOAP::Data->name('Query' => 'biztalk') =item Place method in default namespace For example, the following code is preferred: my $method = SOAP::Data->name('add') ->attr({xmlns => 'http://tempuri.org/'}); my @rc = $soap->call($method => @parms)->result; As opposed to: my @rc = $soap->call(add => @parms)->result; # -- OR -- my @rc = $soap->add(@parms)->result; =item Disable use of explicit namespace prefixes Some user's have reported that .NET will simply not parse messages that use namespace prefixes on anything but SOAP elements themselves. For example, the following XML would not be parsed: SOAP::Lite allows users to disable the use of explicit namespaces through the C method. For example, the following code: $som = SOAP::Lite->uri('urn:MyURI') ->proxy($HOST) ->use_prefix(0) ->myMethod(); Will result in the following XML, which is more palatable by .NET: =item Modify your .NET server, if possible Stefan Pharies : SOAP::Lite uses the SOAP encoding (section 5 of the soap 1.1 spec), and the default for .NET Web Services is to use a literal encoding. So elements in the request are unqualified, but your service expects them to be qualified. .Net Web Services has a way for you to change the expected message format, which should allow you to get your interop working. At the top of your class in the asmx, add this attribute (for Beta 1): [SoapService(Style=SoapServiceStyle.RPC)] Another source said it might be this attribute (for Beta 2): [SoapRpcService] Full Web Service text may look like: <%@ WebService Language="C#" Class="Test" %> using System; using System.Web.Services; using System.Xml.Serialization; [SoapService(Style=SoapServiceStyle.RPC)] public class Test : WebService { [WebMethod] public int add(int a, int b) { return a + b; } } Another example from Kirill Gavrylyuk : "You can insert [SoapRpcService()] attribute either on your class or on operation level". <%@ WebService Language=CS class="DataType.StringTest"%> namespace DataType { using System; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Services.Description; [SoapRpcService()] public class StringTest: WebService { [WebMethod] [SoapRpcMethod()] public string RetString(string x) { return(x); } } } Example from Yann Christensen : using System; using System.Web.Services; using System.Web.Services.Protocols; namespace Currency { [WebService(Namespace="http://www.yourdomain.com/example")] [SoapRpcService] public class Exchange { [WebMethod] public double getRate(String country, String country2) { return 122.69; } } } =back Special thanks goes to the following people for providing the above description and details on .NET interoperability issues: Petr Janata , Stefan Pharies , Brian Jepson , and others =head1 TROUBLESHOOTING =over 4 =item SOAP::Lite serializes "18373" as an integer, but I want it to be a string! SOAP::Lite guesses datatypes from the content provided, using a set of common-sense rules. These rules are not 100% reliable, though they fit for most data. You may force the type by passing a SOAP::Data object with a type specified: my $proxy = SOAP::Lite->proxy('http://www.example.org/soapservice'); my $som = $proxy->myMethod( SOAP::Data->name('foo')->value(12345)->type('string') ); You may also change the precedence of the type-guessing rules. Note that this means fiddling with SOAP::Lite's internals - this may not work as expected in future versions. The example above forces everything to be encoded as string (this is because the string test is normally last and always returns true): my @list = qw(-1 45 foo bar 3838); my $proxy = SOAP::Lite->uri($uri)->proxy($proxyUrl); my $lookup = $proxy->serializer->typelookup; $lookup->{string}->[0] = 0; $proxy->serializer->typelookup($lookup); $proxy->myMethod(\@list); See L for more details. =item C<+autodispatch> doesn't work in Perl 5.8 There is a bug in Perl 5.8's C functionality that prevents the C<+autodispatch> functionality from working properly. The workaround is to use C instead. Where you might normally do something like this: use Some::Module; use SOAP::Lite +autodispatch => uri => 'urn:Foo' proxy => 'http://...'; You would do something like this: use SOAP::Lite dispatch_from(Some::Module) => uri => 'urn:Foo' proxy => 'http://...'; =item Problems using SOAP::Lite's COM Interface =over =item Can't call method "server" on undefined value You probably did not register F using C =item Failed to load PerlCtrl Runtime It is likely that you have install Perl in two different locations and the location of ActiveState's Perl is not the first instance of Perl specified in your PATH. To rectify, rename the directory in which the non-ActiveState Perl is installed, or be sure the path to ActiveState's Perl is specified prior to any other instance of Perl in your PATH. =back =item Dynamic libraries are not found If you are using the Apache web server, and you are seeing something like the following in your webserver log file: Can't load '/usr/local/lib/perl5/site_perl/.../XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: dynamic linker: /usr/local/bin/perl: libexpat.so.0 is NEEDED, but object does not exist at /usr/local/lib/perl5/.../DynaLoader.pm line 200. Then try placing the following into your F file and see if it fixes your problem. PassEnv LD_LIBRARY_PATH =item SOAP client reports "500 unexpected EOF before status line seen See L =item Apache is crashing with segfaults Using C (or L) in combination with mod_perl causes random segmentation faults in httpd processes. To fix, try configuring Apache with the following: RULE_EXPAT=no If you are using Apache 1.3.20 and later, try configuring Apache with the following option: ./configure --disable-rule=EXPAT See http://archive.covalent.net/modperl/2000/04/0185.xml for more details and lot of thanks to Robert Barta for explaining this weird behavior. If this doesn't address the problem, you may wish to try C<-Uusemymalloc>, or a similar option in order to instruct Perl to use the system's own C. Thanks to Tim Bunce . =item CGI scripts do not work under Microsoft Internet Information Server (IIS) CGI scripts may not work under IIS unless scripts use the C<.pl> extension, opposed to C<.cgi>. =item Java SAX parser unable to parse message composed by SOAP::Lite In some cases SOAP messages created by C may not be parsed properly by a SAX2/Java XML parser. This is due to a known bug in C. This bug manifests itself when an attribute in an XML element occurs prior to the XML namespace declaration on which it depends. However, according to the XML specification, the order of these attributes is not significant. http://www.megginson.com/SAX/index.html Thanks to Steve Alpert (Steve_Alpert@idx.com) for pointing on it. =back =head1 PERFORMANCE =over 4 =item Processing of XML encoded fragments C is based on L which is basically wrapper around James Clark's expat parser. Expat's behavior for parsing XML encoded string can affect processing messages that have lot of encoded entities, like XML fragments, encoded as strings. Providing low-level details, parser will call char() callback for every portion of processed stream, but individually for every processed entity or newline. It can lead to lot of calls and additional memory manager expenses even for small messages. By contrast, XML messages which are encoded as base64Binary, don't have this problem and difference in processing time can be significant. For XML encoded string that has about 20 lines and 30 tags, number of call could be about 100 instead of one for the same string encoded as base64Binary. Since it is parser's feature there is NO fix for this behavior (let me know if you find one), especially because you need to parse message you already got (and you cannot control content of this message), however, if your are in charge for both ends of processing you can switch encoding to base64 on sender's side. It will definitely work with SOAP::Lite and it B work with other toolkits/implementations also, but obviously I cannot guarantee that. If you want to encode specific string as base64, just do C<< SOAP::Data->type(base64 => $string) >> either on client or on server side. If you want change behavior for specific instance of SOAP::Lite, you may subclass C, override C method that is responsible for string encoding (take a look into C) and specify B serializer class for your SOAP::Lite object with: my $soap = new SOAP::Lite serializer => My::Serializer->new, ..... other parameters or on server side: my $server = new SOAP::Transport::HTTP::Daemon # or any other server serializer => My::Serializer->new, ..... other parameters If you want to change this behavior for B instances of SOAP::Lite, just substitute C method with C somewhere in your code B C and B actual processing/sending: *SOAP::Serializer::as_string = \&SOAP::XMLSchema2001::Serializer::as_base64Binary; Be warned that last two methods will affect B strings and convert them into base64 encoded. It doesn't make any difference for SOAP::Lite, but it B make a difference for other toolkits. =back =head1 BUGS AND LIMITATIONS =over 4 =item * No support for multidimensional, partially transmitted and sparse arrays (however arrays of arrays are supported, as well as any other data structures, and you can add your own implementation with SOAP::Data). =item * Limited support for WSDL schema. =item * XML::Parser::Lite relies on Unicode support in Perl and doesn't do entity decoding. =item * Limited support for mustUnderstand and Actor attributes. =back =head1 PLATFORM SPECIFICS =over 4 =item MacOS Information about XML::Parser for MacPerl could be found here: http://bumppo.net/lists/macperl-modules/1999/07/msg00047.html Compiled XML::Parser for MacOS could be found here: http://www.perl.com/CPAN-local/authors/id/A/AS/ASANDSTRM/XML-Parser-2.27-bin-1-MacOS.tgz =back =head1 RELATED MODULES =head2 Transport Modules SOAP::Lite allows one to add support for additional transport protocols, or server handlers, via separate modules implementing the SOAP::Transport::* interface. The following modules are available from CPAN: =over =item * SOAP-Transport-HTTP-Nginx L provides a transport module for nginx () =back =head1 AVAILABILITY You can download the latest version SOAP::Lite for Unix or SOAP::Lite for Win32 from the following sources: * CPAN: http://search.cpan.org/search?dist=SOAP-Lite You are welcome to send e-mail to the maintainers of SOAP::Lite with your comments, suggestions, bug reports and complaints. =head1 ACKNOWLEDGEMENTS Special thanks to Randy J. Ray, author of I, who has contributed greatly to the documentation effort of SOAP::Lite. Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute the SOAP::Lite reference manual found in Appendix B of I. And special gratitude to all the developers who have contributed patches, ideas, time, energy, and help in a million different forms to the development of this software. =head1 HACKING Latest development takes place on GitHub.com. Come on by and fork it. git@github.com:redhotpenguin/soaplite.git Also see the HACKING file. Actively recruiting maintainers for this module. Come and get it on! =head1 REPORTING BUGS Please use rt.cpan.org or github to report bugs. Pull requests are preferred. =head1 COPYRIGHT Copyright (C) 2000-2007 Paul Kulchenko. All rights reserved. Copyright (C) 2007-2008 Martin Kutter Copyright (C) 2013 Fred Moyer =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This text and all associated documentation for this library is made available under the Creative Commons Attribution-NoDerivs 2.0 license. http://creativecommons.org/licenses/by-nd/2.0/ =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) Martin Kutter (martin.kutter@fen-net.de) Fred Moyer (fred@redhotpenguin.com) =cut SOAP-Lite-1.19/lib/SOAP/Packager.pm000644 000770 000024 00000041554 12567356463 016757 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Packager; use strict; use vars; our $VERSION = 1.17; our $SUPPORTED_TYPES = { }; sub BEGIN { no strict 'refs'; for my $method ( qw(parser headers_http persist_parts) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my($class) = shift; my(%params) = @_; bless { "_parts" => [ ], "_parser" => undef, "_persist_parts" => 0, }, $class; } sub is_supported_part { my $self = shift; return $SUPPORTED_TYPES->{ref $_[0]}; } sub parts { my $self = shift; if (@_) { $self->{'_parts'} = shift; } return $self->{'_parts'}; } # This is a static method that helps find the right Packager sub find_packager { # TODO - Input: # * the mimetype of the data to be decoded raw data that needs # * the data to be decoded # Returns: # * the proper SOAP::Packager instance } sub push_part { my $self = shift; my ($part) = @_; push @{$self->{'_parts'}}, $part; } sub package { # do nothing die "SOAP::Packager::package() must be implemented"; } sub unpackage { my $self = shift; $self->{'_parts'} = [] if !$self->persist_parts; # experimental } # ====================================================================== package SOAP::Packager::MIME; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Packager); sub BEGIN { no strict 'refs'; for my $method ( qw(transfer_encoding env_id env_location) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my ($classname) = @_; my $self = SOAP::Packager::new(@_); $self->{'_content_encoding'} = '8bit'; $self->{'_env_id'} = ''; $self->{'_env_location'} = '/main_envelope'; bless $self, $classname; $SOAP::Packager::SUPPORTED_TYPES->{"MIME::Entity"} = 1; return $self; } sub initialize_parser { my $self = shift; eval "require MIME::Parser;"; die "Could not find MIME::Parser - is MIME::Tools installed? Aborting." if $@; $self->{'_parser'} = MIME::Parser->new; $self->{'_parser'}->output_to_core('ALL'); $self->{'_parser'}->tmp_to_core(1); $self->{'_parser'}->ignore_errors(1); $self->{'_parser'}->extract_nested_messages(0); } sub generate_random_string { my ($self,$len) = @_; my @chars=('a'..'z','A'..'Z','0'..'9','_'); my $random_string; foreach (1..$len) { $random_string .= $chars[rand @chars]; } return $random_string; } sub get_multipart_id { my ($id) = shift; ($id || '') =~ /^]+)>?$/; $1 || ''; } sub package { my $self = shift; my ($envelope,$context) = @_; return $envelope if (!$self->parts); # if there are no parts, # then there is nothing to do require MIME::Entity; local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n"; my $top = MIME::Entity->build('Type' => "Multipart/Related"); my $soapversion = defined($context) ? $context->soapversion : '1.1'; $top->attach('Type' => $soapversion == 1.1 ? "text/xml" : "application/soap+xml", 'Content-Transfer-Encoding' => $self->transfer_encoding(), 'Content-Location' => $self->env_location(), 'Content-ID' => $self->env_id(), 'Data' => $envelope ); # consume the attachments that come in as input by 'shift'ing no strict 'refs'; while (my $part = shift(@{$self->parts})) { $top->add_part($part); } # determine MIME boundary my $boundary = $top->head->multipart_boundary; $self->headers_http({ 'Content-Type' => 'Multipart/Related; type="text/xml"; start=""; boundary="'.$boundary.'"'}); return $top->stringify_body; } sub unpackage { my $self = shift; my ($raw_input,$context) = @_; $self->SUPER::unpackage(); # Parse the raw input into a MIME::Entity structure. # - fail if the raw_input is not MIME formatted $self->initialize_parser() if !defined($self->parser); my $entity = eval { $self->parser->parse_data($raw_input) } or die "Something wrong with MIME message: @{[$@ || $self->parser->last_error]}\n"; my $env = undef; # major memory bloat below! TODO - fix! if (lc($entity->head->mime_type) eq 'multipart/form-data') { $env = $self->process_form_data($entity); } elsif (lc($entity->head->mime_type) eq 'multipart/related') { $env = $self->process_related($entity); } elsif (lc($entity->head->mime_type) eq 'text/xml') { # I don't think this ever gets called. # warn "I am somewhere in the SOAP::Packager::MIME code I didn't know I would be in!"; $env = $entity->bodyhandle->as_string; } else { die "Can't handle MIME messsage with specified type (@{[$entity->head->mime_type]})\n"; } # return the envelope if ($env) { return $env; } elsif ($entity->bodyhandle->as_string) { return $entity->bodyhandle->as_string; } else { die "No content in MIME message\n"; } } sub process_form_data { my ($self, $entity) = @_; my $env = undef; foreach my $part ($entity->parts) { my $name = $part->head->mime_attr('content-disposition.name'); $name eq 'payload' ? $env = $part->bodyhandle->as_string : $self->push_part($part); } return $env; } sub process_related { my $self = shift; my ($entity) = @_; die "Multipart MIME messages MUST declare Multipart/Related content-type" if ($entity->head->mime_attr('content-type') !~ /^multipart\/related/i); # As it turns out, the Content-ID and start parameters are optional # according to the MIME and SOAP specs. In the event that the head cannot # be found, the head/root entity is used as a starting point. # [19 Mar 2008] Modified by Feng Li # Check optional start parameter, then optional Content-ID, then create/add # Content-ID (the same approach as in SOAP::Lite 0.66) #my $start = get_multipart_id($entity->head->mime_attr('content-type.start')); my $start = get_multipart_id($entity->head->mime_attr('content-type.start')) || get_multipart_id($entity->parts(0)->head->mime_attr('content-id')); if (!defined($start) || $start eq "") { $start = $self->generate_random_string(10); $entity->parts(0)->head->add('content-id',$start); } my $location = $entity->head->mime_attr('content-location') || 'thismessage:/'; my $env; foreach my $part ($entity->parts) { next if !UNIVERSAL::isa($part => "MIME::Entity"); # Weird, the following use of head->get(SCALAR[,INDEX]) doesn't work as # expected. Work around is to eliminate the INDEX. my $pid = get_multipart_id($part->head->mime_attr('content-id')); # If Content-ID is not supplied, then generate a random one (HACK - because # MIME::Entity does not do this as it should... content-id is required # according to MIME specification) $pid = $self->generate_random_string(10) if $pid eq ''; my $type = $part->head->mime_type; # If a Content-Location header cannot be found, this will look for an # alternative in the following MIME Header attributes my $plocation = $part->head->get('content-location') || $part->head->mime_attr('Content-Disposition.filename') || $part->head->mime_attr('Content-Type.name'); if ($start && $pid eq $start) { $env = $part->bodyhandle->as_string; } else { $self->push_part($part); } } # die "Can't find 'start' parameter in multipart MIME message\n" # if @{$self->parts} > 1 && !$start; return $env; } # ====================================================================== package SOAP::Packager::DIME; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Packager); sub BEGIN { no strict 'refs'; for my $method ( qw(foo) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my ($classname) = @_; my $self = SOAP::Packager::new(@_); bless $self, $classname; $SOAP::Packager::SUPPORTED_TYPES->{"DIME::Payload"} = 1; return $self; } sub initialize_parser { my $self = shift; print STDERR "Initializing parser\n"; eval "require DIME::Parser;"; die "Could not find DIME::Parser - is DIME::Tools installed? Aborting." if $@; $self->{'_parser'} = DIME::Parser->new; } sub package { my $self = shift; my ($envelope,$context) = @_; return $envelope if (!$self->parts); # if there are no parts, # then there is nothing to do require DIME::Message; require DIME::Payload; my $message = DIME::Message->new; my $top = DIME::Payload->new; my $soapversion = defined($context) ? $context->soapversion : '1.1'; $top->attach('MIMEType' => $soapversion == 1.1 ? "http://schemas.xmlsoap.org/soap/envelope/" : "application/soap+xml", 'Data' => \$envelope ); $message->add_payload($top); # consume the attachments that come in as input by 'shift'ing no strict 'refs'; while (my $part = shift(@{$self->parts})) { die "You are only allowed to add parts of type DIME::Payload to a DIME::Message" if (!$part->isa('DIME::Payload')); # print STDERR "Adding payload to DIME message: ".ref($part)."\n"; $message->add_payload($part); # print STDERR "Payload's payload is: ".${$part->print_content_data}."\n"; } $self->headers_http({ 'Content-Type' => 'application/dime' }); return $message->print_data; } sub unpackage { my $self = shift; my ($raw_input,$context) = @_; $self->SUPER::unpackage(); # Parse the raw input into a DIME::Message structure. # - fail if the raw_input is not DIME formatted print STDERR "raw_data: $raw_input\n"; $self->initialize_parser() if !defined($self->parser); my $message = eval { $self->parser->parse_data(\$raw_input) } or die "Something wrong with DIME message: @{[$@]}\n"; # The first payload is always the SOAP Message # TODO - Error check my @payloads = @{$message->{'_PAYLOADS'}}; my $env = shift(@payloads); my $env_str = $env->print_content_data; print STDERR "Received this envelope: ".$env_str."\n"; while (my $p = shift(@payloads)) { print STDERR "Adding part to Packager\n"; $self->push_part($p); } return $env_str; } 1; __END__ =pod =head1 NAME SOAP::Packager - this class is an abstract class which allows for multiple types of packaging agents such as MIME and DIME. =head1 DESCRIPTION The SOAP::Packager class is responsible for managing a set of "parts." Parts are additional pieces of information, additional documents, or virtually anything that needs to be associated with the SOAP Envelope/payload. The packager then will take these parts and encode/decode or "package"/"unpackage" them as they come and go over the wire. =head1 METHODS =over =item new Instantiates a new instance of a SOAP::Packager. =item parts Contains an array of parts. The contents of this array and their types are completely dependent upon the Packager being used. For example, when using MIME, the content of this array is MIME::Entity's. =item push_part Adds a part to set of parts managed by the current instance of SOAP::Packager. =item parser Returns the parser used to parse attachments out of a data stream. =item headers_http This is a hook into the HTTP layer. It provides a way for a packager to add and/or modify HTTP headers in a request/response. For example, most packaging layers will need to override the Content-Type (e.g. multipart/related, or application/dime). =back =head1 ABSTRACT METHODS If you wish to implement your own SOAP::Packager, then the methods below must be implemented by you according to the prescribed input and output requirements. =over =item package() The C subroutine takes as input the SOAP envelope in string/SCALAR form. This will serve as the content of the root part. The packager then encapsulates the envelope with the parts contained within C and returns the properly encapsulated envelope in string/SCALAR form. =item unpackage() The C subroutines takes as input raw data that needs to be parsed into a set of parts. It is responsible for extracting the envelope from the input, and populating C with an ARRAY of parts extracted from the input. It then returns the SOAP Envelope in string/SCALAR form so that SOAP::Lite can parse it. =back =head1 SUPPORTED PACKAGING FORMATS =head2 SOAP::Packager::MIME C utilizes L to provides the ability to send and receive Multipart/Related and Multipart/Form-Data formatted requests and responses. =head3 MIME METHODS The following methods are used when composing a MIME formatted message. =over =item transfer_encoding The value of the root part's Content-Transfer-Encoding MIME Header. Default is: 8bit. =item env_id The value of the root part's Content-Id MIME Header. Default is: . =item env_location The value of the root part's Content-Location MIME Header. Default is: /main_envelope. =item env_type The value of the root part's Content-Type MIME Header. Default is: text/xml. =back =head3 OPTIMIZING THE MIME PARSER The use of attachments can often result in a heavy drain on system resources depending upon how your MIME parser is configured. For example, you can instruct the parser to store attachments in memory, or to use temp files. Using one of the other can affect performance, disk utilization, and/or reliability. Therefore you should consult the following URL for optimization techniques and trade-offs: http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm#OPTIMIZING_YOUR_PARSER To modify the parser's configuration options consult the following code sample, which incidentally shows how to minimize memory utilization: my $packager = SOAP::Packager::MIME->new; # $packager->parser->decode_headers(1); # no difference # $packager->parser->extract_nested_messages(1); # no difference $packager->parser->output_to_core(0); # much less memory $packager->parser->tmp_to_core(0); # much less memory $packager->parser->tmp_recycling(0); # promotes faster garbage collection $packager->parser->use_inner_files(1); # no difference my $client = SOAP::Lite->uri($NS)->proxy($URL)->packager($packager); $client->someMethod(); =head3 CLIENT SIDE EXAMPLE The following code sample shows how to use attachments within the context of a SOAP::Lite client. #!/usr/bin/perl use SOAP::Lite; use MIME::Entity; my $ent = build MIME::Entity Type => "text/plain", Path => "attachment.txt", Filename => "attachment.txt", Disposition => "attachment"; $NS = "urn:Majordojo:TemperatureService"; $HOST = "http://localhost/cgi-bin/soaplite.cgi"; my $client = SOAP::Lite ->packager(SOAP::Packager::MIME->new) ->parts([ $ent ]) ->uri($NS) ->proxy($HOST); $response = $client->c2f(SOAP::Data->name("temperature" => '100')); print $response->valueof('//c2fResponse/foo'); =head3 SERVER SIDE EXAMPLE The following code shows how to use attachments within the context of a CGI script. It shows how to read incoming attachments, and to return attachments to the client. #!/usr/bin/perl -w use SOAP::Transport::HTTP; use MIME::Entity; SOAP::Transport::HTTP::CGI ->packager(SOAP::Packager::MIME->new) ->dispatch_with({'urn:Majordojo:TemperatureService' => 'TemperatureService'}) ->handle; BEGIN { package TemperatureService; use vars qw(@ISA); @ISA = qw(Exporter SOAP::Server::Parameters); use SOAP::Lite; sub c2f { my $self = shift; my $envelope = pop; my $temp = $envelope->dataof("//c2f/temperature"); use MIME::Entity; my $ent = build MIME::Entity Type => "text/plain", Path => "printenv", Filename => "printenv", Disposition => "attachment"; # read attachments foreach my $part (@{$envelope->parts}) { print STDERR "soaplite.cgi: attachment found! (".ref($part).")\n"; print STDERR "soaplite.cgi: contents => ".$part->stringify."\n"; } # send attachments return SOAP::Data->name('convertedTemp' => (((9/5)*($temp->value)) + 32)), $ent; } } =head2 SOAP::Packager::DIME TODO =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Schema.pod000644 000770 000024 00000012677 12567356463 016614 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Schema - provides an umbrella for the way in which SOAP::Lite manages service description schemas =head1 DESCRIPTION This class provides an umbrella for the way in which SOAP::Lite manages service description schemas. Currently, the only support present is for the Web Services Description Language (WSDL). This is another of the classes not generally designed to be directly instantiated by an application, though it can be if so desired. =head1 METHODS =over =item new(optional key/value pairs) $schema = SOAP::Schema->new(parse => $schema_uri); This is the class constructor. With no arguments, it creates a blank object of the class. Any arguments that are passed are treated as key/value pairs in which the key represents one of the methods described here, and the value is what gets passed when the method itself gets invoked. =item parse(service description URI) $schema->parse('http://schemas.w3.org/soap.wsdl'); Parses the internal representation of the service description prior to the generation of stub routines to provide method-like access to the remote services. =item access(service description URI) $schema->access('http://soap.org/service.wsdl'); Loads the specified service description from the given URL, using the current value of the schema accessor if none is provided. The full content of the URL is returned on success, or an exception is thrown (via C) on error. =item load $schema->load; Takes the internal representation of the service and generates code stubs for the remote methods, allowing them to be called as local object methods. Stubs are generated for all the functions declared in the WSDL description with this call because it's enough of a class framework to allow for basic object creation for use as handles. =item schema $current_schema = $schema->schema; Gets (or sets) the current schema representation to be used by this object. The value to be passed when setting this is just the URI of the schema. This gets passed to other methods such as access for loading the actual content. =item services $hashref = $schema->services; Gets or sets the services currently stored on the object. The services are kept as a hash reference, whose keys and values are the list of returned values from the WSDL parser. Keys represent the names of the services themselves (names have been normalized into Perl-compatible identifiers), with values that are also hash references to the internal representation of the service itself. =item stub Returns the autogenerated Perl code as a string. This code is generated from the WSDL provided by the C method call. The code contains a package definition for the service being called. my $client = SOAP::Lite->new; my $code = $client->service($WSDL_URL)->stub; open FILE,">ServicePackage.pm"; print FILE $code; close FILE; =item cache_dir Sets/retrieves the value of the directory where generated stubs will be cached. If C is null, then no caching will be performed. my $client = SOAP::Lite->new; my $code = $client->cache_dir("/tmp")->service($WSDL_URL)->stub; If C is undefined, no caching will take place. =item cache_ttl Sets/retrieves the value of the time to live (in seconds) for cached files. This is only relevant when used in conjunction with C. If C is set to 0, the cache will never expire. Files will have to be removed manually in order for the cache to be refreshed. my $client = SOAP::Lite->new; my $code = $client->cache_ttl(3600)->cache_dir("/tmp")->service($WSDL_URL)->stub; The default time to live is 0. =item useragent(LWP::UserAgent) my $client = SOAP::Lite->new; $ua = $client->schema->useragent; $ua->agent("Fubar! 0.1"); my $response = $client->service("http://localhost/some.wsdl") ->someMethod("Foo"); Gets or sets the classes UserAgent used for retrieving schemas over the web. This allows users to have direct access to the UserAgent so that they may control the credentials passed to a remote server, or the specific configuration of their HTTP agent. =back =head1 SOAP::Schema::WSDL At present, the SOAP::Lite toolkit supports only loading of service descriptions in the WSDL syntax. This class manages the parsing and storing of these service specifications. As a general rule, this class should be even less likely to be used directly by an application because its presence should be completely abstracted by the previous class (SOAP::Schema). None of the methods are defined here; the class is only mentioned for sake of reference. =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Serializer.pod000644 000770 000024 00000031643 12567356463 017517 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Serializer - the means by which the toolkit manages the expression of data as XML =head1 DESCRIPTION The SOAP::Serializer class is the means by which the toolkit manages the expression of data as XML. The object that a SOAP::Lite instance uses by default is generally enough for the task, with no need for the application to create its own. The main purpose of this class is to provide a place for applications to extend the serializer by defining additional methods for handling new datatypes. =head1 METHODS =over =item new(optional key/value pairs) $serialize = SOAP::Serializer->new( ); This is the constructor method for the class. In addition to creating a basic object and initializing it with default values, the constructor can also take names and values for most of the accessor methods that the class supports. =item envelope(method, data arguments) $serialize->envelope(fault => $fault_obj); Provides the core purpose for the SOAP::Serializer class. It creates the full SOAP envelope based on the input passed in to it. The data arguments passed in the list of parameters to the method are divided into two sublists: any parameters that are L objects or derivatives of go into one list, while the remainder go into the other. The nonheader objects are used as the content for the message body, with the body itself being largely dependent on the value of the first argument in the list. This argument is expected to be a string and should be one of the following: =item context $serialize->context->packager(); This provides access to the calling context of C. In a client side context the often means a reference to an instance of SOAP::Lite. In a server side context this means a reference to a SOAP::Server instance. =over =item method The envelope is being created to encapsulate a RPC-style method call. =item response The message being created is that of a response stemming from a RPC-style method call. =item fault For this specifier, the envelope being created is to transmit a fault. =item freeform This identifier is used as a general-case encoding style for messages that don't fit into any of the previous cases. The arguments are encoded into the envelope's Body tag without any sort of context sensitivity. =back Any value other than these four results in an error. =item envprefix(optional value) $serialize->envprefix('env'); Gets or sets the prefix that labels the SOAP envelope namespace. This defaults to SOAP-ENV. =item encprefix(optional value) $serialize->envprefix('enc'); Gets or sets the prefix that labels the SOAP encoding namespace. Defaults to SOAP-ENC. =item soapversion(optional value) $serialize->soapversion('1.2'); If no parameter is given, returns the current version of SOAP that is being used as the basis for serializing messages. If a parameter is given, attempts to set that as the version of SOAP being used. The value should be either 1.1 or 1.2. When the SOAP version is being set, the package selects new URNs for envelope and encoding spaces and also calls the xmlschema method to set the appropriate schema definition. =item xmlschema(optional value) $serialize->xmlschema($xml_schema_1999); Gets or sets the URN for the schema being used to express the structure of the XML generated by the serializer. If setting the value, the input must be the full URN for the new schema and is checked against the list of known SOAP schemas. =item register_ns The register_ns subroutine allows users to register a global namespace with the SOAP Envelope. The first parameter is the namespace, the second parameter to this subroutine is an optional prefix. If a prefix is not provided, one will be generated automatically for you. All namespaces registered with the serializer get declared in the element. =item find_prefix The find_prefix subroutine takes a namespace as a parameter and returns the assigned prefix to that namespace. This eliminates the need to declare and redeclare namespaces within an envelope. This subroutine is especially helpful in determining the proper prefix when assigning a type to a SOAP::Data element. A good example of how this might be used is as follows: SOAP::Data->name("foo" => $inputParams{'foo'}) ->type($client->serializer->find_prefix('urn:Foo').':Foo'); =back =head1 CUSTOM DATA TYPES When serializing an object, or blessed hash reference, into XML, C first checks to see if a subroutine has been defined for the corresponding class name. For example, in the code below, C will check to see if a subroutine called C has been defined. If so, then it will pass C<$foo> to that subroutine along with other data known about the C element being encoded. $foo = MyModule::MyPackage->new; my $client = SOAP::Lite ->uri($NS) ->proxy($HOST); $som = $client->someMethod(SOAP::Data->name("foo" => $foo)); =head1 as_TypeName SUBROUTINE REQUIREMENTS =over =item Naming Convention The subroutine should always be prepended with C followed by the type's name. The type's name must have all colons (':') substituted with an underscore ('_'). =item Input The input to C will have at least one parameter, and at most four parameters. The first parameter will always be the value or the object to be encoded. The following three parameters depend upon the context of the value/object being encoded. If the value/object being encoded was part of a C object (as in the above example), then the second, third and fourth parameter will be the C element's name, type, and attribute set respectively. If on the other hand, the value/object being encoded is I part of a C object, as in the code below: $foo = MyModule::MyPackage->new; my $client = SOAP::Lite ->uri($NS) ->proxy($HOST); $som = $client->someMethod($foo); Then the second and third parameters will be the class name of the value/object being encoded (e.g. "MyModule::MyPackage" in the example above), and the fourth parameter will be an empty hash. =item Output The encoding subroutine must return an array containing three elements: 1) the name of the XML element, 2) a hash containing the attributes to be placed into the element, and 3) the value of the element. =back =head1 AUTOTYPING When the type of an element has not been declared explicitly, SOAP::Lite must "guess" at the object's type. That is due to the fact that the only form of introspection that Perl provides (through the use of the C subroutine) does not provide enough information to C to allow SOAP::Lite to determine the exact type of an element being serialized. To work around this limitation, the C hash was created. This hash is populated with all the data types that the current C can auto detect. Users and developers are free to modify the contents of this hash allowing them to register new data types with the system. When C is asked to encode an object into XML, it goes through the following steps. First, C checks to see if a type has been explicitly stated for the current object. If a type has been provided C checks to see if an C subroutine as been defined for that type. If such a subroutine exists, then C passes the object to it to be encoded. If the subroutine does not exist, or the type has not been provided, then C must attempt to "guess" the type of the object being serialized. To do so, C runs in sequence a set of tests stored in the C hash. C continues to run each test until one of the tests returns true, indicating that the type of the object has been detected. When the type of the object has been detected, then C passes the object to the encoding subroutine that corresponds with the test that was passed. If all the tests fail, and the type was not determined, then C will as a last resort encode the object based on one of the four basic data types known to Perl: REF, SCALAR, ARRAY and HASH. The following table contains the set of data types detectable by C by default and the order in which their corresponding test subroutine will be run, according to their precedence value. Table 1 - Autotyping Precedence TYPENAME PRECEDENCE VALUE ---------------------------- base64 10 int 20 long 25 float 30 gMonth 35 gDay 40 gYear 45 gMonthDay 50 gYearMonth 55 date 60 time 70 dateTime 75 duration 80 boolean 90 anyURI 95 string 100 =head2 REGISTERING A NEW DATA TYPE To register a new data type that can be automatically detected by C and then serialized into XML, the developer must provide the following four things: =over =item * The name of the new data type. =item * A subroutine that is capable of detecting whether a value passed to it is of the corresponding data type. =item * A number representing the test subroutine's precedence relative to all the other types' test subroutinestypes. See I. =item * A subroutine that is capable of providing C with the information necessary to serialize an object of the corresponding data type into XML. =back =head3 EXAMPLE 1 If, for example, you wish to create a new datatype called C for which you would like Perl values to be automatically detected and serialized into, then you follow these steps. B The test subroutine will have passed to it by C a value to be tested. The test subroutine must return 1 if the value passed to it is of the corresponding type, or else it must return 0. sub SOAP::Serializer::uriReferenceTest { my ($value) = @_; return 1 if ($value =~ m!^http://!); return 0; } B The encoding subroutine provides C with the data necessary to encode the value passed to it into XML. The encoding subroutine name's should be of the following format: C. The encoding subroutine will have passed to it by C four parameters: the value to be encoded, the name of the element being encoded, the assumed type of the element being encoded, and a reference to a hash containing the attributes of the element being encoded. The encoding subroutine must return an array representing the encoded datatype. C will use the contents of this array to generate the corresponding XML of the value being encoded, or serialized. This array contains the following 3 elements: the name of the XML element, a hash containing the attributes to be placed into the element, and the value of the element. sub SOAP::Serializer::as_uriReference { my $self = shift; my($value, $name, $type, $attr) = @_; return [$name, {'xsi:type' => 'xsd:uriReference', %$attr}, $value]; } B To register the new data type, simply add the type to the C hash using the type name as the key, and an array containing the precedence value, the test subroutine, and the encoding subroutine. $s->typelookup->{uriReference} = [11, \&uriReferenceTest, 'as_uriReference']; I subroutine above. For example:> $s->typelookup->{uriReference} = [11, sub { $_[0] =~ m!^http://! }, 'as_uriReference']; Once complete, C will be able to serialize the following C object into XML: $elem = SOAP::Data->name("someUri" => 'http://yahoo.com')->type('uriReference'); C will also be able to automatically determine and serialize the following untyped C object into XML: $elem = SOAP::Data->name("someUri" => 'http://yahoo.com'); =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Server.pod000644 000770 000024 00000027523 12567356463 016656 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Server - provides the basic framework for the transport-specific server classes to build upon =head1 DESCRIPTION The SOAP::Server class provides the basic framework for the transport-specific server classes to build upon. Note that in none of the code examples provided with SOAP::Lite is this class used directly. Instead, it is designed to be a superclass within more specific implementation classes. The methods provided by SOAP::Server itself are: =head1 METHODS =over =item new(optional key/value pairs) $server = SOAP::Server->new(%options); Creates a new object of the class. Various default instance values are set up, and like many of the constructors in this module, most of the class methods described here may be passed in the construction call by giving the name followed by the parameter (or an array reference if there are multiple parameters). =item action(optional new value) $action = $server->action Retrieves or sets the value of the action attribute on the server object. This attribute is used when mapping the request to an appropriate namespace or routine. For example, the HTTP library sets the attribute to the value of the SOAPAction header when processing of the request begins, so that the find_target method described later may retrieve the value to match it against the server's configuration. Returns the object itself when setting the attribute. =item myuri(optional new value) $server->myuri("http://localhost:9000/SOAP"); Gets or sets the myuri attribute. This specifies the specific URI that the server is answering requests to (which may be different from the value specified in action or in the SOAPAction header). =item serializer(optional new value) =item deserializer(optional new value) $serializer = $server->serializer; $server->deserializer($new_deser_obj); As with the client objects, these methods provide direct access to the serialization and deserialization objects the server object uses to transform input and output from and to XML. There is generally little or no need to explicitly set these to new values. =item options(optional new value) $server->options({compress_threshold => 10000}); Sets (or retrieves) the current server options as a hash-table reference. At present, only one option is used within the SOAP::Lite libraries themselves: =over =item compress_threshold The value of this option is expected to be a numerical value. If set, and if the Compress::Zlib library is available to use, messages whose size in bytes exceeds this value are compressed for transmission. Both ends of the conversation have to support this and have it enabled. =back Other options may be defined and passed around using this mechanism. Note that setting the options using this accessor requires a full hash reference be passed. To set just one or a few values, retrieve the current reference value and use it to set the key(s). =item dispatch_with(optional new value) $server->dispatch_with($new_table); Represents one of two ways in which a SOAP::Server (or derived) object may specify mappings of incoming requests to server-side subroutines or namespaces. The value of the attribute is a hash-table reference. To set the attribute, you must pass a new hash reference. The hash table's keys are URI strings (literal URIs or the potential values of the SOAPAction header), and the corresponding values are one of a class name or an object reference. Requests that come in for a URI found in the table are routed to the specified class or through the specified object. =item dispatch_to(optional list of new values) $server->dispatch_to($dir, 'Module', 'Mod::meth'); This is the more traditional way to specify modules and packages for routing requests. This is also an accessor, but it returns a list of values when called with no arguments (rather than a single one). Each item in the list of values passed to this method is expected to be one of four things: =over =item I If the value is a directory path, all modules located in that path are available for remote use. =item I When the value is a package name (without including a specific method name), all routines within the package are available remotely. =item I Alternately, when the value is a package-qualified name of a subroutine or method, that specific routine is made available. This allows the server to make selected methods available without opening the entire package. =item I If the value is an object reference, the object itself routes the request. The list of values held by the dispatch_to table are compared only after the URI mapping table from the dispatch_with attribute has been consulted. If the request's URI or SOAPAction header don't map to a specific configuration, the path specified by the action header (or in absence, the URI) is converted to a package name and compared against this set of values. =back =item objects_by_reference(optional list of new values) $server->objects_by_reference(qw(My:: Class)); This also returns a list of values when retrieving the current attribute value, as opposed to a single value. This method doesn't directly specify classes for request routing so much as it modifies the behavior of the routing for the specified classes. The classes that are given as arguments to this method are marked to be treated as producing persistent objects. The client is given an object representation that contains just a handle on a local object with a default persistence of 600 idle seconds. Each operation on the object resets the idle timer to zero. This facility is considered experimental in the current version of SOAP::Lite. A global variable/"constant" allows developers to specify the amount of time an object will be persisted. The default value is 600 idle seconds. This value can be changed using the following code: $SOAP::Constants::OBJS_BY_REF_KEEPALIVE = 1000; =item on_action(optional new value) $server->on_action(sub { ...new code }); Gets or sets the reference to a subroutine that is used for executing the on_action hook. Where the client code uses this hook to construct the action-request data (such as for a SOAPAction header), the server uses the on_action hook to do any last-minute tests on the request itself, before it gets routed to a final destination. When called, the hook routine is passed three arguments: =over =item action The action URI itself, retrieved from the action method described earlier. =item method_uri The URI of the XML namespace the method name is labeled with. =item method_name The name of the method being called by the request. =back =item on_dispatch(optional new value) ($uri, $name) = $server->on_dispatch->($request); Gets or sets the subroutine reference used for the on_dispatch hook. This hook is called at the start of the request-routing phase and is given a single argument when called: =over =item request An object of the L class, containing the deserialized request from the client. =back =item find_target ($class, $uri, $name) = $server->find_target($req) Taking as its argument an object of the SOAP::SOM class that contains the deserialized request, this method returns a three-element list describing the method that is to be called. The elements are: =over =item class The class into which the method call should be made. This may come back as either a string or an objectreference, if the dispatching is configured using an object instance. =item uri The URN associated with the request method. This is the value that was used when configuring the method routing on the server object. =item name The name of the method to call. =back =item handle $server->handle($request_text); Implements the main functionality of the serving process, in which the server takes an incoming request and dispatches it to the correct server-side subroutine. The parameter taken as input is either plain XML or MIME-encoded content (if MIME-encoding support is enabled). =item make_fault return $server->makefault($code, $message); Creates a SOAP::Fault object from the data passed in. The order of arguments is: code, message, detail, actor. The first two are required (because they must be present in all faults), but the last two may be omitted unless needed. =back =head2 SOAP::Server::Parameters This class provides two methods, but the primary purpose from the developer's point of view is to allow classes that a SOAP server exposes to inherit from it. When a class inherits from the SOAP::Server::Parameters class, the list of parameters passed to a called method includes the deserialized request in the form of a L object. This parameter is passed at the end of the arguments list, giving methods the option of ignoring it unless it is needed. The class provides two subroutines (not methods), for retrieving parameters from the L object. These are designed to be called without an object reference in the parameter list, but with an array reference instead (as the first parameter). The remainder of the arguments list is expected to be the list from the method-call itself, including the SOAP::SOM object at the end of the list. The routines may be useful to understand if an application wishes to subclass SOAP::Server::Parameters and inherit from the new class instead. =over =item byNameOrOrder(order, parameter list, envelope) @args = SOAP::Server::Parameters::byNameOrOrder ([qw(a b)], @_); Using the list of argument names passed in the initial argument as an array reference, this routine returns a list of the parameter values for the parameters matching those names, in that order. If none of the names given in the initial array-reference exist in the parameter list, the values are returned in the order in which they already appear within the list of parameters. In this case, the number of returned values may differ from the length of the requested-parameters list. =item byName(order, parameter list, envelope) @args = SOAP::Server::Parameters::byName ([qw(a b c)], @_); Acts in a similar manner to the previous, with the difference that it always returns as many values as requested, even if some (or all) don't exist. Parameters that don't exist in the parameter list are returned as undef values. =back =head3 EXAMPLE The following is an example CGI based Web Service that utilizes a Perl module that inherits from the C class. This allows the methods of that class to access its input by name. #!/usr/bin/perl use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI ->dispatch_to('C2FService') ->handle; BEGIN { package C2FService; use vars qw(@ISA); @ISA = qw(Exporter SOAP::Server::Parameters); use SOAP::Lite; sub c2f { my $self = shift; my $envelope = pop; my $temp = $envelope->dataof("//c2f/temperature"); return SOAP::Data->name('convertedTemp' => (((9/5)*($temp->value)) + 32)); } } =head1 SEE ALSO L, L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/SOM.pod000644 000770 000024 00000030037 12567356463 016040 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::SOM - provides access to the values contained in SOAP Response =head1 DESCRIPTION Objects from the SOAP::SOM class aren't generally instantiated directly by an application. Rather, they are handed back by the deserialization of a message. In other words, developers will almost never do this: $som = SOAP::SOM->new; SOAP::SOM objects are returned by a SOAP::Lite call in a client context. For example: my $client = SOAP::Lite ->readable(1) ->uri($NS) ->proxy($HOST) $som = $client->someMethod(); =head1 METHODS =over =item new(message) $som = SOAP::SOM->new($message_as_xml); As said, the need to actually create an object of this class should be very rare. However, if the need arises, the syntax must be followed. The single argument to new must be a valid XML document the parser will understand as a SOAP response. =back The following group of methods provide general data retrieval from the SOAP::SOM object. The model for this is an abbreviated form of XPath. Following this group are methods that are geared towards specific retrieval of commonly requested elements. =over =item match(path) $som->match('/Envelope/Body/[1]'); This method sets the internal pointers within the data structure so that the retrieval methods that follow will have access to the desired data. In the example path, the match is being made against the method entity, which is the first child tag of the body in a SOAP response. The enumeration of container children starts at 1 in this syntax, not 0. The returned value is dependent on the context of the call. If the call is made in a boolean context (such as C<< if ($som->match($path)) >>), the return value is a boolean indicating whether the requested path matched at all. Otherwise, an object reference is returned. The returned object is also a SOAP::SOM instance but is smaller, containing the subset of the document tree matched by the expression. =item valueof(node) $res = $som->valueof('[1]'); When the SOAP::SOM object has matched a path internally with the match method, this method allows retrieval of the data within any of the matched nodes. The data comes back as native Perl data, not a class instance (see dataof). In a scalar context, this method returns just the first element from a matched node set. In an array context, all elements are returned. Assuming that the earlier call happens after the earlier call to match, it retrieves the result entity from the method response that is contained in C<$som>, as this is the first child element in a method-response tag. =item dataof(node) $resobj = $som->dataof('[1]'); Performs the same operation as the earlier valueof method, except that the data is left in its L form, rather than being deserialized. This allows full access to all the attributes that were serialized along with the data, such as namespace and encoding. =item headerof(node) $resobj = $som->headerof('[1]'); Acts much like dataof, except that it returns an object of the L class (covered later in this chapter), rather than SOAP::Data. This is the preferred interface for manipulating the header entities in a message. =item namespaceuriof(node) $ns = $som->namespaceof('[1]'); Retrieves the namespace URI that governs the requested node. Note that namespaces are inherited, so this method will return the relevant value, even if it derives from a parent or other ancestor node. =back The following methods provide more direct access to the message envelope. All these methods return some form of a Perl value, most often a hash reference, when called. Context is also relevant: in a scalar context only the first matching node is returned, while in an array context, all matching nodes are. When called as a static method or as a regular function (such as C), any of the following methods returns the XPath string that is used with the match method to retrieve the data. =over =item root $root = $som->root; Returns the value of the root element as a hash reference. It behaves exactly as C<$som->valueof('/')> does. =item envelope $envelope = $som->envelope; Retrieves the "Envelope" element of the message, returning it and its data as a hash reference. Keys in the hash will be Header and Body (plus any optional elements that may be present in a SOAP 1.1 envelope), whose values will be the serialized header and body, respectively. =item header $header = $som->header; Retrieves the header portion of the envelope as a hash reference. All data within it will have been deserialized. If the attributes of the header are desired, the static form of the method can be combined with match to fetch the header as a SOAP::Data object: $header = $som->match(SOAP::SOM::header)->dataof; =item headers @hdrs = $som->headers; Retrieves the node set of values with deserialized headers from within the Header container. This is different from the earlier header method in that it returns the whole header as a single structure, and this returns the child elements as an array. In other words, the following expressions yield the same data structure: $header = ($som->headers)[0]; $header = $som->valueof(SOAP::SOM::header.'/[1]'); =item body $body = $som->body; Retrieves the message body as a hash reference. The entity tags act as keys, with their deserialized content providing the values. =item fault if ($som->fault) { die $som->fault->faultstring } Acts both as a boolean test whether a fault occurred, and as a way to retrieve the Fault entity itself from the message body as a hash reference. If the message contains a fault, the next four methods (faultcode, faultstring, faultactor, and faultdetail) may be used to retrieve the respective parts of the fault (which are also available on the hash reference as keys). If fault in a boolean context is true, the C, C, C, and C methods all return C. =item faultcode $code = $som->faultcode; Returns the faultcode element of the fault if there is a fault; undef otherwise. =item faultstring $string = $som->faultstring; Returns the faultstring element of the fault if there is a fault; undef otherwise. =item faultactor $actor = $som->faultactor; Returns the faultactor element of the fault, if there is a fault and if the actor was specified within it. The faultactor element is optional in the serialization of a fault, so it may not always be present. This element is usually a string. =item faultdetail $detail = $som->faultdetail; Returns the content of the detail element of the fault, if there is a fault and if the detail element was provided. Note that the name of the element isn't the same as the method, due to the possibility for confusion had the method been called simply, detail. As with the faultactor element, this isn't always a required component of a fault, so it isn't guaranteed to be present. The specification for the detail portion of a fault calls for it to contain a series of element tags, so the application may expect a hash reference as a return value when detail information is available (and undef otherwise). =item method $method = $som->method Retrieves the "method" element of the message, as a hash reference. This includes all input parameters when called on a request message or all result/output parameters when called on a response message. If there is a fault present in the message, it returns undef. =item result $value = $som->result; Returns the value that is the result of a SOAP response. The value will be already deserialized into a native Perl datatype. =item paramsin @list = $som->paramsin; Retrieves the parameters being passed in on a SOAP request. If called in a scalar context, the first parameter is returned. When called in a list context, the full list of all parameters is returned. Each parameter is a hash reference, following the established structure for such return values. =item paramsout @list = $som->paramsout; Returns the output parameters from a SOAP response. These are the named parameters that are returned in addition to the explicit response entity itself. It shares the same scalar/list context behavior as the paramsin method. =item paramsall @list = $som->paramsall; Returns all parameters from a SOAP response, including the result entity itself, as one array. =item parts() Return an array of C's if the current payload contains attachments, or returns undefined if payload is not MIME multipart. =item is_multipart() Returns true if payload is MIME multipart, false otherwise. =back =head1 EXAMPLES =head2 ACCESSING ELEMENT VALUES Suppose for the following SOAP Envelope: abcd And suppose you wanted to access the value of the bar element, then use the following code: my $soap = SOAP::Lite ->uri($SOME_NS) ->proxy($SOME_HOST); my $som = $soap->foo(); print $som->valueof('//fooResponse/bar'); =head2 ACCESSING ATTRIBUTE VALUES Suppose the following SOAP Envelope: 98.6 Then to print the attribute 'test' use the following code: print "The attribute is: " . $som->dataof('//c2fResponse/convertedTemp')->attr->{'test'}; =head2 ITERATING OVER AN ARRAY Suppose for the following SOAP Envelope: Programming Web Service with Perl $29.95 Perl Cookbook $49.95 If the SOAP Envelope returned contained an array, use the following code to iterate over the array: for my $t ($som->valueof('//catalog/product')) { print $t->{title} . " - " . $t->{price} . "\n"; } =head2 DETECTING A SOAP FAULT A SOAP::SOM object is returned by a SOAP::Lite client regardless of whether the call succeeded or not. Therefore, a SOAP Client is responsible for determining if the returned value is a fault or not. To do so, use the fault() method which returns 1 if the SOAP::SOM object is a fault and 0 otherwise. my $som = $client->someMethod(@parameters); if ($som->fault) { print $som->faultdetail; } else { # do something } =head2 PARSING ARRAYS OF ARRAYS The most efficient way To parse and to extract data out of an array containing another array encoded in a SOAP::SOM object is the following: $xml = < 123 456 789 012 END_XML my $som = SOAP::Deserializer->deserialize($xml); my $i = 0; foreach my $a ($som->dataof("//person/*")) { $i++; my $j = 0; foreach my $b ($som->dataof("//person/[$i]/*")) { $j++; # do something } } =head1 SEE ALSO L, L =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Test.pm000644 000770 000024 00000027120 12567356463 016152 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Test; use 5.006; our $VERSION = 1.17; our $TIMEOUT = 5; # ====================================================================== package My::PingPong; # we'll use this package in our tests sub new { my $self = shift; my $class = ref($self) || $self; bless {_num=>shift} => $class; } sub next { my $self = shift; $self->{_num}++; } sub value { my $self = shift; $self->{_num}; } # ====================================================================== package SOAP::Test::Server; use strict; use Test; use SOAP::Lite; sub run_for { my $proxy = shift or die "Proxy/endpoint is not specified"; # ------------------------------------------------------ my $s = SOAP::Lite->uri('http://something/somewhere')->proxy($proxy)->on_fault(sub{}); eval { $s->transport->timeout($SOAP::Test::TIMEOUT) }; my $r = $s->test_connection; unless (defined $r && defined $r->envelope) { print "1..0 # Skip: ", $s->transport->status, "\n"; exit; } # ------------------------------------------------------ plan tests => 53; eval q!use SOAP::Lite on_fault => sub{ref $_[1] ? $_[1] : new SOAP::SOM}; 1! or die; print STDERR "Perl SOAP server test(s)...\n"; $s = SOAP::Lite -> uri('urn:/My/Examples') -> proxy($proxy); ok($s->getStateName(1)->result eq 'Alabama'); ok($s->getStateNames(1,4,6,13)->result =~ /^Alabama\s+Arkansas\s+Colorado\s+Illinois\s*$/); $r = $s->getStateList([1,2,3,4])->result; ok(ref $r && $r->[0] eq 'Alabama'); $r = $s->getStateStruct({item1 => 1, item2 => 4})->result; ok(ref $r && $r->{item2} eq 'Arkansas'); print $s->transport->status, "\n"; { my $autoresult = $s->autoresult; $s->autoresult(1); ok($s->getStateName(1) eq 'Alabama'); $s->autoresult($autoresult); } print STDERR "Autobinding of output parameters test(s)...\n"; $s->uri('urn:/My/Parameters'); my $param1 = 10; my $param2 = SOAP::Data->name('myparam' => 12); my $result = $s->autobind($param1, $param2)->result; ok($result == $param1 && $param2->value == 24); print STDERR "Header manipulation test(s)...\n"; $a = $s->addheader(2, SOAP::Header->name(my => 123)); ok(ref $a->header && $a->header->{my} eq '123123'); ok($a->headers eq '123123'); print STDERR "Echo untyped data test(s)...\n"; $a = $s->echotwo(11, 12); ok($a->result == 11); print STDERR "mustUnderstand test(s)...\n"; $s->echo(SOAP::Header->name(somethingelse => 123) ->mustUnderstand(1)); ok($s->call->faultstring =~ /[Hh]eader has mustUnderstand attribute/); if ($proxy =~ /^http/) { ok($s->transport->status =~ /^500/); } else { skip('No Status checks for non http protocols on server side' => undef); } $s->echo(SOAP::Header->name(somethingelse => 123) ->mustUnderstand(1) ->actor('http://notme/')); ok(!defined $s->call->fault); print STDERR "dispatch_from test(s)...\n"; eval "use SOAP::Lite uri => 'http://my.own.site.com/My/Examples', dispatch_from => ['A', 'B'], proxy => '$proxy', ; 1" or die; eval { C->c }; ok($@ =~ /Can't locate object method "c"/); eval { A->a }; ok(!$@ && SOAP::Lite->self->call->faultstring =~ /Failed to access class \(A\)/); eval "use SOAP::Lite dispatch_from => 'A', uri => 'http://my.own.site.com/My/Examples', proxy => '$proxy', ; 1" or die; eval { A->a }; ok(!$@ && SOAP::Lite->self->call->faultstring =~ /Failed to access class \(A\)/); print STDERR "Object autobinding and SOAP:: prefix test(s)...\n"; eval "use SOAP::Lite +autodispatch => uri => 'urn:', proxy => '$proxy'; 1" or die; ok(SOAP::Lite->autodispatched); eval { SOAP->new(1) }; ok($@ =~ /^URI is not specified/); eval "use SOAP::Lite +autodispatch => uri => 'urn:/A/B', proxy => '$proxy'; 1" or die; # should call My::PingPong, not A::B my $p = My::PingPong->SOAP::new(10); ok(ref $p && $p->SOAP::next+1 == $p->value); # forget everything SOAP::Lite->self(undef); $s = SOAP::Lite -> uri('urn:/My/PingPong') -> proxy($proxy) ; # should return object EXACTLY as after My::PingPong->SOAP::new(10) $p = $s->SOAP::new(10); ok(ref $p && $s->SOAP::next($p)+1 == $p->value); print STDERR "VersionMismatch test(s)...\n"; { local $SOAP::Constants::NS_ENV = 'http://schemas.xmlsoap.org/new/envelope/'; my $s = SOAP::Lite -> uri('http://my.own.site.com/My/Examples') -> proxy($proxy) -> on_fault(sub{}) ; $r = $s->dosomething; ok(ref $r && $r->faultcode =~ /:VersionMismatch/); } print STDERR "Objects-by-reference test(s)...\n"; eval "use SOAP::Lite +autodispatch => uri => 'urn:', proxy => '$proxy'; 1" or die; print STDERR "Session iterator\n"; $r = My::SessionIterator->new(10); if (!ref $r || exists $r->{id}) { ok(ref $r && $r->next && $r->next == 11); } else { skip('No persistent objects (o-b-r) supported on server side' => undef); } print STDERR "Persistent iterator\n"; $r = My::PersistentIterator->new(10); if (!ref $r || exists $r->{id}) { my $first = ($r->next, $r->next) if ref $r; $r = My::PersistentIterator->new(10); ok(ref $r && $r->next && $r->next == $first+2); } else { skip('No persistent objects (o-b-r) supported on server side' => undef); } { local $^W; # disable warnings about deprecated AUTOLOADing for nonmethods print STDERR "Parameters-by-name test(s)...\n"; print STDERR "You can see warning about AUTOLOAD for non-method...\n" if $^W; eval "use SOAP::Lite +autodispatch => uri => 'http://my.own.site.com/My/Parameters', proxy => '$proxy'; 1" or die; my @parameters = ( SOAP::Data->name(b => 222), SOAP::Data->name(c => 333), SOAP::Data->name(a => 111) ); # switch to 'main' package, because nonqualified methods should be there ok(main::byname(@parameters) eq "a=111, b=222, c=333"); ok(main::bynameororder(@parameters) eq "a=111, b=222, c=333"); ok(main::bynameororder(111, 222, 333) eq "a=111, b=222, c=333"); print STDERR "Function call test(s)...\n"; print STDERR "You can see warning about AUTOLOAD for non-method...\n" if $^W; ok(main::echo(11) == 11); } print STDERR "SOAPAction test(s)...\n"; if ($proxy =~ /^tcp:/) { for (1..2) {skip('No SOAPAction checks for tcp: protocol on server side' => undef)} } else { my $s = SOAP::Lite -> uri('http://my.own.site.com/My/Examples') -> proxy($proxy) -> on_action(sub{'""'}) ; ok($s->getStateName(1)->result eq 'Alabama'); $s->on_action(sub{'"wrong_SOAPAction_here"'}); ok($s->getStateName(1)->faultstring =~ /SOAPAction shall match/); } print STDERR "UTF8 test(s)...\n"; if (!eval "pack('U*', 0)") { for (1) {skip('No UTF8 test. No support for pack("U*") modifier' => undef)} } else { $s = SOAP::Lite -> uri('http://my.own.site.com/My/Parameters') -> proxy($proxy); my $latin1 = 'яПНрЈЂяПНяПН'; my $utf8 = pack('U*', unpack('C*', $latin1)); my $result = $s->echo(SOAP::Data->type(string => $utf8))->result; ok(pack('U*', unpack('C*', $result)) eq $utf8 # should work where XML::Parser marks resulting strings as UTF-8 || join('', unpack('C*', $result)) eq join('', unpack('C*', $utf8)) # should work where it doesn't ); } { my $on_fault_was_called = 0; print STDERR "Die in server method test(s)...\n"; my $s = SOAP::Lite -> uri('http://my.own.site.com/My/Parameters') -> proxy($proxy) -> on_fault(sub{$on_fault_was_called++;return}) ; ok($s->die_simply()->faultstring =~ /Something bad/); ok($on_fault_was_called > 0); my $detail = $s->die_with_object()->dataof(SOAP::SOM::faultdetail . '/[1]'); ok($on_fault_was_called > 1); ok(ref $detail && $detail->name =~ /(^|:)something$/); # get Fault as hash of subelements my $fault = $s->die_with_fault()->fault; ok($fault->{faultcode} =~ ':Server.Custom'); ok($fault->{faultstring} eq 'Died in server method'); ok(ref $fault->{detail}->{BadError} eq 'BadError'); ok($fault->{faultactor} eq 'http://www.soaplite.com/custom'); } print STDERR "Method with attributes test(s)...\n"; $s = SOAP::Lite -> uri('urn:/My/Examples') -> proxy($proxy) ; ok($s->call(SOAP::Data->name('getStateName')->attr({xmlns => 'urn:/My/Examples'}), 1)->result eq 'Alabama'); print STDERR "Call with empty uri test(s)...\n"; $s = SOAP::Lite -> uri('') -> proxy($proxy) ; ok($s->getStateName(1)->faultstring =~ /Denied access to method \(getStateName\) in class \(main\)/); ok($s->call('a:getStateName' => 1)->faultstring =~ /Denied access to method \(getStateName\) in class \(main\)/); print STDERR "Number of parameters test(s)...\n"; $s = SOAP::Lite -> uri('http://my.own.site.com/My/Parameters') -> proxy($proxy) ; { my @all = $s->echo->paramsall; ok(@all == 0) } { my @all = $s->echo(1)->paramsall; ok(@all == 1) } { my @all = $s->echo((1) x 10)->paramsall; ok(@all == 10) } print STDERR "Memory refresh test(s)...\n"; # Funny test. # Let's forget about ALL settings we did before with 'use SOAP::Lite...' SOAP::Lite->self(undef); ok(!defined SOAP::Lite->self); print STDERR "Call without uri test(s)...\n"; $s = SOAP::Lite -> proxy($proxy) ; ok($s->getStateName(1)->faultstring =~ /Denied access to method \(getStateName\) in class \(main\)/); print STDERR "Different settings for method and namespace test(s)...\n"; ok($s->call(SOAP::Data ->name('getStateName') ->attr({xmlns => 'urn:/My/Examples'}), 1)->result eq 'Alabama'); ok($s->call(SOAP::Data ->name('a:getStateName') ->uri('urn:/My/Examples'), 1)->result eq 'Alabama'); ok($s->call(SOAP::Data ->name('getStateName') ->uri('urn:/My/Examples'), 1)->result eq 'Alabama'); ok($s->call(SOAP::Data ->name('a:getStateName') ->attr({'xmlns:a' => 'urn:/My/Examples'}), 1)->result eq 'Alabama'); eval { $s->call(SOAP::Data->name('a:getStateName')) }; ok($@ =~ /Can't find namespace for method \(a:getStateName\)/); $s->serializer->namespaces->{'urn:/My/Examples'} = ''; ok($s->getStateName(1)->result eq 'Alabama'); eval "use SOAP::Lite uri => 'urn:/My/Examples', proxy => '$proxy'; 1" or die; print STDERR "Global settings test(s)...\n"; $s = new SOAP::Lite; ok($s->getStateName(1)->result eq 'Alabama'); SOAP::Trace->import(transport => sub {$_[0]->content_type('something/wrong') if UNIVERSAL::isa($_[0] => 'HTTP::Request')} ); if ($proxy =~ /^tcp:/) { skip('No Content-Type checks for tcp: protocol on server side' => undef); } else { ok($s->getStateName(1)->faultstring =~ /Content-Type must be/); } } # ====================================================================== 1; __END__ =head1 NAME SOAP::Test - Test framework for SOAP::Lite =head1 SYNOPSIS use SOAP::Test; SOAP::Test::Server::run_for('http://localhost/cgi-bin/soap.cgi'); =head1 DESCRIPTION SOAP::Test provides simple framework for testing server implementations. Specify your address (endpoint) and run provided tests against your server. See t/1*.t for examples. =head1 COPYRIGHT Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Paul Kulchenko (paulclinger@yahoo.com) =cut SOAP-Lite-1.19/lib/SOAP/Trace.pod000644 000770 000024 00000016133 12567356463 016441 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Trace - used only to manage and manipulate the runtime tracing of execution within the toolkit =head1 DESCRIPTION This class has no methods or objects. It is used only to manage and manipulate the runtime tracing of execution within the toolkit. In absence of methods, this section reviews the events that may be configured and the ways of configuring them. =head1 SYNOPSIS Tracing is enabled by the SOAP::Lite import method. This is usually done at compile-time, though it may be done explicitly by calling import directly. The commands for setting up tracing start with the keyword +trace. Alternately, +debug may be used; the two are interchangeable. After the initial keyword, one or more of the signals detailed here may be specified, optionally with a callback to handle them. When specifying multiple signals to be handled by a single callback, it is sufficient to list all of them first, followed finally by the callback, as in: use SOAP::Lite +trace => method => fault => \&message_level, trace => objects => \&lower_level; In the fragment, the reference to message_level is installed as the callback for both method and fault signals, while lower_level is installed for trace and object events. If callbacks aren't explicitly provided, the default tracing action is to log a message to Perl's STDOUT file descriptor. Callbacks should expect a one or more arguments passed in, though the nature of the arguments varies based on the signal. Any signal can be disabled by prefacing the name with a hyphen, such as -result. This is useful with the pseudosignal "all," which is shorthand for the full list of signals. The following fragment disables only the two signals, while still enabling the rest: SOAP::Lite->import(+trace => all => -result => -parameters); If the keyword +trace (or +debug) is used without any signals specified, it enables all signals (as if all were implied). The signals and their meaning follow. Each also bears a note as to whether the signal is relevant to a server application, client application, or both. =head1 TRACE SIGNALS =over =item transport I Triggered in the transport layer just before a request is sent and immediately after a response is received. Each time the signal is sent, the sole argument to the callback is the relevant object. On requests, this is a L object; for responses, it's a L object. =item dispatch I Triggered with the full name of the method being dispatched, just before execution is passed to it. It is currently disabled in SOAP::Lite 0.55. =item result I Triggered after the method has been dispatched and is passed the results returned from the method as a list. The result values have not yet been serialized when this signal is sent. =item parameters I Triggered before a method call is actually dispatched, with the data that is intended for the call itself. The parameters for the method call are passed in as a list, after having been deserialized into Perl data. =item headers I This signal should be for triggering on the headers of an incoming message, but it isn't implemented as of SOAP::Lite 0.55. =item objects I Highlights when an object is instantiated or destroyed. It is triggered in the new and DESTROY methods of the various SOAP::Lite classes. =item method I Triggered with the list of arguments whenever the envelope method of L is invoked with an initial argument of method. The initial string itself isn't passed to the callback. =item fault I As with the method signal earlier, except that this signal is triggered when SOAP::Serializer::envelope is called with an initial argument of fault. =item freeform I Like the two previous, this signal is triggered when the method SOAP::Serializer::envelope is called with an initial parameter of freeform. This syntax is used when the method is creating SOAP::Data objects from free-form input data. =item trace I Triggered at the entry-point of many of the more-significant functions. Not all the functions within the SOAP::Lite classes trigger this signal. Those that do are primarily the highly visible functions described in the interface descriptions for the various classes. =item debug I Used in the various transport modules to track the contents of requests and responses (as ordinary strings, not as objects) at different points along the way. =back =head1 EXAMPLES =head2 SELECTING SIGNALS TO TRACE The following code snippet will enable tracing for all signals: use SOAP::Lite +trace => 'all'; You can disable tracing for a set of signals by prefixing the signal name with a hyphen. Therefore, if you wish to enable tracing for every signal EXCEPT transport signals, then you would use the code below: use SOAP::Lite +trace => [ qw(all -transport) ]; =head2 LOGGING SIGNALS TO A FILE You can optionally provide a subroutine or callback to each signal trace you declare. Each time a signal is received, it is passed to the corresponding subroutine. For example, the following code effectively logs all fault signals to a file called fault.log: use SOAP::Lite +trace => [ fault => \&log_faults ]; sub log_faults { open LOGFILE,">fault.log"; print LOGFILE, $_[0] . "\n"; close LOGFILE; } You can also use a single callback for multiple signals using the code below: use SOAP::Lite +trace => [ method, fault => \&log ]; =head2 LOGGING MESSAGE CONTENTS The transport signal is unique in the that the signal is not a text string, but the actually HTTP::Request being sent (just prior to be sent), or HTTP::Response object (immediately after it was received). The following code sample shows how to make use of this: use SOAP::Lite +trace => [ transport => \&log_message ]; sub log_message { my ($in) = @_; if (class($in) eq "HTTP::Request") { # do something... print $in->contents; # ...for example } elsif (class($in) eq "HTTP::Response") { # do something } } =head2 ON_DEBUG The C method is available, as in: use SOAP::Lite; my $client = SOAP::Lite ->uri($NS) ->proxy($HOST) ->on_debug( sub { print @_; } ); =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Transport/000755 000770 000024 00000000000 12567356463 016667 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/lib/SOAP/Transport.pod000644 000770 000024 00000062165 12567356463 017405 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Transport - an abstract class extended by more specialized transport modules =head1 DESCRIPTION Objects of the SOAP::Transport class manage two roles: they manage both the parameters related to transport as set through the containing SOAP::Lite object, and they abstract the selection and loading of an appropriate transport module. This is done with an AUTOLOAD function within the class that intercepts all methods beyond the two defined next and reroutes them to the underlying transport implementation code. =head1 METHODS =over =item new $trans = SOAP::Transport->new; This is the constructor, which isn't usually called by an application directly. An application can use this to create a fresh new SOAP::Transport object, which may be installed using the SOAP::Lite->transport method defined earlier. No arguments are recognized. =item proxy(optional URL string) $trans->proxy('http://www.blackperl.com/SOAP'); Gets or sets the proxy (endpoint). This method must be called before any other methods are called. The proper transport code is loaded based on the scheme specified by the URL itself (http, jabber, etc.). Until this method is called the first time with a URL string, the underlying code has yet to be loaded, and the methods aren't available. When getting the current proxy (calling with no parameters), the returned value is a reference to the client object created from the protocol class that matched the endpoint, not the endpoint itself. =back =head1 SOAP Transport Sub-Classes Because the bulk of the work is done within the C module itself, many of the transport-level modules are very simple in their implementations. Transport modules are expected to define both client and server classes within their files. If a module defines only one of the types, it is assumed that the transport protocol itself supports only that side of the conversation. An example is L, which provides only a C class. L - Client class only L - Client, and server classes for CGI, FCGI, Daemon and mod_perl L - Server class only L - Server and Client classes L - Client class only L - Client class only L - Server and Client classes L - Server class only L - Server and Client classes =head2 METHODS Each SOAP::Transport sub-class is expected to define (or inherit, if it is subclassing another transport class) at least two methods. Any newly developed transport classes are also expected to adhere to this interface. Clients are expected to implement the C and C methods, and servers are expected to implement the C and C methods. Here they are: =over =item new(optional key/value pairs) $object = $class->new(%params); Creates a new object instance and returns it. Like the constructors for both C and L classes, all arguments passed in are treated as key/value pairs, where the key is expected to be one of the methods the class supports, and the value is the argument (or list reference of arguments) to the method. =item send_receive(key/value pairs) $client->send_recieve(%hash_table); (Required for client classes only) When the SOAP::Lite objects attempt to send out requests, the means for doing so is to attempt to call this method on the object held within the SOAP::Transport object contained within the client itself. All clients are expected to provide this, and the call to this method always passes four values for the hash keys: =over =item action The URI specifying the action being performed, usually the result from the on_action hook on the client object. =item encoding The URI of the encoding scheme that governs the message being sent. =item endpoint The URI specifying the endpoint to which the message is being sent. =item envelope The XML content of the message to be sent. It is generally the return value of the envelope method from the L object instance that the client object maintains. =item parts Attachments to add to the request. Currently this only supports an array of MIME::Entity objects, but in theory could support attachments of any format. =back =item handle $server->handle; (Required for server classes only.) This method is the central point for the various server classes to provide an interface to handling requests. The exact set and nature of parameters generally varies based on the classes themselves. =back =head2 SOAP::Transport::HTTP The most commonly used transport module is the HTTP implementation. This is loaded whenever an endpoint is given that starts with the characters, http:// or https://. This is also the most involved of the transport modules, defining not only a client class but several different server classes as well. =head3 HTTP PROXY SETTINGS Because C inherits from C, you can use any of C's proxy settings. For example: SOAP::Lite->proxy("http://endpoint.server/", proxy => ["http" => "http://my.proxy.server"]); or $soap->transport->proxy("http" => "http://my.proxy.server"); The above code samples should specify a proxy server for you. And should you use C and C for proxy authorization, C will handle it properly. =head3 HTTP BASIC AUTHENTICATION HTTP Basic authentication is accomplished by overriding the get_basic_credentials subroutine in C (which C is a subclass): BEGIN { sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'username' => 'password'; } } =head3 COOKIE-BASED AUTHENTICATION use HTTP::Cookies; my $cookies = HTTP::Cookies->new(ignore_discard => 1); # you may also add 'file' if you want to keep them between sessions my $soap = SOAP::Lite->proxy('http://localhost/'); $soap->transport->cookie_jar($cookies); Or, alternatively, you can do the above on a single line: $soap->proxy('http://localhost/', cookie_jar => HTTP::Cookies->new(ignore_discard => 1)); Cookies will be taken from the response and provided to the request. You may access and manipulate cookies received, as well as add cookies of your own by using the C interfaces. =head3 SSL CERTIFICATE AUTHENTICATION The default SSL implementation for the HTTP client library L used by SOAP::Lite is L. To enable certificate based authentication, you'll have to pass your certificate and key as additional options to the proxy() method like this: $soap->proxy( $url, ssl_opts => { SSL_cert_file => 'client-cert.pem', SSL_key_file => 'client-key.pem' }); Or you can set them later like this: $soap->transport->ssl_opts( SSL_cert_file => 'client-cert.pem', SSL_key_file => 'client-key.pem' ); If you're using L, the following applies: To get certificate authentication working you need to set three environment variables: C, C, and optionally C. This can be done either through the command line, or directly within your Perl script using the C<$ENV> variable: $ENV{HTTPS_CERT_FILE} = 'client-cert.pem'; $ENV{HTTPS_KEY_FILE} = 'client-key.pem'; These settings are referenced by C. Other options (e.g. CA peer verification) can be specified in a similar way. See L documentation for more information. Please note that you probably should not be using L because it does not perform hostname verification; LWP::UserAgent uses IO::Socket::SSL by default. See also L. Those who would like to use encrypted keys may find the following thread in the SOAP::Lite newsgroup helpful: http://groups.yahoo.com/group/soaplite/message/729 =head3 COMPRESSION SOAP::Lite provides you with the option for enabling compression over the wire using HTTP I in both the server and client contexts, provided that you have L installed. Compression and decompression is done transparently to your application. A server will respond with an encoded/compressed message only if the client has asserted that it can accept it (indicated by client sending an C HTTP header with a 'deflate' or '*' value). C clients all have fallback logic implemented so that if a server doesn't understand the specified encoding (i.e. "Content-Encoding: deflate") and returns the proper HTTP status code (415 NOT ACCEPTABLE), the client will repeat the request without using encoding/compression. The client will then store this server in a per-session cache, so that all subsequent requests to that server will be transmitted without encoding. Compression is enabled on the client side by specifying the C option, and if the size of the current request exceeds that threshold. B print SOAP::Lite ->uri('http://localhost/My/Parameters') ->proxy('http://localhost/', options => {compress_threshold => 10000}) ->echo(1 x 10000) ->result; Servers will respond with a compressed message if the C option has been specified, if the size of the current response exceeds that threshold, and if the calling client transmitted the proper C HTTP Header. B my $server = SOAP::Transport::HTTP::CGI ->dispatch_to('My::Parameters') ->options({compress_threshold => 10000}) ->handle; See also: L =head3 SOAP::Transport::HTTP::Client Inherits from: L, L (from the LWP package). With this class, clients are able to use HTTP for sending messages. This class provides just the basic new and send_receive methods. Objects of this class understand the compress_threshold option and use it if the server being communicated to also understands it. =head4 CHANGING THE DEFAULT USERAGENT CLASS By default, C extends C. But under some circumstances, a user may wish to change the default UserAgent class with their in order to better handle persist connections, or to C, for example, which has better Win32/Internet Explorer interoperability. One can use the code below as an example of how to change the default UserAgent class. use SOAP::Lite; use SOAP::Transport::HTTP; $SOAP::Transport::HTTP::Client::USERAGENT_CLASS = "My::UserAgent"; my $client = SOAP::Lite->proxy(..)->uri(..); my $som = $client->myMethod(); There is one caveat, however. The UserAgent class you use, I also be a subclass of C. If it is not, then C will issue the following error: "Could not load UserAgent class ." =head4 HTTP-KEEP-ALIVE, TIMEOUTS, AND MORE Because C extends C, all methods available C are also available to your SOAP Clients. For example, using C HTTP keep alive's are accomplished using the following code: my $ua = LWP::UserAgent->new( keep_alive => 1, timeout => 30 ); Therefore, the same initialization parameters you would pass to C can also be passed to your SOAP::Lite client's C subroutine like so: my $soap = SOAP::Lite ->uri($uri) ->proxy($proxyUrl, timeout => 30, keep_alive => 1, ); This is true for all initialization parameters and methods of C. =head4 METHODS =over =item http_request This method gives you access to a prototype of the HTTP Request object that will be transmitted to a SOAP::Server. The actual request used is a copy of that object. Do not use this method for anything else than setting prototypic behaviour for the client object. =item http_response This method gives you access to the HTTP Response object that will be, or was transmitted to a SOAP Server. It returns a L object. =back =head3 SOAP::Transport::HTTP::Server Inherits from: L. This is the most basic of the HTTP server implementations. It provides the basic methods, new and handle. The handle method's behavior is defined here, along with other methods specific to this class. The role of this class is primarily to act as a superclass for the other HTTP-based server classes. =over =item handle $server->handle; Expects the request method to have been used to associate a HTTP::Request object with the server object prior to being called. This method retrieves that object reference to get at the request being handled. =item request(I) $server->request($req_object) Gets or sets the HTTP::Request object reference that the server will process within the handle method. =item response(I) $server->response(HTTP::Response->new(...)); Gets or sets the HTTP::Response object reference that the server has prepared for sending back to the client. =item make_response(I, I) $server->make_response(200, $body_xml); Constructs and returns an object of the HTTP::Response class, using the response code and content provided. =item make_fault(I) $server->response($server->make_fault(@data)); Creates a HTTP::Response object reference using a predefined HTTP response code to signify that a fault has occurred. The arguments are the same as those for the make_fault method of the SOAP::Server class. =item product_tokens This method takes no arguments and simply returns a string identifying the elements of the server class itself. It is similar to the product_tokens methods in the HTTP::Daemon and Apache classes. =back =head3 SOAP::Transport::HTTP::CGI Inherits from: L. This class is a direct subclass of SOAP::Transport::HTTP::Server and defines no additional methods. It includes logic in its implementation of the handle method that deals with the request headers and parameters specific to a CGI environment. =head4 EXAMPLE CGI The following code sample is a CGI based Web Service that converts celsius to fahrenheit: #!/usr/bin/perl use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI ->dispatch_to('C2FService') ->handle; BEGIN { package C2FService; use vars qw(@ISA); @ISA = qw(Exporter SOAP::Server::Parameters); use SOAP::Lite; sub c2f { my $self = shift; my $envelope = pop; my $temp = $envelope->dataof("//c2f/temperature"); return SOAP::Data->name('convertedTemp' => (((9/5)*($temp->value)) + 32)); } } =head4 EXAMPLE APACHE::REGISTRY USAGE Using a strictly CGI based Web Service has certain performance drawbacks. Running the same CGI under the Apache::Registery system has certain performance gains. B Alias /mod_perl/ "/Your/Path/To/Deployed/Modules" SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On Options +ExecCGI B use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI ->dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ->handle; I will fail because the module will be only loaded dynamically the first time. Subsequent calls will produce "denied access" errors because once the module is already in memory C will bypass dynamic deployment. To work around this, simply specify both the full PATH and MODULE name in C and the module will be loaded dynamically, but will then work as if under static deployment. See F as an example.> =head3 SOAP::Transport::HTTP::Daemon Inherits from: L. The SOAP::Transport::HTTP::Daemon class encapsulates a reference to an object of the HTTP::Daemon class (from the LWP package). The class catches methods that aren't provided locally or by the superclass and attempts to call them on the HTTP::Daemon object. Thus, all methods defined in the documentation for that class are available to this class as well. Any that conflict with methods in SOAP::Transport::HTTP::Server (such as product_tokens) go to the superclass. Additionally, the behavior of the handle method is specific to this class: =over =item handle When invoked, this method enters into the typical accept loop in which it waits for a request on the socket that the daemon object maintains and deals with the content of the request. When all requests from the connection returned by the accept method of the HTTP::Daemon object have been processed, this method returns. =back =head4 REUSING SOCKETS ON RESTART Often when implementing an HTTP daemon, sockets will get tied up when you try to restart the daemon server. This prevents the server from restarting. Often users will see an error like "Cannot start server: port already in use." To circumvent this, instruct SOAP::Lite to reuse open sockets using C<< Reuse => 1 >>: my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => 80000, Reuse => 1) =head4 EXAMPLE DAEMON SERVER use SOAP::Transport::HTTP; # change LocalPort to 81 if you want to test it with soapmark.pl my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalAddr => 'localhost', LocalPort => 80) # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; =head3 SOAP::Transport::HTTP::Apache Inherits from: L. This class provides an integration of the SOAP::Server base class with the mod_perl extension for Apache. To work as a location handler, the package provides a method called handler, for which handle is made an alias. The new method isn't functionally different from the superclass. Here are the other methods provided by this class: =over =item handler(I) $server->handler($r) Defines the basis for a location handler in the mod_perl fashion. The method expects an Apache request object as the parameter, from which it pulls the body of the request and calls the superclass handle method. Note that in this class, the local method named handle is aliased to this method. =item configure(I) $server->configure(Apache->request); Per-location configuration information can be provided to the server object using the Apache DirConfig directive and calling this method on the object itself. When invoked, the method reads the directory configuration information from Apache and looks for lines of the form: method => param Each line that matches the pattern is regarded as a potential method to call on the server object, with the remaining token taken as the parameter to the method. Methods that take hash references as arguments may be specified as: method => key => param, key => param The key/value pairs will be made into a hash reference on demand. If the server object doesn't recognize the named method as valid, it ignores the line. =back =head4 EXAMPLE APACHE MOD_PERL SERVER See F and L for more information. B SetHandler perl-script PerlHandler SOAP::Apache PerlSetVar options "compress_threshold => 10000" B package SOAP::Apache; use SOAP::Transport::HTTP; my $server = SOAP::Transport::HTTP::Apache ->dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method'); sub handler { $server->handler(@_) } 1; See also L. =head3 SOAP::Transport::HTTP::FCGI Inherits from: L. This is an extension of the SOAP::Transport::HTTP::CGI that implements the differences needed for the FastCGI protocol. None of the methods are functionally different. =head2 SOAP::Transport::IO The SOAP::Transport::IO-based class allows for a sort of I/O proxying by allowing the application to configure what files or filehandles are used. This module supplies only a server class. =head3 SOAP::Transport::IO::Server Inherits from: L. The server class defined here inherits all methods from SOAP::Server, and adds two additional methods specific to the nature of the class: =over =item in $server->in(IO::File->new($file)); Gets or sets the current filehandle being used as the input source. =item out $server->out(\*STDERR); Gets or sets the filehandle being used as the output destination. =back =head2 SOAP::Transport::LOCAL The SOAP::Transport::LOCAL module is designed to provide a no-transport client class for tracing and debugging communications traffic. It links SOAP::Client and SOAP::Server so that the same object that "sends" the request also "receives" it. =head3 SOAP::Transport::LOCAL::Client Inherits from: L, L. The implementations of the new and send_receive methods aren't noticeably different in their interface. Their behavior warrants description, however: =over =item new When the constructor creates a new object of this class, it sets up a few things beyond the usual SOAP::Client layout. The is_success method is set to a default value of 1. The dispatch_to method inherited from SOAP::Server is called with the current value of the global array @INC, allowing the client to call any methods that can be found in the current valid search path. And as with most of the constructors in this module, the optional key/value pairs are treated as method names and parameters. =item send_receive The implementation of this method simply passes the envelope portion of the input data to the handle method of SOAP::Server. While no network traffic results (directly) from this, it allows for debug signals to be sent through the SOAP::Trace facility. =back =head2 SOAP::Transport::MAILTO This transport class manages SMTP-based sending of messages from a client perspective. It doesn't provide a server class. The class gets selected when a client object passes a URI to proxy or endpoint that starts with the characters, mailto:. =head3 SOAP::Transport::MAILTO::Client Inherits from: L. The client class for this protocol doesn't define any new methods. The constructor functions in the same style as the others class constructors. The functionality of the send_receive method is slightly different from other classes, however. When invoked, the send_receive method uses the MIME::Lite package to encapsulate and transmit the message. Because mail messages are one-way communications (the reply being a separate process), there is no response message to be returned by the method. Instead, all the status-related attributes (code, message, status, is_success) are set, and no value is explicitly returned. =head2 SOAP::Transport::POP3 POP3 support is limited to a server implementation. Just as the MAILTO class detailed earlier operates by sending requests without expecting to process a response, the server described here accepts request messages and dispatches them without regard for sending a response other than that which POP3 defines for successful delivery of a message. =head3 SOAP::Transport::POP3::Server Inherits from: L. The new method of this class creates an object of the Net::POP3 class to use internally for polling a specified POP3 server for incoming messages. When an object of this class is created, it expects an endpoint to be specified with a URI that begins with the characters pop:// and includes user ID and password information as well as the hostname itself. The handle method takes the messages present in the remote mailbox and passes them (one at a time) to the superclass handle method. Each message is deleted after being routed. All messages in the POP3 mailbox are presumed to be SOAP messages. Methods for the Net::POP3 object are detected and properly routed, allowing operations such as $server->ping( ). This means that the endpoint string doesn't need to provide the user ID and password because the login method from the POP3 API may be used directly. =head1 ACKNOWLEDGEMENTS Special thanks to O'Reilly publishing which has graciously allowed SOAP::Lite to republish and redistribute large excerpts from I, mainly the SOAP::Lite reference found in Appendix B. =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Paul Kulchenko (paulclinger@yahoo.com) Randy J. Ray (rjray@blackperl.com) Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Utils.pod000644 000770 000024 00000002047 12567356463 016502 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2003 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== =pod =head1 NAME SOAP::Utils - a utility package for SOAP::Lite =head1 DESCRIPTION This class gives you access to a number of subroutines to assist in data formatting, encoding, etc. Many of the subroutines are private, and are not documented here, but a few are made public. =head1 METHODS =over =item format_datetime Returns a valid xsd:datetime string given a time object returned by Perl's localtime function. Usage: print SOAP::Utils::format_datetime(localtime); =back =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Byrne Reese (byrne@majordojo.com) =cut SOAP-Lite-1.19/lib/SOAP/Transport/HTTP.pm000644 000770 000024 00000070624 12567356463 020015 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Transport::HTTP; use strict; our $VERSION = 1.17; use SOAP::Lite; use SOAP::Packager; # ====================================================================== package SOAP::Transport::HTTP::Client; use vars qw(@ISA $COMPRESS $USERAGENT_CLASS); $USERAGENT_CLASS = 'LWP::UserAgent'; @ISA = qw(SOAP::Client); $COMPRESS = 'deflate'; my ( %redirect, %mpost, %nocompress ); # hack for HTTP connection that returns Keep-Alive # miscommunication (?) between LWP::Protocol and LWP::Protocol::http # dies after timeout, but seems like we could make it work my $_patched = 0; sub patch { return if $_patched; BEGIN { local ($^W) = 0; } { local $^W = 0; sub LWP::UserAgent::redirect_ok; *LWP::UserAgent::redirect_ok = sub { 1 } } { package LWP::Protocol; local $^W = 0; my $collect = \&collect; # store original *collect = sub { if ( defined $_[2]->header('Connection') && $_[2]->header('Connection') eq 'Keep-Alive' ) { my $data = $_[3]->(); my $next = $_[2]->header('Content-Length') && SOAP::Utils::bytelength($$data) == $_[2]->header('Content-Length') ? sub { my $str = ''; \$str; } : $_[3]; my $done = 0; $_[3] = sub { $done++ ? &$next : $data; }; } goto &$collect; }; } $_patched++; } sub DESTROY { SOAP::Trace::objects('()') } sub http_request { my $self = shift; if (@_) { $self->{'_http_request'} = shift; return $self } return $self->{'_http_request'}; } sub http_response { my $self = shift; if (@_) { $self->{'_http_response'} = shift; return $self } return $self->{'_http_response'}; } sub setDebugLogger { my ($self,$logger) = @_; $self->{debug_logger} = $logger; } sub new { my $class = shift; #print "HTTP.pm DEBUG: in sub new\n"; return $class if ref $class; # skip if we're already object... if ( !grep { $_ eq $USERAGENT_CLASS } @ISA ) { push @ISA, $USERAGENT_CLASS; } eval("require $USERAGENT_CLASS") or die "Could not load UserAgent class $USERAGENT_CLASS: $@"; require HTTP::Request; require HTTP::Headers; patch() if $SOAP::Constants::PATCH_HTTP_KEEPALIVE; my ( @params, @methods ); while (@_) { $class->can( $_[0] ) ? push( @methods, shift() => shift ) : push( @params, shift ); } my $self = $class->SUPER::new(@params); die "SOAP::Transport::HTTP::Client must inherit from LWP::UserAgent, or one of its subclasses" if !$self->isa("LWP::UserAgent"); $self->agent( join '/', 'SOAP::Lite', 'Perl', $SOAP::Transport::HTTP::VERSION ); $self->options( {} ); $self->http_request( HTTP::Request->new() ); while (@methods) { my ( $method, $params ) = splice( @methods, 0, 2 ); $self->$method( ref $params eq 'ARRAY' ? @$params : $params ); } SOAP::Trace::objects('()'); $self->setDebugLogger(\&SOAP::Trace::debug); return $self; } sub send_receive { my ( $self, %parameters ) = @_; my ( $context, $envelope, $endpoint, $action, $encoding, $parts ) = @parameters{qw(context envelope endpoint action encoding parts)}; $encoding ||= 'UTF-8'; $endpoint ||= $self->endpoint; my $method = 'POST'; $COMPRESS = 'gzip'; $self->options->{is_compress} ||= exists $self->options->{compress_threshold} && eval { require Compress::Zlib }; # Initialize the basic about the HTTP Request object my $http_request = $self->http_request()->clone(); # $self->http_request(HTTP::Request->new); $http_request->headers( HTTP::Headers->new ); # TODO - add application/dime $http_request->header( Accept => ['text/xml', 'multipart/*', 'application/soap'] ); $http_request->method($method); $http_request->url($endpoint); no strict 'refs'; if ($parts) { my $packager = $context->packager; $envelope = $packager->package( $envelope, $context ); for my $hname ( keys %{$packager->headers_http} ) { $http_request->headers->header( $hname => $packager->headers_http->{$hname} ); } # TODO - DIME support } COMPRESS: { my $compressed = !exists $nocompress{$endpoint} && $self->options->{is_compress} && ( $self->options->{compress_threshold} || 0 ) < length $envelope; my $original_encoding = $http_request->content_encoding; while (1) { # check cache for redirect $endpoint = $redirect{$endpoint} if exists $redirect{$endpoint}; # check cache for M-POST $method = 'M-POST' if exists $mpost{$endpoint}; # what's this all about? # unfortunately combination of LWP and Perl 5.6.1 and later has bug # in sending multibyte characters. LWP uses length() to calculate # content-length header and starting 5.6.1 length() calculates chars # instead of bytes. 'use bytes' in THIS file doesn't work, because # it's lexically scoped. Unfortunately, content-length we calculate # here doesn't work either, because LWP overwrites it with # content-length it calculates (which is wrong) AND uses length() # during syswrite/sysread, so we are in a bad shape anyway. # # what to do? we calculate proper content-length (using # bytelength() function from SOAP::Utils) and then drop utf8 mark # from string (doing pack with 'C0A*' modifier) if length and # bytelength are not the same my $bytelength = SOAP::Utils::bytelength($envelope); if ($] < 5.008) { $envelope = pack( 'C0A*', $envelope ); } else { require Encode; $envelope = Encode::encode($encoding, $envelope); } # if !$SOAP::Constants::DO_NOT_USE_LWP_LENGTH_HACK # && length($envelope) != $bytelength; # compress after encoding # doing it before breaks the compressed content (#74577) $envelope = Compress::Zlib::memGzip($envelope) if $compressed; $http_request->content($envelope); $http_request->protocol('HTTP/1.1'); $http_request->proxy_authorization_basic( $ENV{'HTTP_proxy_user'}, $ENV{'HTTP_proxy_pass'} ) if ( $ENV{'HTTP_proxy_user'} && $ENV{'HTTP_proxy_pass'} ); # by Murray Nesbitt if ( $method eq 'M-POST' ) { my $prefix = sprintf '%04d', int( rand(1000) ); $http_request->header( Man => qq!"$SOAP::Constants::NS_ENV"; ns=$prefix! ); $http_request->header( "$prefix-SOAPAction" => $action ) if defined $action; } else { $http_request->header( SOAPAction => $action ) if defined $action; } # $http_request->header(Expect => '100-Continue'); # allow compress if present and let server know we could handle it $http_request->header( 'Accept-Encoding' => [$SOAP::Transport::HTTP::Client::COMPRESS] ) if $self->options->{is_compress}; $http_request->content_encoding( $SOAP::Transport::HTTP::Client::COMPRESS) if $compressed; if ( !$http_request->content_type ) { $http_request->content_type( join '; ', $SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE, !$SOAP::Constants::DO_NOT_USE_CHARSET && $encoding ? 'charset=' . lc($encoding) : () ); } elsif ( !$SOAP::Constants::DO_NOT_USE_CHARSET && $encoding ) { my $tmpType = $http_request->headers->header('Content-type'); # $http_request->content_type($tmpType.'; charset=' . lc($encoding)); my $addition = '; charset=' . lc($encoding); $http_request->content_type( $tmpType . $addition ) if ( $tmpType !~ /$addition/ ); } $http_request->content_length($bytelength) unless $compressed; SOAP::Trace::transport($http_request); &{$self->{debug_logger}}($http_request->as_string); $self->SUPER::env_proxy if $ENV{'HTTP_proxy'}; # send and receive the stuff. # TODO maybe eval this? what happens on connection close? $self->http_response( $self->SUPER::request($http_request) ); SOAP::Trace::transport( $self->http_response ); &{$self->{debug_logger}}($self->http_response->as_string); # 100 OK, continue to read? if ( ( $self->http_response->code == 510 || $self->http_response->code == 501 ) && $method ne 'M-POST' ) { $mpost{$endpoint} = 1; } elsif ( $self->http_response->code == 415 && $compressed ) { # 415 Unsupported Media Type $nocompress{$endpoint} = 1; $envelope = Compress::Zlib::memGunzip($envelope); $http_request->headers->remove_header('Content-Encoding'); redo COMPRESS; # try again without compression } else { last; } } } $redirect{$endpoint} = $self->http_response->request->url if $self->http_response->previous && $self->http_response->previous->is_redirect; $self->code( $self->http_response->code ); $self->message( $self->http_response->message ); $self->is_success( $self->http_response->is_success ); $self->status( $self->http_response->status_line ); # Pull out any cookies from the response headers $self->{'_cookie_jar'}->extract_cookies( $self->http_response ) if $self->{'_cookie_jar'}; my $content = ( $self->http_response->content_encoding || '' ) =~ /\b$SOAP::Transport::HTTP::Client::COMPRESS\b/o && $self->options->{is_compress} ? Compress::Zlib::memGunzip( $self->http_response->content ) : ( $self->http_response->content_encoding || '' ) =~ /\S/ ? die "Can't understand returned Content-Encoding (@{[$self->http_response->content_encoding]})\n" : $self->http_response->content; return $self->http_response->content_type =~ m!^multipart/!i ? join( "\n", $self->http_response->headers_as_string, $content ) : $content; } # ====================================================================== package SOAP::Transport::HTTP::Server; use vars qw(@ISA $COMPRESS); @ISA = qw(SOAP::Server); use URI; $COMPRESS = 'deflate'; sub DESTROY { SOAP::Trace::objects('()') } sub setDebugLogger { my ($self,$logger) = @_; $self->{debug_logger} = $logger; } sub new { require LWP::UserAgent; my $self = shift; return $self if ref $self; # we're already an object my $class = $self; $self = $class->SUPER::new(@_); $self->{'_on_action'} = sub { ( my $action = shift || '' ) =~ s/^(\"?)(.*)\1$/$2/; die "SOAPAction shall match 'uri#method' if present (got '$action', expected '@{[join('#', @_)]}'\n" if $action && $action ne join( '#', @_ ) && $action ne join( '/', @_ ) && ( substr( $_[0], -1, 1 ) ne '/' || $action ne join( '', @_ ) ); }; SOAP::Trace::objects('()'); $self->setDebugLogger(\&SOAP::Trace::debug); return $self; } sub BEGIN { no strict 'refs'; for my $method (qw(request response)) { my $field = '_' . $method; *$method = sub { my $self = shift->new; @_ ? ( $self->{$field} = shift, return $self ) : return $self->{$field}; }; } } sub handle { my $self = shift->new; &{$self->{debug_logger}}($self->request->content); if ( $self->request->method eq 'POST' ) { $self->action( $self->request->header('SOAPAction') || undef ); } elsif ( $self->request->method eq 'M-POST' ) { return $self->response( HTTP::Response->new( 510, # NOT EXTENDED "Expected Mandatory header with $SOAP::Constants::NS_ENV as unique URI" ) ) if $self->request->header('Man') !~ /^"$SOAP::Constants::NS_ENV";\s*ns\s*=\s*(\d+)/; $self->action( $self->request->header("$1-SOAPAction") || undef ); } else { return $self->response( HTTP::Response->new(405) ) # METHOD NOT ALLOWED } my $compressed = ( $self->request->content_encoding || '' ) =~ /\b$COMPRESS\b/; $self->options->{is_compress} ||= $compressed && eval { require Compress::Zlib }; # signal error if content-encoding is 'deflate', but we don't want it OR # something else, so we don't understand it return $self->response( HTTP::Response->new(415) ) # UNSUPPORTED MEDIA TYPE if $compressed && !$self->options->{is_compress} || !$compressed && ( $self->request->content_encoding || '' ) =~ /\S/; my $content_type = $self->request->content_type || ''; # in some environments (PerlEx?) content_type could be empty, so allow it also # anyway it'll blow up inside ::Server::handle if something wrong with message # TBD: but what to do with MIME encoded messages in THOSE environments? return $self->make_fault( $SOAP::Constants::FAULT_CLIENT, "Content-Type must be 'text/xml,' 'multipart/*,' " . "'application/soap+xml,' 'or 'application/dime' instead of '$content_type'" ) if !$SOAP::Constants::DO_NOT_CHECK_CONTENT_TYPE && $content_type && $content_type ne 'application/soap+xml' && $content_type ne 'text/xml' && $content_type ne 'application/dime' && $content_type !~ m!^multipart/!; # TODO - Handle the Expect: 100-Continue HTTP/1.1 Header if ( defined( $self->request->header("Expect") ) && ( $self->request->header("Expect") eq "100-Continue" ) ) { } # TODO - this should query SOAP::Packager to see what types it supports, # I don't like how this is hardcoded here. my $content = $compressed ? Compress::Zlib::uncompress( $self->request->content ) : $self->request->content; my $response = $self->SUPER::handle( $self->request->content_type =~ m!^multipart/! ? join( "\n", $self->request->headers_as_string, $content ) : $content ) or return; &{$self->{debug_logger}}($response); $self->make_response( $SOAP::Constants::HTTP_ON_SUCCESS_CODE, $response ); } sub make_fault { my $self = shift; $self->make_response( $SOAP::Constants::HTTP_ON_FAULT_CODE => $self->SUPER::make_fault(@_) ); return; } sub make_response { my ( $self, $code, $response ) = @_; my $encoding = $1 if $response =~ /^<\?xml(?: version="1.0"| encoding="([^\"]+)")+\?>/; $response =~ s!(\?>)!$1! if $self->request->content_type eq 'multipart/form-data'; $self->options->{is_compress} ||= exists $self->options->{compress_threshold} && eval { require Compress::Zlib }; my $compressed = $self->options->{is_compress} && grep( /\b($COMPRESS|\*)\b/, $self->request->header('Accept-Encoding') ) && ( $self->options->{compress_threshold} || 0 ) < SOAP::Utils::bytelength $response; $response = Compress::Zlib::compress($response) if $compressed; # this next line does not look like a good test to see if something is multipart # perhaps a /content-type:.*multipart\//gi is a better regex? my ($is_multipart) = ( $response =~ /^content-type:.* boundary="([^\"]*)"/im ); $self->response( HTTP::Response->new( $code => undef, HTTP::Headers->new( 'SOAPServer' => $self->product_tokens, $compressed ? ( 'Content-Encoding' => $COMPRESS ) : (), 'Content-Type' => join( '; ', 'text/xml', !$SOAP::Constants::DO_NOT_USE_CHARSET && $encoding ? 'charset=' . lc($encoding) : () ), 'Content-Length' => SOAP::Utils::bytelength $response ), ( $] > 5.007 ) ? do { require Encode; Encode::encode( $encoding, $response ) } : $response, ) ); $self->response->headers->header( 'Content-Type' => 'Multipart/Related; type="text/xml"; start=""; boundary="' . $is_multipart . '"' ) if $is_multipart; } # ->VERSION leaks a scalar every call - no idea why. sub product_tokens { join '/', 'SOAP::Lite', 'Perl', $SOAP::Transport::HTTP::VERSION; } # ====================================================================== package SOAP::Transport::HTTP::CGI; use vars qw(@ISA); @ISA = qw(SOAP::Transport::HTTP::Server); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; return $self if ref $self; my $class = ref($self) || $self; $self = $class->SUPER::new(@_); SOAP::Trace::objects('()'); return $self; } sub make_response { my $self = shift; $self->SUPER::make_response(@_); } sub handle { my $self = shift->new; my $length = $ENV{'CONTENT_LENGTH'} || 0; # if the HTTP_TRANSFER_ENCODING env is defined, set $chunked if it's chunked* # else to false my $chunked = (defined $ENV{'HTTP_TRANSFER_ENCODING'} && $ENV{'HTTP_TRANSFER_ENCODING'} =~ /^chunked.*$/) || 0; my $content = q{}; if ($chunked) { my $buffer; binmode(STDIN); while ( read( STDIN, my $buffer, 1024 ) ) { $content .= $buffer; } $length = length($content); } if ( !$length ) { $self->response( HTTP::Response->new(411) ) # LENGTH REQUIRED } elsif ( defined $SOAP::Constants::MAX_CONTENT_SIZE && $length > $SOAP::Constants::MAX_CONTENT_SIZE ) { $self->response( HTTP::Response->new(413) ) # REQUEST ENTITY TOO LARGE } else { if ( exists $ENV{EXPECT} && $ENV{EXPECT} =~ /\b100-Continue\b/i ) { print "HTTP/1.1 100 Continue\r\n\r\n"; } #my $content = q{}; if ( !$chunked ) { my $buffer; binmode(STDIN); if ( defined $ENV{'MOD_PERL'} ) { while ( read( STDIN, $buffer, $length ) ) { $content .= $buffer; last if ( length($content) >= $length ); } } else { while ( sysread( STDIN, $buffer, $length ) ) { $content .= $buffer; last if ( length($content) >= $length ); } } } $self->request( HTTP::Request->new( $ENV{'REQUEST_METHOD'} || '' => $ENV{'SCRIPT_NAME'}, HTTP::Headers->new( map { ( /^HTTP_(.+)/i ? ( $1 =~ m/SOAPACTION/ ) ? ('SOAPAction') : ($1) : $_ ) => $ENV{$_} } keys %ENV ), $content, ) ); $self->SUPER::handle; } # imitate nph- cgi for IIS (pointed by Murray Nesbitt) my $status = defined( $ENV{'SERVER_SOFTWARE'} ) && $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0' : 'Status:'; my $code = $self->response->code; binmode(STDOUT); print STDOUT "$status $code ", HTTP::Status::status_message($code), "\015\012", $self->response->headers_as_string("\015\012"), "\015\012", $self->response->content; } # ====================================================================== package SOAP::Transport::HTTP::Daemon; use Carp (); use vars qw($AUTOLOAD @ISA); @ISA = qw(SOAP::Transport::HTTP::Server); sub DESTROY { SOAP::Trace::objects('()') } #sub new { require HTTP::Daemon; sub new { my $self = shift; return $self if ( ref $self ); my $class = $self; my ( @params, @methods ); while (@_) { $class->can( $_[0] ) ? push( @methods, shift() => shift ) : push( @params, shift ); } $self = $class->SUPER::new; # Added in 0.65 - Thanks to Nils Sowen # use SSL if there is any parameter with SSL_* in the name $self->SSL(1) if !$self->SSL && grep /^SSL_/, @params; my $http_daemon = $self->http_daemon_class; eval "require $http_daemon" or Carp::croak $@ unless $http_daemon->can('new'); $self->{_daemon} = $http_daemon->new(@params) or Carp::croak "Can't create daemon: $!"; # End SSL patch $self->myuri( URI->new( $self->url )->canonical->as_string ); while (@methods) { my ( $method, $params ) = splice( @methods, 0, 2 ); $self->$method( ref $params eq 'ARRAY' ? @$params : $params ); } SOAP::Trace::objects('()'); return $self; } sub SSL { my $self = shift->new; if (@_) { $self->{_SSL} = shift; return $self; } return $self->{_SSL}; } sub http_daemon_class { shift->SSL ? 'HTTP::Daemon::SSL' : 'HTTP::Daemon' } sub AUTOLOAD { my $method = substr( $AUTOLOAD, rindex( $AUTOLOAD, '::' ) + 2 ); return if $method eq 'DESTROY'; no strict 'refs'; *$AUTOLOAD = sub { shift->{_daemon}->$method(@_) }; goto &$AUTOLOAD; } sub handle { my $self = shift->new; while ( my $c = $self->accept ) { while ( my $r = $c->get_request ) { $self->request($r); $self->SUPER::handle; eval { local $SIG{PIPE} = sub {die "SIGPIPE"}; $c->send_response( $self->response ); }; if ($@ && $@ !~ /^SIGPIPE/) { die $@; } } # replaced ->close, thanks to Sean Meisner # shutdown() doesn't work on AIX. close() is used in this case. Thanks to Jos Clijmans $c->can('shutdown') ? $c->shutdown(2) : $c->close(); $c->close; } } # ====================================================================== package SOAP::Transport::HTTP::Apache; use vars qw(@ISA); @ISA = qw(SOAP::Transport::HTTP::Server); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; unless ( ref $self ) { my $class = ref($self) || $self; $self = $class->SUPER::new(@_); SOAP::Trace::objects('()'); } # Added this code thanks to JT Justman # This code improves and provides more robust support for # multiple versions of Apache and mod_perl # mod_perl 2.0 if ( defined $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} >= 2 ) { require Apache2::RequestRec; require Apache2::RequestIO; require Apache2::Const; require Apache2::RequestUtil; require APR::Table; Apache2::Const->import( -compile => 'OK' ); Apache2::Const->import( -compile => 'HTTP_BAD_REQUEST' ); $self->{'MOD_PERL_VERSION'} = 2; $self->{OK} = &Apache2::Const::OK; } else { # mod_perl 1.xx die "Could not find or load mod_perl" unless ( eval "require mod_perl" ); die "Could not detect your version of mod_perl" if ( !defined($mod_perl::VERSION) ); if ( $mod_perl::VERSION < 1.99 ) { require Apache; require Apache::Constants; Apache::Constants->import('OK'); Apache::Constants->import('HTTP_BAD_REQUEST'); $self->{'MOD_PERL_VERSION'} = 1; $self->{OK} = &Apache::Constants::OK; } else { require Apache::RequestRec; require Apache::RequestIO; require Apache::Const; Apache::Const->import( -compile => 'OK' ); Apache::Const->import( -compile => 'HTTP_BAD_REQUEST' ); $self->{'MOD_PERL_VERSION'} = 1.99; $self->{OK} = &Apache::OK; } } return $self; } sub handler { my $self = shift->new; my $r = shift; # Begin patch from JT Justman if ( !$r ) { if ( $self->{'MOD_PERL_VERSION'} < 2 ) { $r = Apache->request(); } else { $r = Apache2::RequestUtil->request(); } } my $cont_len; if ( $self->{'MOD_PERL_VERSION'} < 2 ) { $cont_len = $r->header_in('Content-length'); } else { $cont_len = $r->headers_in->get('Content-length'); } # End patch from JT Justman my $content = ""; if ( $cont_len > 0 ) { my $buf; # attempt to slurp in the content at once... $content .= $buf while ( $r->read( $buf, $cont_len ) > 0 ); } else { # throw appropriate error for mod_perl 2 return Apache2::Const::HTTP_BAD_REQUEST() if ( $self->{'MOD_PERL_VERSION'} >= 2 ); return Apache::Constants::BAD_REQUEST(); } my %headers; if ( $self->{'MOD_PERL_VERSION'} < 2 ) { %headers = $r->headers_in; # Apache::Table structure } else { %headers = %{ $r->headers_in }; # Apache2::RequestRec structure } $self->request( HTTP::Request->new( $r->method() => $r->uri, HTTP::Headers->new( %headers ), $content ) ); $self->SUPER::handle; # we will specify status manually for Apache, because # if we do it as it has to be done, returning SERVER_ERROR, # Apache will modify our content_type to 'text/html; ....' # which is not what we want. # will emulate normal response, but with custom status code # which could also be 500. if ($self->{'MOD_PERL_VERSION'} < 2 ) { $r->status( $self->response->code ); } else { $r->status_line($self->response->code); } # Begin JT Justman patch if ( $self->{'MOD_PERL_VERSION'} > 1 ) { $self->response->headers->scan(sub { $r->headers_out->add(@_) }); $r->content_type( join '; ', $self->response->content_type ); } else { $self->response->headers->scan( sub { $r->header_out(@_) } ); $r->send_http_header( join '; ', $self->response->content_type ); } $r->print( $self->response->content ); return $self->{OK}; # End JT Justman patch } sub configure { my $self = shift->new; my $config = shift->dir_config; for (%$config) { $config->{$_} =~ /=>/ ? $self->$_( {split /\s*(?:=>|,)\s*/, $config->{$_}} ) : ref $self->$_() ? () # hm, nothing can be done here : $self->$_( split /\s+|\s*,\s*/, $config->{$_} ) if $self->can($_); } return $self; } { # just create alias sub handle; *handle = \&handler } # ====================================================================== # # Copyright (C) 2001 Single Source oy (marko.asplund@kronodoc.fi) # a FastCGI transport class for SOAP::Lite. # Updated formatting and removed dead code in new() in 2008 # by Martin Kutter # # ====================================================================== package SOAP::Transport::HTTP::FCGI; use vars qw(@ISA); @ISA = qw(SOAP::Transport::HTTP::CGI); sub DESTROY { SOAP::Trace::objects('()') } sub new { require FCGI; Exporter::require_version( 'FCGI' => 0.47 ) ; # requires thread-safe interface my $class = shift; return $class if ref $class; my $self = $class->SUPER::new(@_); $self->{_fcgirq} = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR ); SOAP::Trace::objects('()'); return $self; } sub handle { my $self = shift->new; my ( $r1, $r2 ); my $fcgirq = $self->{_fcgirq}; while ( ( $r1 = $fcgirq->Accept() ) >= 0 ) { $r2 = $self->SUPER::handle; } return undef; } # ====================================================================== 1; SOAP-Lite-1.19/lib/SOAP/Transport/IO.pm000644 000770 000024 00000003225 12567356463 017536 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Transport::IO; use strict; our $VERSION = 1.17; use IO::File; use SOAP::Lite; # ====================================================================== package SOAP::Transport::IO::Server; use strict; use Carp (); use vars qw(@ISA); @ISA = qw(SOAP::Server); sub new { my $class = shift; return $class if ref $class; my $self = $class->SUPER::new(@_); return $self; } sub in { my $self = shift; $self = $self->new() if not ref $self; return $self->{ _in } if not @_; my $file = shift; $self->{_in} = (defined $file && !ref $file && !defined fileno($file)) ? IO::File->new($file, 'r') : $file; return $self; } sub out { my $self = shift; $self = $self->new() if not ref $self; return $self->{ _out } if not @_; my $file = shift; $self->{_out} = (defined $file && !ref $file && !defined fileno($file)) ? IO::File->new($file, 'w') : $file; return $self; } sub handle { my $self = shift->new; $self->in(*STDIN)->out(*STDOUT) unless defined $self->in; my $in = $self->in; my $out = $self->out; my $result = $self->SUPER::handle(join '', <$in>); no strict 'refs'; print {$out} $result if defined $out; return; } # ====================================================================== 1; __END__ SOAP-Lite-1.19/lib/SOAP/Transport/LOCAL.pm000644 000770 000024 00000003121 12567356463 020054 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Transport::LOCAL; use strict; our $VERSION = 1.17; # ====================================================================== package SOAP::Transport::LOCAL::Client; use SOAP::Lite; use vars qw(@ISA); our @ISA = qw(SOAP::Client SOAP::Server); sub new { my $class = shift; return $class if ref $class; my @method_from; while (@_) { if ($class->can($_[0])) { push(@method_from, shift() => shift); } else { # ignore unknown arguments shift; } } my $self = $class->SUPER::new(); $self->is_success(1); # it's difficult to fail in this module $self->dispatch_to(@INC); while (@method_from) { my($method, $param_ref) = splice(@method_from,0,2); $self->$method(ref $param_ref eq 'ARRAY' ? @$param_ref : $param_ref) } return $self; } sub send_receive { my ($self, %parameters) = @_; my ($envelope, $endpoint, $action) = @parameters{qw(envelope endpoint action)}; SOAP::Trace::debug($envelope); my $response = $self->SUPER::handle($envelope); SOAP::Trace::debug($response); return $response; } # ====================================================================== 1; __END__ SOAP-Lite-1.19/lib/SOAP/Transport/LOOPBACK.pm000644 000770 000024 00000003307 12567356463 020422 0ustar00phredstaff000000 000000 # ====================================================================== # # 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 Emartin.kutter fen-net.deE =cut SOAP-Lite-1.19/lib/SOAP/Transport/MAILTO.pm000644 000770 000024 00000005044 12567356463 020215 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Transport::MAILTO; use strict; our $VERSION = 1.17; use MIME::Lite; use URI; # ====================================================================== package SOAP::Transport::MAILTO::Client; use SOAP::Lite; use vars qw(@ISA); @ISA = qw(SOAP::Client); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $class = shift; return $class if ref $class; my(@params, @methods); while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) } my $self = bless {@params} => $class; while (@methods) { my($method, $params) = splice(@methods,0,2); $self->$method(ref $params eq 'ARRAY' ? @$params : $params) } SOAP::Trace::objects('()'); return $self; } sub send_receive { my($self, %parameters) = @_; my($envelope, $endpoint, $action) = @parameters{qw(envelope endpoint action)}; $endpoint ||= $self->endpoint; my $uri = URI->new($endpoint); %parameters = (%$self, map {URI::Escape::uri_unescape($_)} map {split/=/,$_,2} split /[&;]/, $uri->query || ''); my $msg = MIME::Lite->new( To => $uri->to, Type => 'text/xml', Encoding => $parameters{Encoding} || 'base64', Data => $envelope, $parameters{From} ? (From => $parameters{From}) : (), $parameters{'Reply-To'} ? ('Reply-To' => $parameters{'Reply-To'}) : (), $parameters{Subject} ? (Subject => $parameters{Subject}) : (), ); $msg->replace('X-Mailer' => join '/', 'SOAP::Lite', 'Perl', SOAP::Transport::MAILTO->VERSION); $msg->add(SOAPAction => $action); SOAP::Trace::transport($msg); SOAP::Trace::debug($msg->as_string); MIME::Lite->send(map {exists $parameters{$_} ? ($_ => $parameters{$_}) : ()} 'smtp', 'sendmail'); eval { local $SIG{__DIE__}; $MIME::Lite::AUTO_CC = 0; $msg->send }; (my $code = $@) =~ s/ at .*\n//; $self->code($code); $self->message($code); $self->is_success(!defined $code || $code eq ''); $self->status($code); return; } # ====================================================================== 1; __END__ SOAP-Lite-1.19/lib/SOAP/Transport/POP3.pm000644 000770 000024 00000006775 12567356463 017765 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Transport::POP3; use strict; our $VERSION = 1.17; use Net::POP3; use URI; # ====================================================================== package SOAP::Transport::POP3::Server; use Carp (); use vars qw(@ISA $AUTOLOAD); @ISA = qw(SOAP::Server); sub DESTROY { my $self = shift; $self->quit if $self->{_pop3server} } sub new { my $class = shift; return $class if ref $class; my $address = shift; Carp::carp "URLs without 'pop://' scheme are deprecated. Still continue" if $address =~ s!^(pop://)?!pop://!i && !$1; my $server = URI->new($address); my $self = $class->SUPER::new(@_); $self->{_pop3server} = Net::POP3->new($server->host_port) or Carp::croak "Can't connect to '@{[$server->host_port]}': $!"; my $method = ! $server->auth || $server->auth eq '*' ? 'login' : $server->auth eq '+APOP' ? 'apop' : Carp::croak "Unsupported authentication scheme '@{[$server->auth]}'"; $self->{_pop3server}->$method( split m{:}, $server->user() ) or Carp::croak "Can't authenticate to '@{[$server->host_port]}' with '$method' method" if defined $server->user; return $self; } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY'; no strict 'refs'; *$AUTOLOAD = sub { shift->{_pop3server}->$method(@_) }; goto &$AUTOLOAD; } sub handle { my $self = shift->new; my $messages = $self->list or return; # fixes [ 1.17700 ] POP3 Processes Messages Out of Order foreach my $msgid (sort { $a <=> $b } (keys(%{$messages}) ) ) { # foreach my $msgid (keys %$messages) { $self->SUPER::handle(join '', @{$self->get($msgid)}); } continue { $self->delete($msgid); } return scalar keys %$messages; } sub make_fault { return } # ====================================================================== 1; __END__ =head1 NAME SOAP::Transport::POP3 - Server side POP3 support for SOAP::Lite =head1 SYNOPSIS use SOAP::Transport::POP3; my $server = SOAP::Transport::POP3::Server -> new('pop://pop.mail.server') # if you want to have all in one place # -> new('pop://user:password@pop.mail.server') # or, if you have server that supports MD5 protected passwords # -> new('pop://user:password;AUTH=+APOP@pop.mail.server') # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; # you don't need to use next line if you specified your password in new() $server->login('user' => 'password') or die "Can't authenticate to POP3 server\n"; # handle will return number of processed mails # you can organize loop if you want do { $server->handle } while sleep 10; # you may also call $server->quit explicitly to purge deleted messages =head1 DESCRIPTION =head1 COPYRIGHT Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Paul Kulchenko (paulclinger@yahoo.com) =cut SOAP-Lite-1.19/lib/SOAP/Transport/TCP.pm000644 000770 000024 00000022711 12567356463 017656 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # $Id: TCP.pm 384 2011-08-16 17:08:08Z kutterma $ # # ====================================================================== package SOAP::Transport::TCP; use strict; our $VERSION = 1.17; use URI; use IO::Socket; use IO::Select; use IO::SessionData; # ====================================================================== package URI::tcp; # ok, let's do 'tcp://' scheme our $VERSION = 0.715; require URI::_server; @URI::tcp::ISA=qw(URI::_server); # ====================================================================== package SOAP::Transport::TCP::Client; our $VERSION = 0.715; use vars qw(@ISA); require SOAP::Lite; @ISA = qw(SOAP::Client); sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; unless (ref $self) { my $class = ref($self) || $self; my(@params, @methods); while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) } $self = bless {@params} => $class; while (@methods) { my($method, $params) = splice(@methods,0,2); $self->$method(ref $params eq 'ARRAY' ? @$params : $params) } # use SSL if there is any parameter with SSL_* in the name $self->SSL(1) if !$self->SSL && grep /^SSL_/, keys %$self; SOAP::Trace::objects('()'); } return $self; } sub SSL { my $self = shift->new; @_ ? ($self->{_SSL} = shift, return $self) : return $self->{_SSL}; } sub io_socket_class { shift->SSL ? 'IO::Socket::SSL' : 'IO::Socket::INET' } sub syswrite { my($self, $sock, $data) = @_; my $timeout = $sock->timeout; my $select = IO::Select->new($sock); my $len = length $data; while (length $data > 0) { return unless $select->can_write($timeout); local $SIG{PIPE} = 'IGNORE'; # added length() to make it work on Mac. Thanks to Robin Fuller my $wc = syswrite($sock, $data, length($data)); if (defined $wc) { substr($data, 0, $wc) = ''; } elsif (!IO::SessionData::WOULDBLOCK($!)) { return; } } return $len; } sub sysread { my($self, $sock) = @_; my $timeout = $sock->timeout; my $select = IO::Select->new($sock); my $result = ''; my $data; while (1) { return unless $select->can_read($timeout); my $rc = sysread($sock, $data, 4096); if ($rc) { $result .= $data; } elsif (defined $rc) { return $result; } elsif (!IO::SessionData::WOULDBLOCK($!)) { return; } } } sub send_receive { my($self, %parameters) = @_; my($envelope, $endpoint, $action) = @parameters{qw(envelope endpoint action)}; $endpoint ||= $self->endpoint; warn "URLs with 'tcp:' scheme are deprecated. Use 'tcp://'. Still continue\n" if $endpoint =~ s!^tcp:(//)?!tcp://!i && !$1; my $uri = URI->new($endpoint); local($^W, $@, $!); my $socket = $self->io_socket_class; eval "require $socket" or Carp::croak $@ unless UNIVERSAL::can($socket => 'new'); my $sock = $socket->new ( PeerAddr => $uri->host, PeerPort => $uri->port, Proto => $uri->scheme, %$self ); SOAP::Trace::debug($envelope); # bytelength hack. See SOAP::Transport::HTTP.pm for details. my $bytelength = SOAP::Utils::bytelength($envelope); $envelope = pack('C0A*', $envelope) if !$SOAP::Constants::DO_NOT_USE_LWP_LENGTH_HACK && length($envelope) != $bytelength; my $result; if ($sock) { $sock->blocking(0); $self->syswrite($sock, $envelope) and $sock->shutdown(1) and # stop writing $result = $self->sysread($sock); } SOAP::Trace::debug($result); my $code = $@ || $!; $self->code($code); $self->message($code); $self->is_success(!defined $code || $code eq ''); $self->status($code); return $result; } # ====================================================================== package SOAP::Transport::TCP::Server; use IO::SessionSet; use Carp (); use vars qw($AUTOLOAD @ISA); @ISA = qw(SOAP::Server); our $VERSION = 0.715; sub DESTROY { SOAP::Trace::objects('()') } sub new { my $self = shift; unless (ref $self) { my $class = ref($self) || $self; my(@params, @methods); while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) } $self = $class->SUPER::new(@methods); # use SSL if there is any parameter with SSL_* in the name $self->SSL(1) if !$self->SSL && grep /^SSL_/, @params; my $socket = $self->io_socket_class; eval "require $socket" or Carp::croak $@ unless UNIVERSAL::can($socket => 'new'); $self->{_socket} = $socket->new(Proto => 'tcp', @params) or Carp::croak "Can't open socket: $!"; SOAP::Trace::objects('()'); } return $self; } sub SSL { my $self = shift->new; @_ ? ($self->{_SSL} = shift, return $self) : return $self->{_SSL}; } sub io_socket_class { shift->SSL ? 'IO::Socket::SSL' : 'IO::Socket::INET' } sub AUTOLOAD { my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2); return if $method eq 'DESTROY'; no strict 'refs'; *$AUTOLOAD = sub { shift->{_socket}->$method(@_) }; goto &$AUTOLOAD; } sub handle { my $self = shift->new; my $sock = $self->{_socket}; my $session_set = IO::SessionSet->new($sock); my %data; while (1) { my @ready = $session_set->wait($sock->timeout); for my $session (grep { defined } @ready) { my $data; if (my $rc = $session->read($data, 4096)) { $data{$session} .= $data if $rc > 0; } else { $session->write($self->SUPER::handle(delete $data{$session})); $session->close; } } } } # ====================================================================== 1; __END__ =head1 NAME SOAP::Transport::TCP - TCP Transport Support for SOAP::Lite =head2 SOAP::Transport::TCP The classes provided by this module implement direct TCP/IP communications methods for both clients and servers. The connections don't use HTTP or any other higher-level protocol. These classes are selected when the client or server object being created uses an endpoint URI that starts with tcp://. Both client and server classes support using Secure Socket Layer if it is available. If any of the parameters to a new method from either of the classes begins with SSL_ (such as SSL_server in place of Server), the class attempts to load the IO::Socket::SSL package and use it to create socket objects. Both of the following classes catch methods that are intended for the socket objects and pass them along, allowing calls such as $client->accept( ) without including the socket class in the inheritance tree. =head3 SOAP::Transport::TCP::Client Inherits from: L. The TCP client class defines only two relevant methods beyond new and send_receive. These methods are: =over =item SSL(I) if ($client->SSL) # Execute only if in SSL mode Reflects the attribute that denotes whether the client object is using SSL sockets for communications. =item io_socket_class ($client->io_socket_class)->new(%options); Returns the name of the class to use when creating socket objects for internal use in communications. As implemented, it returns one of IO::Socket::INET or IO::Socket::SSL, depending on the return value of the previous SSL method. =back If an application creates a subclass that inherits from this client class, either method is a likely target for overloading. The new method behaves identically to most other classes, except that it detects the presence of SSL-targeted values in the parameter list and sets the SSL method appropriately if they are present. The send_receive method creates a socket of the appropriate class and connects to the configured endpoint. It then sets the socket to nonblocking I/O, sends the message, shuts down the client end of the connection (preventing further writing), and reads the response back from the server. The socket object is discarded after the response and appropriate status codes are set on the client object. =head3 SOAP::Transport::TCP::Server Inherits from: L. The server class also defines the same two additional methods as in the client class: =over =item SSL(I) if ($client->SSL) # Execute only if in SSL mode Reflects the attribute that denotes whether the client object is using SSL sockets for communications. =item io_socket_class ($client->io_socket_class)->new(%options); Returns the name of the class to use when creating socket objects for internal use in communications. As implemented, it returns one of IO::Socket::INET or IO::Socket::SSL, depending on the return value of the previous SSL method. The new method also manages the automatic selection of SSL in the same fashion as the client class does. The handle method in this server implementation isn't designed to be called once with each new request. Rather, it is called with no arguments, at which time it enters into an infinite loop of waiting for a connection, reading the request, routing the request and sending back the serialized response. This continues until the process itself is interrupted by an untrapped signal or similar means. =back =head1 COPYRIGHT Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Written by Paul Kulchenko. Split from SOAP::Lite and SOAP-Transport-TCP packaging by Martin Kutter =cutSOAP-Lite-1.19/lib/SOAP/Lite/Deserializer/000755 000770 000024 00000000000 12567356463 020212 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/lib/SOAP/Lite/Packager.pm000644 000770 000024 00000042271 12567356463 017651 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package SOAP::Lite::Packager; use strict; use vars; use vars qw($SUPPORTED_TYPES); $SUPPORTED_TYPES = { }; sub BEGIN { no strict 'refs'; for my $method ( qw(parser headers_http persist_parts) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my($class) = shift; my(%params) = @_; bless { "_parts" => [ ], "_parser" => undef, "_persist_parts" => 0, }, $class; } sub is_supported_part { my $self = shift; return $SUPPORTED_TYPES->{ref $_[0]}; } sub parts { my $self = shift; if (@_) { $self->{'_parts'} = shift; } return $self->{'_parts'}; } # This is a static method that helps find the right Packager sub find_packager { # TODO - Input: # * the mimetype of the data to be decoded raw data that needs # * the data to be decoded # Returns: # * the proper SOAP::Lite::Packager instance } sub push_part { my $self = shift; my ($part) = @_; push @{$self->{'_parts'}}, $part; } sub package { # do nothing die "SOAP::Lite::Packager::package() must be implemented"; } sub unpackage { my $self = shift; $self->{'_parts'} = [] if !$self->persist_parts; # experimental } # ====================================================================== package SOAP::Lite::Packager::MIME; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Lite::Packager); sub BEGIN { no strict 'refs'; for my $method ( qw(transfer_encoding env_id env_location) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my ($classname) = @_; my $self = SOAP::Lite::Packager::new(@_); $self->{'_content_encoding'} = '8bit'; $self->{'_env_id'} = ''; $self->{'_env_location'} = '/main_envelope'; bless $self, $classname; $SOAP::Lite::Packager::SUPPORTED_TYPES->{"MIME::Entity"} = 1; return $self; } sub initialize_parser { my $self = shift; eval "require MIME::Parser;"; die "Could not find MIME::Parser - is MIME::Tools installed? Aborting." if $@; $self->{'_parser'} = MIME::Parser->new; $self->{'_parser'}->output_to_core('ALL'); $self->{'_parser'}->tmp_to_core(1); $self->{'_parser'}->ignore_errors(1); $self->{'_parser'}->extract_nested_messages(0); } sub generate_random_string { my ($self,$len) = @_; my @chars=('a'..'z','A'..'Z','0'..'9','_'); my $random_string; foreach (1..$len) { $random_string .= $chars[rand @chars]; } return $random_string; } sub get_multipart_id { my ($id) = shift; ($id || '') =~ /^]+)>?$/; $1 || ''; } sub package { my $self = shift; my ($envelope,$context) = @_; return $envelope if (!$self->parts); # if there are no parts, # then there is nothing to do require MIME::Entity; local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n"; my $top = MIME::Entity->build('Type' => "Multipart/Related"); my $soapversion = defined($context) ? $context->soapversion : '1.1'; $top->attach('Type' => $soapversion == 1.1 ? "text/xml" : "application/soap+xml", 'Content-Transfer-Encoding' => $self->transfer_encoding(), 'Content-Location' => $self->env_location(), 'Content-ID' => $self->env_id(), 'Data' => $envelope ); # consume the attachments that come in as input by 'shift'ing no strict 'refs'; while (my $part = shift(@{$self->parts})) { $top->add_part($part); } # determine MIME boundary my $boundary = $top->head->multipart_boundary; $self->headers_http({ 'Content-Type' => 'Multipart/Related; type="text/xml"; start=""; boundary="'.$boundary.'"'}); return $top->stringify_body; } sub unpackage { my $self = shift; my ($raw_input,$context) = @_; $self->SUPER::unpackage(); # Parse the raw input into a MIME::Entity structure. # - fail if the raw_input is not MIME formatted $self->initialize_parser() if !defined($self->parser); my $entity = eval { $self->parser->parse_data($raw_input) } or die "Something wrong with MIME message: @{[$@ || $self->parser->last_error]}\n"; my $env = undef; # major memory bloat below! TODO - fix! if (lc($entity->head->mime_type) eq 'multipart/form-data') { $env = $self->process_form_data($entity); } elsif (lc($entity->head->mime_type) eq 'multipart/related') { $env = $self->process_related($entity); } elsif (lc($entity->head->mime_type) eq 'text/xml') { # I don't think this ever gets called. # warn "I am somewhere in the SOAP::Lite::Packager::MIME code I didn't know I would be in!"; $env = $entity->bodyhandle->as_string; } else { die "Can't handle MIME messsage with specified type (@{[$entity->head->mime_type]})\n"; } # return the envelope if ($env) { return $env; } elsif ($entity->bodyhandle->as_string) { return $entity->bodyhandle->as_string; } else { die "No content in MIME message\n"; } } sub process_form_data { my ($self, $entity) = @_; my $env = undef; foreach my $part ($entity->parts()) { my $name = $part->head()->mime_attr('content-disposition.name'); $name eq 'payload' ? $env = $part->bodyhandle()->as_string() : $self->push_part($part); } return $env; } sub process_related { my $self = shift; my ($entity) = @_; die "Multipart MIME messages MUST declare Multipart/Related content-type" if ($entity->head->mime_attr('content-type') !~ /^multipart\/related/i); # As it turns out, the Content-ID and start parameters are optional # according to the MIME and SOAP specs. In the event that the head cannot # be found, the head/root entity is used as a starting point. my $start = get_multipart_id($entity->head->mime_attr('content-type.start')); if (!defined($start) || $start eq "") { $start = $self->generate_random_string(10); $entity->parts(0)->head->add('content-id',$start); } my $location = $entity->head->mime_attr('content-location') || 'thismessage:/'; my $env; foreach my $part ($entity->parts) { next if !UNIVERSAL::isa($part => "MIME::Entity"); # Weird, the following use of head->get(SCALAR[,INDEX]) doesn't work as # expected. Work around is to eliminate the INDEX. my $pid = get_multipart_id($part->head->mime_attr('content-id')); # If Content-ID is not supplied, then generate a random one (HACK - because # MIME::Entity does not do this as it should... content-id is required # according to MIME specification) $pid = $self->generate_random_string(10) if $pid eq ''; my $type = $part->head->mime_type; # If a Content-Location header cannot be found, this will look for an # alternative in the following MIME Header attributes my $plocation = $part->head->get('content-location') || $part->head->mime_attr('Content-Disposition.filename') || $part->head->mime_attr('Content-Type.name'); if ($start && $pid eq $start) { $env = $part->bodyhandle->as_string; } else { $self->push_part($part) if (defined($part->bodyhandle)); } } return $env; } # ====================================================================== package SOAP::Lite::Packager::DIME; use strict; use vars qw(@ISA); @ISA = qw(SOAP::Lite::Packager); sub BEGIN { no strict 'refs'; for my $method ( qw(foo) ) { my $field = '_' . $method; *$method = sub { my $self = shift; if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } sub new { my ($classname) = @_; my $self = SOAP::Lite::Packager::new(@_); bless $self, $classname; $SOAP::Lite::Packager::SUPPORTED_TYPES->{"DIME::Payload"} = 1; return $self; } sub initialize_parser { my $self = shift; print STDERR "Initializing parser\n"; eval "require DIME::Parser;"; die "Could not find DIME::Parser - is DIME::Tools installed? Aborting." if $@; $self->{'_parser'} = DIME::Parser->new; } sub package { my $self = shift; my ($envelope,$context) = @_; return $envelope if (!$self->parts); # if there are no parts, # then there is nothing to do require DIME::Message; require DIME::Payload; my $message = DIME::Message->new; my $top = DIME::Payload->new; my $soapversion = defined($context) ? $context->soapversion : '1.1'; $top->attach('MIMEType' => $soapversion == 1.1 ? "http://schemas.xmlsoap.org/soap/envelope/" : "application/soap+xml", 'Data' => $envelope ); $message->add_payload($top); # consume the attachments that come in as input by 'shift'ing no strict 'refs'; while (my $part = shift(@{$self->parts})) { die "You are only allowed to add parts of type DIME::Payload to a DIME::Message" if (!$part->isa('DIME::Payload')); # print STDERR "Adding payload to DIME message: ".ref($part)."\n"; $message->add_payload($part); # print STDERR "Payload's payload is: ".${$part->print_content_data}."\n"; } $self->headers_http({ 'Content-Type' => 'application/dime' }); return $message->print_data; } sub unpackage { my $self = shift; my ($raw_input,$context) = @_; $self->SUPER::unpackage(); # Parse the raw input into a DIME::Message structure. # - fail if the raw_input is not DIME formatted print STDERR "raw_data: $raw_input\n"; $self->initialize_parser() if !defined($self->parser); my $message = eval { $self->parser->parse_data(\$raw_input) } or die "Something wrong with DIME message: @{[$@]}\n"; # The first payload is always the SOAP Message # TODO - Error check my @payloads = @{$message->{'_PAYLOADS'}}; my $env = shift(@payloads); my $env_str = $env->print_content_data; print STDERR "Received this envelope: ".$env_str."\n"; while (my $p = shift(@payloads)) { print STDERR "Adding part to Packager\n"; $self->push_part($p); } return $env_str; } 1; __END__ =pod =head1 NAME SOAP::Lite::Packager - this class is an abstract class which allows for multiple types of packaging agents such as MIME and DIME. =head1 DESCRIPTION The SOAP::Lite::Packager class is responsible for managing a set of "parts." Parts are additional pieces of information, additional documents, or virtually anything that needs to be associated with the SOAP Envelope/payload. The packager then will take these parts and encode/decode or "package"/"unpackage" them as they come and go over the wire. =head1 METHODS =over =item new Instantiates a new instance of a SOAP::Lite::Packager. =item parts Contains an array of parts. The contents of this array and their types are completely dependent upon the Packager being used. For example, when using MIME, the content of this array is MIME::Entity's. =item push_part Adds a part to set of parts managed by the current instance of SOAP::Lite::Packager. =item parser Returns the parser used to parse attachments out of a data stream. =item headers_http This is a hook into the HTTP layer. It provides a way for a packager to add and/or modify HTTP headers in a request/response. For example, most packaging layers will need to override the Content-Type (e.g. multipart/related, or application/dime). =back =head1 ABSTRACT METHODS If you wish to implement your own SOAP::Lite::Packager, then the methods below must be implemented by you according to the prescribed input and output requirements. =over =item package() The C subroutine takes as input the SOAP envelope in string/SCALAR form. This will serve as the content of the root part. The packager then encapsulates the envelope with the parts contained within C and returns the properly encapsulated envelope in string/SCALAR form. =item unpackage() The C subroutines takes as input raw data that needs to be parsed into a set of parts. It is responsible for extracting the envelope from the input, and populating C with an ARRAY of parts extracted from the input. It then returns the SOAP Envelope in string/SCALAR form so that SOAP::Lite can parse it. =back =head1 SUPPORTED PACKAGING FORMATS =head2 SOAP::Lite::Packager::MIME C utilizes L to provides the ability to send and receive Multipart/Related and Multipart/Form-Data formatted requests and responses. =head3 MIME METHODS The following methods are used when composing a MIME formatted message. =over =item transfer_encoding The value of the root part's Content-Transfer-Encoding MIME Header. Default is: 8bit. =item env_id The value of the root part's Content-Id MIME Header. Default is: . =item env_location The value of the root part's Content-Location MIME Header. Default is: /main_envelope. =item env_type The value of the root part's Content-Type MIME Header. Default is: text/xml. =back =head3 OPTIMIZING THE MIME PARSER The use of attachments can often result in a heavy drain on system resources depending upon how your MIME parser is configured. For example, you can instruct the parser to store attachments in memory, or to use temp files. Using one of the other can affect performance, disk utilization, and/or reliability. Therefore you should consult the following URL for optimization techniques and trade-offs: http://search.cpan.org/dist/MIME-tools/lib/MIME/Parser.pm#OPTIMIZING_YOUR_PARSER To modify the parser's configuration options consult the following code sample, which incidentally shows how to minimize memory utilization: my $packager = SOAP::Lite::Packager::MIME->new; # $packager->parser->decode_headers(1); # no difference # $packager->parser->extract_nested_messages(1); # no difference $packager->parser->output_to_core(0); # much less memory $packager->parser->tmp_to_core(0); # much less memory $packager->parser->tmp_recycling(0); # promotes faster garbage collection $packager->parser->use_inner_files(1); # no difference my $client = SOAP::Lite->uri($NS)->proxy($URL)->packager($packager); $client->someMethod(); =head3 CLIENT SIDE EXAMPLE The following code sample shows how to use attachments within the context of a SOAP::Lite client. #!/usr/bin/perl use SOAP::Lite; use MIME::Entity; my $ent = build MIME::Entity Type => "text/plain", Path => "attachment.txt", Filename => "attachment.txt", Disposition => "attachment"; $NS = "urn:Majordojo:TemperatureService"; $HOST = "http://localhost/cgi-bin/soaplite.cgi"; my $client = SOAP::Lite ->packager(SOAP::Lite::Packager::MIME->new) ->parts([ $ent ]) ->uri($NS) ->proxy($HOST); $response = $client->c2f(SOAP::Data->name("temperature" => '100')); print $response->valueof('//c2fResponse/foo'); =head3 SERVER SIDE EXAMPLE The following code shows how to use attachments within the context of a CGI script. It shows how to read incoming attachments, and to return attachments to the client. #!/usr/bin/perl -w use SOAP::Transport::HTTP; use MIME::Entity; SOAP::Transport::HTTP::CGI ->packager(SOAP::Lite::Packager::MIME->new) ->dispatch_with({'urn:Majordojo:TemperatureService' => 'TemperatureService'}) ->handle; BEGIN { package TemperatureService; use vars qw(@ISA); @ISA = qw(Exporter SOAP::Server::Parameters); use SOAP::Lite; sub c2f { my $self = shift; my $envelope = pop; my $temp = $envelope->dataof("//c2f/temperature"); use MIME::Entity; my $ent = build MIME::Entity Type => "text/plain", Path => "printenv", Filename => "printenv", Disposition => "attachment"; # read attachments foreach my $part (@{$envelope->parts}) { print STDERR "soaplite.cgi: attachment found! (".ref($part).")\n"; print STDERR "soaplite.cgi: contents => ".$part->stringify."\n"; } # send attachments return SOAP::Data->name('convertedTemp' => (((9/5)*($temp->value)) + 32)), $ent; } } =head2 SOAP::Lite::Packager::DIME TODO =head1 SEE ALSO L, L =head1 COPYRIGHT Copyright (C) 2000-2007 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Byrne Reese Martin Kutter Emartin.kutter fen-net.deE =cut SOAP-Lite-1.19/lib/SOAP/Lite/Utils.pm000644 000770 000024 00000001112 12567356463 017221 0ustar00phredstaff000000 000000 package SOAP::Lite::Utils; use strict; sub import { my $caller = caller(); no strict qw(refs); *{ "$caller\::__mk_accessors" } = \&__mk_accessors; } sub __mk_accessors { my ($class, @method_from) = @_; no strict 'refs'; for my $method ( @method_from ) { my $field = '_' . $method; *{ "$class\::$method" } = sub { my $self = ref $_[0] ? shift : shift->new(); if (@_) { $self->{$field} = shift; return $self } return $self->{$field}; } } } 1; __END__ SOAP-Lite-1.19/lib/SOAP/Lite/Deserializer/XMLSchema1999.pm000644 000770 000024 00000002301 12567356463 022661 0ustar00phredstaff000000 000000 package SOAP::Lite::Deserializer::XMLSchema1999; use strict; use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1; sub anyTypeValue { 'ur-type' } # use as_string and as_boolean from SOAP1_1 Deserializer sub as_string; *as_string = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_string; sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_boolean; sub as_hex { shift; my $value = shift; $value =~ s/([a-zA-Z0-9]{2})/chr oct '0x'.$1/ge; $value } sub as_ur_type { $_[1] } sub as_undef { shift; my $value = shift; $value eq '1' || $value eq 'true' ? 1 : $value eq '0' || $value eq 'false' ? 0 : die "Wrong null/nil value '$value'\n"; } BEGIN { no strict 'refs'; for my $method (qw( float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language )) { my $name = 'as_' . $method; *$name = sub { $_[1] }; } } 1; SOAP-Lite-1.19/lib/SOAP/Lite/Deserializer/XMLSchema2001.pm000644 000770 000024 00000002346 12567356463 022641 0ustar00phredstaff000000 000000 package SOAP::Lite::Deserializer::XMLSchema2001; use strict; use SOAP::Lite::Deserializer::XMLSchema1999; use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1; use SOAP::Lite::Deserializer::XMLSchemaSOAP1_2; sub anyTypeValue { 'anyType' } sub as_string; *as_string = \&SOAP::Lite::Deserializer::XMLSchema1999::as_string; sub as_anyURI; *as_anyURI = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_anyURI; sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_2::as_boolean; sub as_base64Binary; *as_base64Binary = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_2::as_base64; sub as_hexBinary; *as_hexBinary = \&SOAP::Lite::Deserializer::XMLSchema1999::as_hex; sub as_undef; *as_undef = \&SOAP::Lite::Deserializer::XMLSchema1999::as_undef; BEGIN { no strict 'refs'; for my $method (qw( anyType anySimpleType float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time QName )) { my $name = 'as_' . $method; *$name = sub { $_[1] } } } 1; SOAP-Lite-1.19/lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_1.pm000644 000770 000024 00000001627 12567356463 023323 0ustar00phredstaff000000 000000 package SOAP::Lite::Deserializer::XMLSchemaSOAP1_1; use strict; sub anyTypeValue { 'ur-type' } sub as_boolean { shift; my $value = shift; $value eq '1' || $value eq 'true' ? 1 : $value eq '0' || $value eq 'false' ? 0 : die "Wrong boolean value '$value'\n" } sub as_base64 { shift; require MIME::Base64; MIME::Base64::decode_base64(shift) } sub as_ur_type { $_[1] } sub as_anyURI { $_[1] } BEGIN { no strict 'refs'; for my $method (qw( string float double decimal timeDuration recurringDuration uriReference integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger timeInstant time timePeriod date month year century recurringDate recurringDay language )) { my $name = 'as_' . $method; *$name = sub { $_[1] } } } 1; SOAP-Lite-1.19/lib/SOAP/Lite/Deserializer/XMLSchemaSOAP1_2.pm000644 000770 000024 00000001455 12567356463 023323 0ustar00phredstaff000000 000000 package SOAP::Lite::Deserializer::XMLSchemaSOAP1_2; use strict; use SOAP::Lite::Deserializer::XMLSchemaSOAP1_1; sub anyTypeValue { 'anyType' } sub as_boolean; *as_boolean = \&SOAP::Lite::Deserializer::XMLSchemaSOAP1_1::as_boolean; sub as_base64 { shift; require MIME::Base64; MIME::Base64::decode_base64(shift) } BEGIN { no strict 'refs'; for my $method (qw( anyType string float double decimal dateTime timePeriod gMonth gYearMonth gYear century gMonthDay gDay duration recurringDuration anyURI language integer nonPositiveInteger negativeInteger long int short byte nonNegativeInteger unsignedLong unsignedInt unsignedShort unsignedByte positiveInteger date time )) { my $name = 'as_' . $method; *$name = sub { $_[1] }; } } 1; SOAP-Lite-1.19/lib/Apache/SOAP.pm000644 000770 000024 00000007341 12567356463 016417 0ustar00phredstaff000000 000000 # ====================================================================== # # Copyright (C) 2000-2001 Paul Kulchenko (paulclinger@yahoo.com) # SOAP::Lite is free software; you can redistribute it # and/or modify it under the same terms as Perl itself. # # ====================================================================== package Apache::SOAP; use strict; use vars qw(@ISA $VERSION); use SOAP::Transport::HTTP; @ISA = qw(SOAP::Transport::HTTP::Apache); our $VERSION = 1.17; my $server = __PACKAGE__->new; sub server { return $server; } sub handler { $server->configure(@_); $server->SUPER::handler(@_); } # ====================================================================== 1; __END__ =head1 NAME Apache::SOAP - mod_perl-based SOAP server with minimum configuration =head1 SYNOPSIS =over 4 =item httpd.conf (Location), directory-based access SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method" PerlSetVar options "compress_threshold => 10000" =item httpd.conf (Files), file-based access SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method" PerlSetVar options "compress_threshold => 10000" =item .htaccess, directory-based access SetHandler perl-script PerlHandler Apache::SOAP PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method" PerlSetVar options "compress_threshold => 10000" =back =head1 DESCRIPTION This Apache Perl module provides the ability to add support for SOAP (Simple Object Access Protocol) protocol with easy configuration (either in .conf or in .htaccess file). This functionality should give you lightweight option for hosting SOAP services and greatly simplify configuration aspects. This module inherits functionality from SOAP::Transport::HTTP::Apache component of SOAP::Lite module. =head1 CONFIGURATION The module can be placed in , , , directives in main server configuration areas or directly in .htaccess file. All parameters should be quoted and can be separated with commas or spaces for lists ("a, b, c") and with 'wide arrows' and commas for hash parameters ("key1 => value1, key2 => value2"). All options that you can find in SOAP::Transport::HTTP::Apache component are available for configuration. Here is the description of most important ones. =over 4 =item dispatch_to (LIST) Specifies path to directory that contains Perl modules you'd like to give access to, or just list of modules (for preloaded modules). PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, Module::Name, Module::method" =item options (HASH) Specifies list of options for your module, for example threshold for compression. Future versions will support more options. See SOAP::Transport::HTTP documentation for other options. PerlSetVar options "compress_threshold => 10000" =back =head1 METHODS/SUBROUTINES =head2 server my $server = Apache::XMLRPC::Lite->server(); Returns the server object. Useful if you need to manipulate the server object from your code. =head2 handle Request handler. Called by apache. =head1 DEPENDENCIES SOAP::Lite mod_perl =head1 SEE ALSO SOAP::Transport::HTTP::Apache for implementation details, SOAP::Lite for general information, and F for .htaccess example =head1 COPYRIGHT Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Paul Kulchenko (paulclinger@yahoo.com) =cut SOAP-Lite-1.19/examples/allclients.pl000644 000770 000024 00000002451 12567356463 017672 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite uri => 'http://www.soaplite.com/My/Examples', proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82/', # local tcp server # proxy => 'http://login:password@localhost/cgi-bin/soap.cgi', # local CGI server with authentication # proxy => 'jabber://user:password@server:port/to@address/', # JABBER transport # proxy => ['local:', dispatch_to => 'My::Examples'], # LOCAL transport # following examples are one-way only, they don't return any response # proxy => 'ftp://login:password@ftp.somewhere.com/relative/path/to/file.xml', # FTP transport # proxy => 'ftp://login:password@ftp.somewhere.com//absolute/path/to/file.xml', # FTP transport # you can always pass more than one parameter for proxy # proxy => ['mailto:destination.email@address', smtp => 'smtp.server', From => 'your.email', Subject => 'SOAP message'], # SMTP transport ; print SOAP::Lite->new->getStateName(1)->result; SOAP-Lite-1.19/examples/authentication.pl000644 000770 000024 00000002132 12567356463 020553 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Examples', proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ('user' => 'password') }; print getStateName(1), "\n\n"; print getStateNames(12,24,26,13), "\n\n"; print getStateList([11,12,13,42])->[0], "\n\n"; print getStateStruct({item1 => 10, item2 => 4})->{item2}, "\n\n"; # OR if you have SOAP::Lite object you can do # $s->transport->credentials('host_port', 'realm', 'user' => 'password'); # see LWP::UserAgent for difference and more documentation # OR add user and password to your URL as follows: # proxy => 'http://user:password@localhost/' SOAP-Lite-1.19/examples/autoexamples.pl000644 000770 000024 00000001561 12567356463 020250 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Examples', proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; print getStateName(1), "\n\n"; print getStateNames(12,24,26,13), "\n\n"; print getStateList([11,12,13,42])->[0], "\n\n"; print getStateStruct({item1 => 10, item2 => 4})->{item2}, "\n\n"; SOAP-Lite-1.19/examples/chat.pl000644 000770 000024 00000002136 12567356463 016457 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Chat', proxy => 'http://localhost/soap', # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, "\n"; } ; my $nick = shift or die "Usage: $0 nickname\n"; my $c = My::Chat->join($nick); my %whois = %{$c->whois}; print map { "$_ [" . mktime($whois{$_}) . "]\n" } keys %whois; for (;;) { print map { my($nick, $text, $time) = @$_; chomp($text); join '', mktime($time), ' ', $nick, '>', ' ', $text, "\n"; } @{$c->get}; print "$nick> "; defined($_ = <>) or last; $c->send($_) if $_ =~ /\S/; } $c->quit; sub mktime { use POSIX qw(strftime); strftime("%m/%d %H:%M", localtime shift) } SOAP-Lite-1.19/examples/COM/000755 000770 000024 00000000000 12567356463 015617 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/compress.pl000644 000770 000024 00000000737 12567356463 017400 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; $s = SOAP::Lite -> uri('http://localhost/My/Parameters') -> proxy('http://localhost/soap') ; use Benchmark; $s->echo; # ignore the first call Benchmark::cmpthese(10, { 'nocompress' => sub { $s->transport->options({}); $s->echo(1 x 100000) }, 'compress' => sub { $s->transport->options({compress_threshold => 10000}); $s->echo(1 x 100000) }, }) SOAP-Lite-1.19/examples/cookie.pl000644 000770 000024 00000000701 12567356463 017005 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; $r = SOAP::Lite -> uri('urn:lemurlabs-Fortune') -> proxy('http://www.lemurlabs.com/rpcrouter') -> getFortuneByDictionary('work') -> result || ''; print $r && ref($r = SOAP::Deserializer->deserialize($r)) && ($r = $r->valueof('//fortune') || '') ? "Your fortune cookie:\n$r" : "No fortune cookies for you today\n"; SOAP-Lite-1.19/examples/cookieauth.pl000644 000770 000024 00000000571 12567356463 017674 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; use HTTP::Cookies; my $soap = SOAP::Lite -> uri('urn:xmethodsInterop') -> proxy('http://services.xmethods.net:80/soap/servlet/rpcrouter', cookie_jar => HTTP::Cookies->new(ignore_discard => 1)) ; print $soap->echoString('Hello')->result; SOAP-Lite-1.19/examples/customschema.pl000644 000770 000024 00000006160 12567356463 020234 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # example that shows how to handle types specified in other schemas package EncodedTypes; sub as_TickDirection { $_[1] } sub as_Exchanges { $_[1] } package main; use SOAP::Lite; $d = SOAP::Deserializer->new; $d->xmlschemas->{'http://marketdata.earthconnect.net/encodedTypes'} = 'EncodedTypes'; $r = $d->deserialize(q! EarthConnect Corporation 66.7 2001-07-17T14:19:45.3310450-07:00 0.34 23456778 Down 88.21 88.22 300 5800 64.8987 68.4356 87.43 86.34 640 one of NASDAQ or NYSE or AMEX or INDEX false false false false false false false false false false false false false false false !)->result; print "Tick (types:TickDirection): ", $r->[0]->{Tick}, "\n"; print "Exchange (types:Exchanges): ", $r->[0]->{Exchange}, "\n"; SOAP-Lite-1.19/examples/forms/000755 000770 000024 00000000000 12567356463 016327 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/fullsearch.pl000644 000770 000024 00000001766 12567356463 017700 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => 'http://www-3.ibm.com/services/uddi/inquiryapi' ; $\="\n"; $,=", "; # specify separators for print() my($serviceInfo) = grep { $_->name =~ /stock quote/i } find_business(name('XMethods')) -> businessInfos -> businessInfo -> serviceInfos -> serviceInfo ; print $serviceInfo->name, $serviceInfo->serviceKey; my $bindingTemplate = get_serviceDetail($serviceInfo->serviceKey) -> businessService -> bindingTemplates -> bindingTemplate ; my $accessPoint = $bindingTemplate->accessPoint->value; my $tModelKey = $bindingTemplate -> tModelInstanceDetails -> tModelInstanceInfo -> tModelKey ; print $accessPoint, $tModelKey; my $wsdl = get_tModelDetail($tModelKey) -> tModel -> overviewDoc -> overviewURL -> value ; print $wsdl; print SOAP::Lite->service($wsdl)->proxy($accessPoint)->getQuote('MSFT'); SOAP-Lite-1.19/examples/getdom.pl000644 000770 000024 00000003407 12567356463 017021 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # example of custom serialization/deserialization BEGIN { use XML::DOM; # deserializer has to specify new() and deserialize() methods package My::Deserializer; sub new { bless { _parser => XML::DOM::Parser->new } => ref($_[0]) || $_[0] } sub deserialize { shift->{_parser}->parse(shift) } # serializer is inherited from SOAP::Serializer package My::Serializer; @My::Serializer::ISA = 'SOAP::Serializer'; # nothing special here. as_OBJECT_TYPE() method will catch serialization # of the specified type (use '__' instead of '::'), so object of this # type will be properly serializer even being inside complex data structures sub as_XML__DOM__Document { my $self = shift; my($value, $name, $type, $attr) = @_; return [ $name || $self->SUPER::gen_name(), # name {%$attr, 'xsi:type' => $self->maptypetouri($type)}, # attributes (optional) $value->toString, # value $self->gen_id($value), # multiref id (optional) ]; } } print "Deserialize to XML::DOM\n"; my $dom = My::Deserializer->new->deserialize('1'); print ref $dom, ': ', $dom->toString, "\n"; # serialize SOAP message using XML::DOM value my $a = My::Serializer->maptype({'XML::DOM::Document' => 'http://my.something/'}) ->freeform(SOAP::Data->name('a' => [1, $dom, 2])); print "Serialize array with @{[ref $dom]} element\n"; print $a, "\n"; print "Deserialize with default deserializer\n"; my $r = SOAP::Deserializer->deserialize($a)->freeform; use Data::Dumper; $Data::Dumper::Terse = 1; $Data::Dumper::Indent = 1; print Dumper($r); SOAP-Lite-1.19/examples/google.pl000644 000770 000024 00000001555 12567356463 017020 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # Google Web API: http://www.google.com/apis/ # NB: Register and get your own key first # see also: # http://interconnected.org/home/more/GoogleSearch.pl.txt # http://aaronland.net/weblog/archive/4205 # http://www.oreillynet.com/cs/weblog/view/wlg/1283 use SOAP::Lite; my $key = '0'; # <<< put your key here my $query = shift || 'soap'; # use GoogleSearch.wsdl file from Google developer's kit # update path to file to make it work # GoogleSearch.wsdl is NOT included my $google = SOAP::Lite->service('file://GoogleSearch.wsdl'); my $result = $google->doGoogleSearch( $key, $query, 0, 10, 'false', '', 'false', '', 'latin1', 'latin1'); die $google->call->faultstring if $google->call->fault; print "About $result->{'estimatedTotalResultsCount'} results.\n"; SOAP-Lite-1.19/examples/inline.daemon000644 000770 000024 00000001227 12567356463 017646 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # that's OO call, so first parameter is scalar (class name) use Inline C => < new (LocalAddr => 'localhost', LocalPort => 81) -> dispatch_to('greet') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; # you can see the result with: # # % perl SOAPsh.pl http://localhost:81/ # > greet('cruel') # SOAP-Lite-1.19/examples/iterator.pl000644 000770 000024 00000001531 12567356463 017367 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Parameters', proxy => 'http://localhost/soap', # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; print "Session iterator\n"; my $p = My::SessionIterator->new(10); print $p->next, "\n"; print $p->next, "\n"; print "Persistent iterator\n"; $p = My::PersistentIterator->new(10); print $p->next, "\n"; print $p->next, "\n"; SOAP-Lite-1.19/examples/joke.pl000644 000770 000024 00000000714 12567356463 016470 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use SOAP::Lite; use Text::Wrap; my $res = SOAP::Lite -> uri('urn:vgx-joke') -> proxy('http://services.xmltoday.com/vx_engine/soap-trigger.pperl') -> JokeOfTheDay ; die $res->faultstring if $res->fault; printf "%s [%s]\n", $res->result->{title}, $res->result->{score}; print wrap("\t", '', split( /\n/, $res->result->{text})), "\n"; SOAP-Lite-1.19/examples/My/000755 000770 000024 00000000000 12567356463 015566 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/oneliners000644 000770 000024 00000000273 12567356463 017124 0ustar00phredstaff000000 000000 perl "-MSOAP::Lite service=>'http://www.xmethods.net/sd/StockQuoteService.wsdl'" -le "print getQuote('MSFT')" perl "-MSOAP::Lite service=>'file:./quote.wsdl'" -le "print getQuote('MSFT')"SOAP-Lite-1.19/examples/oo-apache.pl000644 000770 000024 00000001425 12567356463 017374 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # --------------------------------------------------------------------- # Object interaction # connect to service that described by Graham Glass: # http://www-106.ibm.com/developerworks/library/ws-peer3/?dwzone=ws # --------------------------------------------------------------------- use SOAP::Lite; my $invoice = bless {name => 'My invoice', amount => 41} => 'Invoice'; my $soap = SOAP::Lite -> proxy('http://localhost:8080/soap/servlet/rpcrouter') -> maptype({Invoice => 'urn:my_encoding'}) -> uri('urn:demo2:purchasing'); $a = $soap->receive($invoice)->result; print 'type: ', ref $a, "\n"; print ' name: ', $a->{name}, "\n"; print ' amount: ', $a->{amount}, "\n"; SOAP-Lite-1.19/examples/parametersbyname.pl000644 000770 000024 00000001712 12567356463 021076 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Parameters', proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; my @parameters = ( SOAP::Data->name(b => 222), SOAP::Data->name(c => 333), SOAP::Data->name(a => 111) ); print "Parameters: ", join(' ', map {$_->value} @parameters), "\n"; print "By order: ", byorder(@parameters), "\n"; print "By name: ", byname(@parameters), "\n"; SOAP-Lite-1.19/examples/pingpong.pl000644 000770 000024 00000001777 12567356463 017373 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/', proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/soap.cgi', # local CGI server # proxy => 'http://localhost/', # local daemon server # proxy => 'http://localhost/soap', # local mod_perl server # proxy => 'https://localhost/soap', # local mod_perl SECURE server # proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; use My::PingPong; # you can manipulate same object on remote and local machine my $p = My::PingPong->new(10); # local # my $p = My::PingPong->SOAP::new(10); # same thing remotely print 'remote: ', $p->SOAP::next, "\n"; # remote print 'local: ', $p->next, "\n"; # local print 'remote: ', $p->SOAP::value, "\n"; # remote SOAP-Lite-1.19/examples/server/000755 000770 000024 00000000000 12567356463 016507 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/SOAP/000755 000770 000024 00000000000 12567356463 015743 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/soapmark.pl000644 000770 000024 00000003651 12567356463 017360 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use Benchmark; use SOAP::Lite on_fault => sub {my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"}; use My::Examples; my %dests = ( local => ['local://localhost/cgi-bin/soap.cgi' => 'http://www.soaplite.com/My/Examples'], mod_perl => ['http://localhost/soap/' => 'http://www.soaplite.com/My/Examples'], CGI => ['http://localhost/cgi-bin/soap.cgi' => 'http://www.soaplite.com/My/Examples'], daemon => ['http://localhost:81/' => 'http://www.soaplite.com/My/Examples'], 'Apache::Registry' => ['http://localhost/mod_perl/soap.mod_cgi' => 'http://www.soaplite.com/My/Examples'], tcpip => ['tcp://localhost:82' => 'http://www.soaplite.com/My/Examples'], direct => ['' => 'My::Examples'], ); my $s; my %tests = ( simple => sub {$s->getStateName(1)}, array => sub {$s->getStateName((1) x 100)}, string => sub {$s->getStateName(1 x 100)}, ); my $testnum = 3; my $testtime = 5; my %result; print STDERR <proxy($proxy)->uri($uri) : $uri; foreach my $test (keys %tests) { printf STDERR "%s [%s] ", $dest, $test; eval {$tests{$test}->()}; warn('skipped, ', $@), next if $@; my($tps) = 0; for (1..$testnum) { my $r = Benchmark::countit($testtime => $tests{$test}); my($pu, $ps, $n) = @{$r}[1,2,5]; $tps += $n / ($pu + $ps); print STDERR "."; } printf STDERR " %.5s call/s\n", $result{$dest}{$test} = $tps / $testnum; } } SOAP-Lite-1.19/examples/soapsmtp.pl000644 000770 000024 00000001367 12567356463 017413 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; SOAP::Lite -> uri('http://www.soaplite.com/My/Examples') -> proxy('mailto:destination.email@address', smtp => 'smtp.server', From => 'your.email', Subject => 'SOAP message') # or # -> proxy('mailto:destination.email@address?From=your.email&Subject=SOAP%20message', smtp => 'smtp.server') # or if you want to send with sendmail # -> proxy('mailto:destination.email@address?From=your.email&Subject=SOAP%20message') # or if your sendmail is in undiscoverable place # -> proxy('mailto:destination.email@address?From=your.email&Subject=SOAP%20message', sendmail => 'command to run your sendmail') -> getStateName(12); SOAP-Lite-1.19/examples/tcpclient.pl000644 000770 000024 00000001063 12567356463 017523 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite +autodispatch => uri => 'http://www.soaplite.com/My/Examples', proxy => 'tcp://localhost:82', # local tcp server on_fault => sub { my($soap, $res) = @_; die ref $res ? $res->faultdetail : $soap->transport->status, "\n"; } ; print getStateName(1), "\n\n"; print getStateNames(12,24,26,13), "\n\n"; print getStateList([11,12,13,42])->[0], "\n\n"; print getStateStruct({item1 => 10, item2 => 4})->{item2}, "\n\n"; SOAP-Lite-1.19/examples/terraserver.pl000644 000770 000024 00000002440 12567356463 020102 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # example for Microsoft's TerraServer http://terraserver.microsoft.net/ # thanks to Ivan R. Judson for his help use SOAP::Lite; # terraserver doesn't like charset in content-type $SOAP::Constants::DO_NOT_USE_CHARSET = 1; my $terra = SOAP::Lite ->proxy('http://terraserver.microsoft.net/TerraService.asmx') ->on_action(sub { join '/', 'http://terraservice.net/terraserver', $_[1] }) ->uri('http://tempuri.org/') ; my $response = $terra->GetTheme(SOAP::Data->name(theme => 'Photo')); if ($response->fault) { die $response->faultstring; } else { my %result = %{$response->result}; print map("$_: @{[$result{$_} || '']}\n", keys %result), "\n"; } my $method = SOAP::Data->name('GetPlaceList') ->attr({xmlns => 'http://tempuri.org/'}); my @params = ( SOAP::Data->name(placeName => 'Chicago'), SOAP::Data->name(MaxItems => 10), SOAP::Data->name(imagePresence => 'true') ); $response = $terra->call($method => @params); if ($response->fault) { print $response->faultcode, " ", $response->faultstring, "\n"; } else { foreach ($response->valueof('//PlaceFacts')) { my %result = %{$_->{Place}}; print map("$_: $result{$_}\n", keys %result), "\n"; } } SOAP-Lite-1.19/examples/UDDI/000755 000770 000024 00000000000 12567356463 015726 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/weblog.pl000644 000770 000024 00000000727 12567356463 017023 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # example for Weblogs SOAP interface (http://www.soapware.org/weblogsCom) use SOAP::Lite; my $weblogs = SOAP::Lite -> proxy("http://rpc.weblogs.com/weblogUpdates") -> on_action(sub{'"/weblogUpdates"'}); print $weblogs->ping( SOAP::Data->name(weblogname=>'Scripting News'), SOAP::Data->name(weblogurl=>'http://www.scripting.com/'), )->result->{message}; SOAP-Lite-1.19/examples/WSDL/000755 000770 000024 00000000000 12567356463 015752 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/XML/000755 000770 000024 00000000000 12567356463 015641 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/XMLRPC/000755 000770 000024 00000000000 12567356463 016206 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/XMLRPC/mod_xmlrpc.htaccess000644 000770 000024 00000001373 12567356463 022075 0ustar00phredstaff000000 000000 # -- XMLRPC::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # put this file into mod_xmlrpc directory (for tests) or anywhere you want SetHandler perl-script PerlHandler Apache::XMLRPC::Lite # you may specify almost ANY method of XMLRPC::Transport::HTTP::Apache here # see documentation for more information # if more than one, parameters should be quoted and can be separated with commas PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, \ Module::Name, Module::method" # or with spaces PerlSetVar objects_by_reference "My::PersistentIterator My::SessionIterator My::Chat" # for methods that accept hashes, specify parameters as "key1 => value1, key2 => value2" PerlSetVar options "compress_threshold => 10000" SOAP-Lite-1.19/examples/XMLRPC/simple1.pl000644 000770 000024 00000000362 12567356463 020116 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use XMLRPC::Lite; print XMLRPC::Lite -> proxy('http://betty.userland.com/RPC2') -> call('examples.getStateName', 25) -> result; SOAP-Lite-1.19/examples/XMLRPC/xmlrpc.cgi000644 000770 000024 00000003725 12567356463 020206 0ustar00phredstaff000000 000000 #!/usr/bin/env perl # -- XMLRPC::Lite -- services.soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use XMLRPC::Transport::HTTP; XMLRPC::Transport::HTTP::CGI -> dispatch_to('validator1') -> handle ; package validator1; sub whichToolkit { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return +{ toolkitDocsUrl => 'http://www.soaplite.com/', toolkitName => 'XMLRPC::Lite', toolkitVersion => XMLRPC::Lite->VERSION, toolkitOperatingSystem => $^O, } } sub countTheEntities { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $string = shift; my $res; $res->{ctLeftAngleBrackets} = ($string =~ s/{ctRightAngleBrackets} = ($string =~ s/>//g) || 0; $res->{ctAmpersands} = ($string =~ s/&//g) || 0; $res->{ctApostrophes} = ($string =~ s/'//g) || 0; $res->{ctQuotes} = ($string =~ s/"//g) || 0; return $res; } sub arrayOfStructsTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $array = shift; my $curly_sum = 0; for my $struct (@$array) { $curly_sum += $struct->{'curly'}; } return $curly_sum; } sub easyStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $struct = shift; return $struct->{'moe'} + $struct->{'larry'} + $struct->{'curly'}; } sub echoStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return shift; } sub manyTypesTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return [@_]; } sub moderateSizeArrayCheck { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $array = shift; return join('', $array->[0], $array->[-1]); } sub nestedStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $calendar = shift; my $april_1_2000 = $calendar->{'2000'}{'04'}{'01'}; return ($april_1_2000->{moe} + $april_1_2000->{larry} + $april_1_2000->{curly}); } sub simpleStructReturnTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $number = shift; return +{ times10 => $number * 10, times100 => $number * 100, times1000 => $number * 1000 }; } SOAP-Lite-1.19/examples/XMLRPC/xmlrpc.daemon000644 000770 000024 00000004077 12567356463 020710 0ustar00phredstaff000000 000000 #!/usr/bin/env perl # -- XMLRPC::Lite -- services.soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use XMLRPC::Transport::HTTP; my $daemon = XMLRPC::Transport::HTTP::Daemon -> new (LocalPort => 80) -> dispatch_to('validator1') ; print "Contact to XMLRPC server at ", $daemon->url, "\n"; $daemon->handle; package validator1; sub whichToolkit { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return +{ toolkitDocsUrl => 'http://www.soaplite.com/', toolkitName => 'XMLRPC::Lite', toolkitVersion => XMLRPC::Lite->VERSION, toolkitOperatingSystem => $^O, } } sub countTheEntities { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $string = shift; my $res; $res->{ctLeftAngleBrackets} = ($string =~ s/{ctRightAngleBrackets} = ($string =~ s/>//g) || 0; $res->{ctAmpersands} = ($string =~ s/&//g) || 0; $res->{ctApostrophes} = ($string =~ s/'//g) || 0; $res->{ctQuotes} = ($string =~ s/"//g) || 0; return $res; } sub arrayOfStructsTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $array = shift; my $curly_sum = 0; for my $struct (@$array) { $curly_sum += $struct->{'curly'}; } return $curly_sum; } sub easyStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $struct = shift; return $struct->{'moe'} + $struct->{'larry'} + $struct->{'curly'}; } sub echoStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return shift; } sub manyTypesTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); return [@_]; } sub moderateSizeArrayCheck { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $array = shift; return join('', $array->[0], $array->[-1]); } sub nestedStructTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $calendar = shift; my $april_1_2000 = $calendar->{'2000'}{'04'}{'01'}; return ($april_1_2000->{moe} + $april_1_2000->{larry} + $april_1_2000->{curly}); } sub simpleStructReturnTest { shift if UNIVERSAL::isa($_[0] => __PACKAGE__); my $number = shift; return +{ times10 => $number * 10, times100 => $number * 100, times1000 => $number * 1000 }; } SOAP-Lite-1.19/examples/XML/customxml.pl000644 000770 000024 00000013265 12567356463 020240 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; my $d = SOAP::Custom::XML::Deserializer -> deserialize(join '', ) -> valueof('/Envelope/Body'); foreach my $portfolio ($d->Report->Request->Composition->PortfolioDistribution) { print $portfolio->type, " ", $portfolio->date, "\n"; foreach my $row ($portfolio->Row) { print " ", $row->Element, " ", $row->Value, "\n"; } } __DATA__
61744J366
Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Returned no data for request: PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Could not retrieve PortfolioDistribution Common Stocks 0.9991 Other 0.0021 Cash & Cash Equivalents -0.0012 General Electric Company 0.0458 Cisco Systems Inc 0.033 Microsoft Corporation 0.0263 Exxon Mobil Corp. 0.0263 Pfizer, Inc. 0.0231 Intel Corporation 0.0209 Citigroup Inc 0.02 Emc Corp. 0.0185 American International Group, Inc. 0.0181 Oracle Corporation 0.0172 Pharmaceuticals 0.0941 Communications Equipment 0.0857 Computers & Peripherals 0.0764 Diversified Financials 0.0724 Industrial Conglomerates 0.0581 Diversified Telecommunication Services 0.058 Software 0.056 Other 0.5002 Cash & Cash Equivalents -0.0012 Information Technology 0.2964 Financials 0.154 Health Care 0.1265 Consumer Discretionary 0.1026 Industrials 0.0874 Telecommunication Services 0.0632 Consumer Staples 0.0575 Other 0.1136 Cash & Cash Equivalents -0.0012
SOAP-Lite-1.19/examples/WSDL/dynamic1.pl000644 000770 000024 00000000750 12567356463 020016 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- BEGIN { warn "Started...\n" } # import interface. All methods from loaded service are imported by default use SOAP::Lite service => 'http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl', # service => 'file:/your/local/path/xmethods-delayed-quotes.wsdl', # service => 'file:./xmethods-delayed-quotes.wsdl', ; warn "Loaded...\n"; print getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/dynamic2.pl000644 000770 000024 00000000420 12567356463 020011 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # object interface print SOAP::Lite -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl') -> getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/dynamic3.pl000644 000770 000024 00000000445 12567356463 020021 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # object interface my $service = SOAP::Lite -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl'); print $service->getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/dynamic4.pl000644 000770 000024 00000000502 12567356463 020014 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # object interface # WSDL with element and multiple ports (non-SOAP bindings) print SOAP::Lite -> service('http://www.xmethods.net/sd/StockQuoteImport.wsdl') -> getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/say_hello_doclit.pl000644 000770 000024 00000000700 12567356463 021621 0ustar00phredstaff000000 000000 use SOAP::Lite +trace; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0)->readable(1); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call("sayHello", SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n"; SOAP-Lite-1.19/examples/WSDL/say_hello_doclit.wsdl000644 000770 000024 00000003714 12567356463 022167 0ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/WSDL/say_hello_rpcenc.pl000644 000770 000024 00000000547 12567356463 021626 0ustar00phredstaff000000 000000 use SOAP::Lite +trace; my $soap = SOAP::Lite->new( proxy => 'http://localhost:81/soap-wsdl-test/helloworld.pl'); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('namre')->value('Kutter'), SOAP::Data->name('givenName')->value('Martin') ); die $som->faultstring if ($som->fault); print $som->result, "\n"; SOAP-Lite-1.19/examples/WSDL/say_hello_rpcenc.wsdl000644 000770 000024 00000002710 12567356463 022156 0ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/WSDL/say_hello_rpcenc_schema.pl000644 000770 000024 00000000271 12567356463 023140 0ustar00phredstaff000000 000000 use SOAP::Lite; my $soap = SOAP::Lite->service("file:say_hello_rpcenc.wsdl"); eval { my $result = $soap->sayHello('Kutter', 'Martin'); }; if ($@) { die $@; } print $som->result(); SOAP-Lite-1.19/examples/WSDL/say_hello_rpclit.pl000644 000770 000024 00000001005 12567356463 021637 0ustar00phredstaff000000 000000 use SOAP::Lite +trace; my $soap = SOAP::Lite->new( proxy => 'http://localhost:80/helloworld.pl'); $soap->on_action( sub { "urn:HelloWorld#sayHello" }); $soap->autotype(0)->readable(1); $soap->default_ns('urn:HelloWorld'); my $som = $soap->call('sayHello', SOAP::Data->name('parameters')->value( \SOAP::Data->value([ SOAP::Data->name('name')->value( 'Kutter' ), SOAP::Data->name('givenName')->value('Martin'), ])) ); die $som->faultstring if ($som->fault); print $som->result, "\n"; SOAP-Lite-1.19/examples/WSDL/say_hello_rpclit.wsdl000644 000770 000024 00000003605 12567356463 022205 0ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/WSDL/stub1.pl000644 000770 000024 00000000434 12567356463 017346 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # stub interface (created with stubmaker.pl) # perl stubmaker.pl http://www.xmethods.net/sd/StockQuoteService.wsdl use StockQuoteService ':all'; print getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/stub2.pl000644 000770 000024 00000000450 12567356463 017345 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # stub interface (created with stubmaker.pl) # perl stubmaker.pl http://www.xmethods.net/sd/StockQuoteService.wsdl use StockQuoteService; print StockQuoteService->getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/WSDL/stub3.pl000644 000770 000024 00000000505 12567356463 017347 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # stub interface (created with stubmaker.pl) # perl stubmaker.pl http://www.xmethods.net/sd/StockQuoteService.wsdl use StockQuoteService; my $service = StockQuoteService->new; print $service->getQuote('MSFT'), "\n"; SOAP-Lite-1.19/examples/UDDI/inquire1.pl000644 000770 000024 00000001607 12567356463 020024 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use UDDI::Lite import => 'UDDI::Data', import => ['UDDI::Lite' => ':find', ':get'], proxy => 'http://uddi.microsoft.com/inquire', ; my @parameters = ( findQualifiers([findQualifier('sortByNameAsc'), findQualifier('caseSensitiveMatch')]), name('M'), # OR # findQualifiers(findQualifier('sortByNameAsc', # 'caseSensitiveMatch')), # name('M'), ); my $b = find_business(@parameters); for ($b->businessInfos->businessInfo) { print $_->name, "\n"; if ($_->name eq "Microsoft Corporation") { my $key = $_->businessKey; print "$key\n"; my $e = get_businessDetail($key)->businessEntity; my @services = $e->businessServices->businessService; for (@services) { print " ", $_->name, "\n"; } } } SOAP-Lite-1.19/examples/UDDI/publish1.pl000644 000770 000024 00000002163 12567356463 020014 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # You may run these tests/examples for UDDI publishing API against # UDDI registry that was kindly provided with following disclamer: # "This is a free registry provided by XMethods.net and # implemented using GLUE platform (Graham Glass, TheMindElectric)." # Thanks to Tony Hong for his help and support use strict; use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => "https://uddi.xmethods.net:8005/glue/publish/uddi", ; my $name = 'Sample business ' . $$ . time; # just to make it unique print "Authorizing...\n"; my $auth = get_authToken({userID => 'soaplite', cred => 'soaplite'})->authInfo; my $busent = businessEntity(name($name))->businessKey(''); print "Saving business '$name'...\n"; my $newent = save_business($auth, $busent)->businessEntity; my $newkey = $newent->businessKey; print "Created...\n"; print $newkey, "\n"; print $newent->discoveryURLs->discoveryURL, "\n"; print "Deleting '$newkey'...\n"; my $result = delete_business($auth, $newkey)->result; print $result->errInfo, "\n"; SOAP-Lite-1.19/examples/UDDI/simple1.pl000644 000770 000024 00000000652 12567356463 017640 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use UDDI::Lite +autodispatch => proxy => 'http://uddi.microsoft.com/inquire', ; my $list = find_business(name => 'microsoft'); my $bis = $list->businessInfos; for ($bis->businessInfo) { my $s = $_->serviceInfos->serviceInfo or next; # skip if no service information print $s->name, ' ', $s->businessKey, "\n"; } SOAP-Lite-1.19/examples/UDDI/simple2.pl000644 000770 000024 00000000511 12567356463 017633 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => 'http://uddi.microsoft.com/inquire' ; print find_business(name('xmethods')) -> businessInfos->businessInfo->serviceInfos->serviceInfo->name; SOAP-Lite-1.19/examples/UDDI/syntax1.pl000644 000770 000024 00000001717 12567356463 017700 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => "https://some.server.com/endpoint_fot_publishing_API", ; my $name = 'Sample business'; print "Authorizing...\n"; my $auth = get_authToken({userID => 'USERID', cred => 'CRED'})->authInfo; my $tmodel = tModelInstanceInfo(description('some tModel'))->tModelKey('UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4'); my $tmodels = tModelInstanceDetails($tmodel); my $bindtmpl = bindingTemplate([accessPoint('someurl'), $tmodels]); my $bindtmpls = bindingTemplates($bindtmpl); my $bussvc = businessService([name('Test Service'), $bindtmpls]); my $bussvcs = businessServices($bussvc); my $busent = businessEntity([name($name), $bussvcs])->businessKey(''); print "Saving business '$name'...\n"; my $newent = save_business($auth, $busent)->businessEntity; my $newkey = $newent->businessKey; SOAP-Lite-1.19/examples/UDDI/syntax2.pl000644 000770 000024 00000003556 12567356463 017704 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => "https://some.server.com/endpoint_fot_publishing_API", on_fault => sub {}, # do nothing for fault, will check it in the code ; print "Authorizing...\n"; my $auth = get_authToken({userID => 'USERID', cred => 'CRED'})->authInfo; # NB! order of elements DOES matter (and DOES NOT for attributes) my $busent = with businessEntity => name("Contoso Manufacturing"), description("We make components for business"), businessKey(''), businessServices with businessService => name("Buy components"), description("Bindings for buying our components"), serviceKey(''), bindingTemplates with bindingTemplate => description("BASDA invoices over HTTP post"), accessPoint('http://www.contoso.com/buy.asp'), bindingKey(''), tModelInstanceDetails with tModelInstanceInfo => description('some tModel'), tModelKey('UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4') ; my $newent = save_business($auth, $busent); print $newent->businessEntity->businessKey if ref $newent; # # (almost) the same code from Microsoft UDDI toolkit # # With be.AddbusinessEntity # .Name = "Contoso Manufacturing" # .Adddescription = "We make components for business" # With .businessServices.AddbusinessService # .Name = "Buy components" # .Adddescription = "Bindings for buying our components" # With .bindingTemplates.AddbindingTemplate # .accessPoint = "http://www.contoso.com/buy.asp" # .addescription = "BASDA invoices over HTTP post" # With .tModelInstanceDetails.AddtModelInstanceInfo # .tModelKey = GUID_BASDA_INVOICE # End With # End With # End With # End With # SOAP-Lite-1.19/examples/UDDI/syntax3.pl000644 000770 000024 00000002501 12567356463 017672 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- UDDI::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use UDDI::Lite import => 'UDDI::Data', import => 'UDDI::Lite', proxy => "https://some.server.com/endpoint_fot_publishing_API", on_fault => sub {}, # do nothing for fault, will check it in the code ; print "Authorizing...\n"; my $auth = get_authToken({userID => 'USERID', cred => 'CRED'})->authInfo; # MAY also work without businessKey, serviceKey and bindingKey assignments, # however specification requires them to be assigned to the empty strings # NB! order of elements DOES matter my $busent = businessEntity([ name("Contoso Manufacturing"), description("We make components for business"), businessServices( businessService([ name("Buy components"), description("Bindings for buying our components"), bindingTemplates( bindingTemplate([ description("BASDA invoices over HTTP post"), accessPoint("http://www.contoso.com/buy.asp"), tModelInstanceDetails( tModelInstanceInfo->tModelKey('UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4') ), ])->bindingKey(''), ), ])->serviceKey(''), ), ])->businessKey(''); my $newent = save_business($auth, $busent); print $newent->businessEntity->businessKey if ref $newent; SOAP-Lite-1.19/examples/SOAP/simple1.pl000644 000770 000024 00000000516 12567356463 017654 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # simple object interface print SOAP::Lite -> uri('http://simon.fell.com/calc') -> proxy('http://soap.4s4c.com/ssss4c/soap.asp') -> doubler(SOAP::Data->name(nums => [10,20,30,50,100])) -> result ->[1]; SOAP-Lite-1.19/examples/SOAP/simple2.pl000644 000770 000024 00000000505 12567356463 017653 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # using autodispatch feature use SOAP::Lite +autodispatch => uri => 'http://simon.fell.com/calc', proxy => 'http://soap.4s4c.com/ssss4c/soap.asp' ; print doubler(SOAP::Data->name(nums => [10,20,30,50,100]))->[2]; SOAP-Lite-1.19/examples/SOAP/simple3.pl000644 000770 000024 00000000400 12567356463 017646 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Lite; # using WSDL print SOAP::Lite -> service('http://soap.4s4c.com/ssss4c/soap.asp?WSDL') -> doubler([10,20,30,50,100])->[2], "\n"; SOAP-Lite-1.19/examples/SOAP/Transport/000755 000770 000024 00000000000 12567356463 017737 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/SOAP/Transport/HTTP/000755 000770 000024 00000000000 12567356463 020516 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/SOAP/Transport/HTTP/Daemon/000755 000770 000024 00000000000 12567356463 021721 5ustar00phredstaff000000 000000 SOAP-Lite-1.19/examples/SOAP/Transport/HTTP/Daemon/ForkAfterProcessing.pm000644 000770 000024 00000001127 12567356463 026200 0ustar00phredstaff000000 000000 package SOAP::Transport::HTTP::Daemon::ForkAfterProcessing; use strict; use vars qw(@ISA); use SOAP::Transport::HTTP; # Idea and implementation of Peter Fraenkel (Peter.Fraenkel@msdw.com) @ISA = qw(SOAP::Transport::HTTP::Daemon); sub handle { my $self = shift->new; CLIENT: while (my $c = $self->accept) { my $first = 1; while (my $r = $c->get_request) { $self->request($r); $self->SOAP::Transport::HTTP::Server::handle; if ($first && fork) { $first=0; $c->close; next CLIENT } $c->send_response($self->response) } $c->close; undef $c; } } 1; SOAP-Lite-1.19/examples/SOAP/Transport/HTTP/Daemon/ForkOnAccept.pm000644 000770 000024 00000001607 12567356463 024601 0ustar00phredstaff000000 000000 package SOAP::Transport::HTTP::Daemon::ForkOnAccept; use strict; use vars qw(@ISA); use SOAP::Transport::HTTP; # Idea and implementation of Michael Douglass @ISA = qw(SOAP::Transport::HTTP::Daemon); sub handle { my $self = shift->new; CLIENT: while (my $c = $self->accept) { my $pid = fork(); # We are going to close the new connection on one of two conditions # 1. The fork failed ($pid is undefined) # 2. We are the parent ($pid != 0) unless( defined $pid && $pid == 0 ) { $c->close; next; } # From this point on, we are the child. $self->close; # Close the listening socket (always done in children) # Handle requests as they come in while (my $r = $c->get_request) { $self->request($r); $self->SOAP::Transport::HTTP::Server::handle; $c->send_response($self->response); } $c->close; return; } } 1; SOAP-Lite-1.19/examples/server/Apache.pm000644 000770 000024 00000001400 12567356463 020221 0ustar00phredstaff000000 000000 package SOAP::Apache; # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::HTTP; my $server = SOAP::Transport::HTTP::Apache # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') # if you want to use module from BOTH mod_perl and mod_soap # you should use either static or mixed dispatching # -> dispatch_to(qw(My::Examples My::Parameters My::PersistentIterator My::SessionIterator My::PingPong)) # enable compression support -> options({compress_threshold => 10000}) ; sub handler { $server->handler(@_) } 1; SOAP-Lite-1.19/examples/server/mod_soap.htaccess000644 000770 000024 00000001714 12567356463 022032 0ustar00phredstaff000000 000000 # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # put this file into mod_soap directory (for tests) or anywhere you want SetHandler perl-script PerlHandler Apache::SOAP # you may specify almost ANY method of SOAP::Transport::HTTP::Apache here # see documentation for more information # if more than one, parameters should be quoted and can be separated with commas PerlSetVar dispatch_to "/Your/Path/To/Deployed/Modules, \ Module::Name, Module::method" # or with spaces PerlSetVar objects_by_reference "My::PersistentIterator My::SessionIterator My::Chat" # if you want to use module from BOTH mod_perl and mod_soap # you should use either static or mixed dispatching # PerlSetVar dispatch_to "My::Examples My::Parameters My::PersistentIterator My::SessionIterator My::PingPong" # for methods that accept hashes, specify parameters as "key1 => value1, key2 => value2" PerlSetVar options "compress_threshold => 10000" SOAP-Lite-1.19/examples/server/soap.asp000644 000770 000024 00000000735 12567356463 020163 0ustar00phredstaff000000 000000 <% ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) ' Path to Perl modules can be specified ' as '/PATH/TO/MODULES' or as 'drive:/PATH/TO/MODULES' Response.ContentType = "text/xml" Response.Write(Server.CreateObject("SOAP.Lite") _ .server("SOAP::Server") _ .dispatch_to("/Your/Path/To/Deployed/Modules") _ .handle(Request.BinaryRead(Request.TotalBytes)) _ ) %> SOAP-Lite-1.19/examples/server/soap.cgi000644 000770 000024 00000000576 12567356463 020145 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') # enable compression support -> options({compress_threshold => 10000}) -> handle ; SOAP-Lite-1.19/examples/server/soap.daemon000644 000770 000024 00000002143 12567356463 020636 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::HTTP; $SIG{PIPE} = $SIG{INT} = 'IGNORE'; # don't want to die on 'Broken pipe' or Ctrl-C # change LocalPort to 81 if you want to test it with soapmark.pl my $daemon = SOAP::Transport::HTTP::Daemon # if you do not specify LocalAddr then you can access it with # any hostname/IP alias, including localhost or 127.0.0.1. # if do you specify LocalAddr in ->new() then you can only access it # from that interface. -- Michael Percy -> new (LocalAddr => 'localhost', LocalPort => 80) # you may also add other options, like 'Reuse' => 1 and/or 'Listen' => 128 # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') # enable compression support -> options({compress_threshold => 10000}) ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; SOAP-Lite-1.19/examples/server/soap.daemon.forkafterprocessing000644 000770 000024 00000002066 12567356463 024721 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe eval { require SOAP::Transport::HTTP::Daemon::ForkAfterProcessing } or die < new (LocalAddr => 'localhost', LocalPort => 80) # you may also add other options, like 'Reuse' => 1 and/or 'Listen' => 128 # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; SOAP-Lite-1.19/examples/server/soap.daemon.forkonaccept000644 000770 000024 00000001720 12567356463 023313 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe eval { require SOAP::Transport::HTTP::Daemon::ForkOnAccept } or die < new (LocalAddr => 'localhost', LocalPort => 80) # you may also add other options, like 'Reuse' => 1 and/or 'Listen' => 128 # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; SOAP-Lite-1.19/examples/server/soap.fcgi000644 000770 000024 00000000571 12567356463 020306 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::HTTP; SOAP::Transport::HTTP::FCGI # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') # enable compression support -> options({compress_threshold => 10000}) -> handle ; SOAP-Lite-1.19/examples/server/soap.io000644 000770 000024 00000002077 12567356463 020010 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::IO; SOAP::Transport::IO::Server # you may specify as parameters for new(): # -> new( in => 'in_file_name' [, out => 'out_file_name'] ) # -> new( in => IN_HANDLE [, out => OUT_HANDLE] ) # -> new( in => *IN_HANDLE [, out => *OUT_HANDLE] ) # -> new( in => \*IN_HANDLE [, out => \*OUT_HANDLE] ) # -- OR -- # any combinations # -> new( in => *STDIN, out => 'out_file_name' ) # -> new( in => 'in_file_name', => \*OUT_HANDLE ) # -- OR -- # use in() and/or out() methods # -> in( *STDIN ) -> out( *STDOUT ) # -- OR -- # use default (when nothing specified): # in => *STDIN, out => *STDOUT # don't forget, if you want to accept parameters from command line # \*HANDLER will be understood literally, so this syntax won't work # and server will complain -> new(@ARGV) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') -> handle ; SOAP-Lite-1.19/examples/server/soap.jabber000644 000770 000024 00000001064 12567356463 020621 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::JABBER; my $server = SOAP::Transport::JABBER::Server -> new('jabber://user:password@jabber.org:5222') # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server\n"; do { $server->handle } while sleep 10; SOAP-Lite-1.19/examples/server/soap.mod_cgi000644 000770 000024 00000001333 12567356463 020774 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # you'd better don't try to use dynamic deployment with Apache::Registry # because it won't work anyway, however you can specify path to your # modules either in dispatch_to or in 'use lib qw(path_to_modules)' use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) -> dispatch_to('/Your/Path/To/Deployed/Modules', qw(My::PersistentIterator My::SessionIterator My::Chat My::Examples My::Parameters My::PingPong)) # enable compression support -> options({compress_threshold => 10000}) -> handle ; SOAP-Lite-1.19/examples/server/soap.mq000644 000770 000024 00000001156 12567356463 020013 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::MQ; my $server = SOAP::Transport::MQ::Server ->new('mq://server:port?Channel=CHANNEL;QueueManager=QUEUEMANAGER;RequestQueue=REQUESTQUEUE;ReplyQueue=REPLYQUEUE') # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server\n"; do { $server->handle } while sleep 1; SOAP-Lite-1.19/examples/server/soap.pop3000644 000770 000024 00000002015 12567356463 020252 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::POP3; my $server = SOAP::Transport::POP3::Server -> new('pop://pop.mail.server') # if you want to have all in one place # -> new('pop://user:password@pop.mail.server') # or, if you have server that supports MD5 protected passwords # -> new('pop://user:password;AUTH=+APOP@pop.mail.server') # specify list of objects-by-reference here -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; # you don't need to use next line if you specified your password in new() $server->login('user' => 'password') or die "Can't authenticate to POP3 server\n"; # handle will return number of processed mails # you can organize loop if you want do { $server->handle } while sleep 10; # you may also call $server->quit explicitly to purge deleted messages SOAP-Lite-1.19/examples/server/soap.tcp000644 000770 000024 00000001217 12567356463 020162 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::TCP; $SIG{PIPE} = $SIG{INT} = 'IGNORE'; # don't want to die on 'Broken pipe' or Ctrl-C my $daemon = SOAP::Transport::TCP::Server -> new (LocalAddr => 'localhost', LocalPort => 82, Listen => 5, Reuse => 1) -> objects_by_reference(qw(My::PersistentIterator My::SessionIterator My::Chat)) # specify path to My/Examples.pm here -> dispatch_to('/Your/Path/To/Deployed/Modules', 'Module::Name', 'Module::method') ; print "Contact to SOAP server at ", join(':', $daemon->sockhost, $daemon->sockport), "\n"; $daemon->handle; SOAP-Lite-1.19/examples/server/soap.vbs000644 000770 000024 00000001015 12567356463 020162 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) ' Doesn't require web server ' Path to Perl modules can be specified ' as '/PATH/TO/MODULES' or as 'drive:/PATH/TO/MODULES' call CreateObject("SOAP.Lite") _ .server("SOAP::Transport::HTTP::Daemon", _ "LocalAddr", "localhost", _ "LocalPort", 80) _ .dispatch_to("/Your/Path/To/Deployed/Modules") _ .options(CreateObject("SOAP.Lite").hash("compress_threshold", 10000)) _ .handle SOAP-Lite-1.19/examples/server/soap_perl.asp000644 000770 000024 00000000741 12567356463 021202 0ustar00phredstaff000000 000000 <%@Language=PerlScript%> <% # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) # Path to Perl modules can be specified as '/PATH/TO/MODULES' $Response->{ContentType} = "text/xml"; $Response->Write($Server->CreateObject("SOAP.Lite") -> server("SOAP::Server") -> dispatch_to("/Your/Path/To/Deployed/Modules") -> handle($Request->BinaryRead($Request->{TotalBytes})) ); %> SOAP-Lite-1.19/examples/My/Chat.pm000644 000770 000024 00000001761 12567356463 017010 0ustar00phredstaff000000 000000 package My::Chat; my @messages; my %users; sub join { my $self = shift; my $class = ref($self) || $self; my $nick = shift or die "User cannot join chat anonymously\n"; !exists $users{$nick} or die "User '$nick' is already in chatroom. Choose another nick\n"; $users{$nick} = time; my $messages = shift || 10; bless { _nick => $nick, _users => \%users, _messages => \@messages, _lastmessage => ($#messages > $messages ? $#messages - $messages : -1), } => $class; } sub get { my $self = shift; my $nick = $self->{_nick}; my @mess = grep {exists $users{$_->[0]} && $_->[0] ne $nick} @messages[($self->{_lastmessage}+1)..$#messages]; $self->{_lastmessage} = $#messages; [@mess]; } sub send { push @messages, [shift->{_nick} => shift, time]; splice(@messages, 0, -12); # we'll keep only last 12 messages } sub whois { shift->{_users} } sub quit { my $self = shift; delete $self->{_users}->{$self->{_nick}} } sub DESTROY { shift->quit } 1; SOAP-Lite-1.19/examples/My/Examples.pm000644 000770 000024 00000002044 12567356463 017702 0ustar00phredstaff000000 000000 package My::Examples; my @states = (undef, # we want to start from one :) qw/Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada/, 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', qw/Ohio Oklahoma Oregon Pennsylvania/, 'Rhode Island', 'South Carolina', 'South Dakota', qw/Tennessee Texas Utah Vermont Virginia Washington/, 'West Virginia', 'Wisconsin', 'Wyoming' ); sub getStateName { my $self = shift; $states[shift]; } sub getStateNames { my $self = shift; join "\n", map {$states[$_]} @_; } sub getStateList { my $self = shift; [map {$states[$_]} @{shift()}]; } sub getStateStruct { my $self = shift; my %states = %{shift()}; # be careful to distinguish block from hash. Just {} won't work +{map {$_ => $states[$states{$_}]} keys %states}; } 1; SOAP-Lite-1.19/examples/My/Parameters.pm000644 000770 000024 00000003122 12567356463 020225 0ustar00phredstaff000000 000000 package My::Parameters; use vars qw(@ISA); @ISA = qw(SOAP::Server::Parameters); sub echo { my $self = shift; pop; # last parameter is envelope (SOAP::SOM object) # don't want to echo it @_; } sub echodata { my $self = shift; my @parameters = pop->dataof(SOAP::SOM::paramsin); @parameters; } sub echotwo { SOAP::Data->type(xml => "$_[1]$_[2]"); } sub autobind { my $self = shift; my $param1 = shift; my $param2 = SOAP::Data->name('myparam' => shift() * 2); return $param1, $param2; } sub addheader { my $self = shift; my $param1 = shift; my $header = pop->headerof(SOAP::SOM::headers); return $param1, $header->value($header->value x 2); } sub byorder { my $self = shift; my($a, $b, $c) = @_; return "1=$a, 2=$b, 3=$c"; } sub byname { # input parameter(s), envelope (SOAP::SOM object) my $self = shift; my($a, $b, $c) = SOAP::Server::Parameters::byName([qw(a b c)], @_); return "a=$a, b=$b, c=$c"; } sub bynameororder { # input parameter(s), envelope (SOAP::SOM object) my $self = shift; my($a, $b, $c) = SOAP::Server::Parameters::byNameOrOrder([qw(a b c)], @_); return "a=$a, b=$b, c=$c"; } sub die_simply { die 'Something bad happened in our method'; } sub die_with_object { die SOAP::Data->name(something => 'value')->uri('http://www.soaplite.com/'); } sub die_with_fault { die SOAP::Fault->faultcode('Server.Custom') # will be qualified ->faultstring('Died in server method') ->faultdetail(bless {code => 1} => 'BadError') ->faultactor('http://www.soaplite.com/custom'); } 1; SOAP-Lite-1.19/examples/My/PersistentIterator.pm000644 000770 000024 00000000335 12567356463 021777 0ustar00phredstaff000000 000000 package My::PersistentIterator; my $iterator; sub new { my $self = shift; my $class = ref($self) || $self; $iterator ||= (bless {_num=>shift} => $class); } sub next { my $self = shift; $self->{_num}++; } 1; SOAP-Lite-1.19/examples/My/PingPong.pm000644 000770 000024 00000000350 12567356463 017643 0ustar00phredstaff000000 000000 package My::PingPong; sub new { my $self = shift; my $class = ref($self) || $self; bless {_num=>shift} => $class; } sub next { my $self = shift; $self->{_num}++; } sub value { my $self = shift; $self->{_num}; } 1; SOAP-Lite-1.19/examples/My/SessionIterator.pm000644 000770 000024 00000000273 12567356463 021263 0ustar00phredstaff000000 000000 package My::SessionIterator; sub new { my $self = shift; my $class = ref($self) || $self; bless {_num=>shift} => $class; } sub next { my $self = shift; $self->{_num}++; } 1; SOAP-Lite-1.19/examples/forms/style.cgi000644 000770 000024 00000000644 12567356463 020157 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use SOAP::Transport::HTTP; SOAP::Transport::HTTP::CGI -> dispatch_to('Style') -> handle; package Style; sub echo { return SOAP::Data->name(echo => $_[1]), SOAP::Header->name('html:style' => <uri('http://www.w3.org/Profiles/XHTML-transitional'); echo { display: block; color: red; } EOS } SOAP-Lite-1.19/examples/forms/style.html000644 000770 000024 00000001454 12567356463 020361 0ustar00phredstaff000000 000000 SOAP::Lite POST Examples

SOAP::Lite Examples


SOAP-Lite-1.19/examples/COM/hash.vbs000644 000770 000024 00000000551 12567356463 017257 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to local ASP/Daemon server Set hashRes = CreateObject("SOAP.Lite").new( _ "proxy", "http://localhost/soap.asp", _ "uri", "http://www.soaplite.com/My/Examples" _ ).getStateStruct(CreateObject("SOAP.Lite").hash("a", 1, "b", 2)) _ .result MsgBox hashRes.a MsgBox hashRes.bSOAP-Lite-1.19/examples/COM/hashecho.vbs000644 000770 000024 00000001264 12567356463 020120 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to remote SOAP server Set soaplite = CreateObject("SOAP.Lite") ' values can be stored in hash using "hash" method Set subhash = soaplite.hash("key_c", "Value C") Set hash = soaplite.hash("key_a", "Value A", "key_b", subhash) ' or can be assigned directly hash.key_b.key_d = "Value D" Set echohash = soaplite.new( _ "proxy", "http://services.soaplite.com/echo.cgi", _ "uri", "http://namespaces.soaplite.com/Echo" _ ).echo(hash).result MsgBox "key_a: " & echohash.key_a & chr(13) & _ "key_b+key_c: " & echohash.key_b.key_c & chr(13) & _ "key_b+key_d: " & echohash.key_b.key_d SOAP-Lite-1.19/examples/COM/local.vbs000644 000770 000024 00000000415 12567356463 017425 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to local ASP/Daemon server MsgBox CreateObject("SOAP.Lite").new( _ "proxy", "http://localhost/soap.asp", _ "uri", "http://www.soaplite.com/My/Examples" _ ).getStateName(1).result SOAP-Lite-1.19/examples/COM/make-com-minimal.bat000755 000770 000024 00000000153 12567356463 021426 0ustar00phredstaff000000 000000 @echo off copy SOAP-Lite-COM-minimal.ctrl Lite.ctrl >nul call perlctrl Lite.ctrl @make-com.args -dependent SOAP-Lite-1.19/examples/COM/make-com-standalone.bat000755 000770 000024 00000000161 12567356463 022127 0ustar00phredstaff000000 000000 @echo off copy SOAP-Lite-COM-standalone.ctrl Lite.ctrl >nul call perlctrl Lite.ctrl @make-com.args -freestanding SOAP-Lite-1.19/examples/COM/make-com.args000644 000770 000024 00000000317 12567356463 020167 0ustar00phredstaff000000 000000 -clean -info "CompanyName=soaplite.com;FileDescription=SOAP::Lite for Perl;ProductVersion=0.65;LegalCopyright=Copyright (C) 2000-2005 Paul Kulchenko" -perl D:\Perl-5.8.6.811\bin\perl.exe -lib D:\OpenSSL\binSOAP-Lite-1.19/examples/COM/README000644 000770 000024 00000013241 12567356463 016500 0ustar00phredstaff000000 000000 SOAP::Lite for COM interface ============================ SOAP::Lite for COM interface gives you ability to access SOAP services from your COM applications. Examples in Visual Basic, Excel/VBA, Perl, JavaScript and ASP are provided. Interface comes in two versions: standalone and minimal. Both versions were tested on Windows 2K and XP, but should work on Windows 9x/Me/NT/2K/XP. Minimal version requires Perl installation, but comes in a small size. Standalone version doesn't require ANYTHING (including Perl), but comes as one big dll. Both libraries are compiled using the latest version of ActivePerl available (5.8.6 build 811). Standalone: http://www.soaplite.com/download/SOAP-Lite-COM-standalone-latest.zip Minimal (Perl required): http://www.soaplite.com/download/SOAP-Lite-COM-minimal-latest.zip You may create your own version (all source code and batch files are provided), but it'll require PerlCtrl utility that comes with Perl Development Kit from ActiveState (http://activestate.com/). Batch files are written for the latest PDK version (v6). The library can ONLY be created on Windows NT, 2K, or XP, but will work on any Windows platform. INSTALLATION To register library: regsvr32 Lite.dll You can now try out the example programs. To unregister library: regsvr32 /u Lite.dll VISUAL BASIC EXAMPLES remote.vbs and temper.vbs connect to remote services, delayed stock quotes and temperature conversion. local.vbs connects to local ASP server. VISUAL BASIC, PERL AND JAVASCRIPT EXAMPLE These examples (states.vbs, states.pl, states.html) connect to the local SOAP server and call service that will return name of the state. C# EXAMPLE remote.cs example connects to remote service (XMethod.com) which echoes back string 'Hello'. MICROSOFT EXCEL EXAMPLE Open the Excel (states.xls) document. Be warned, this document contains macroses, so you can get the warning. If you want to run examples you need to enable macroses. For those who don't trust anybody code of macroses is provided in states.vba file, so they can disable macroses and add them from this file. By default this example will connect to local SOAP server (see VISUAL BASIC SERVER EXAMPLE). You may alter the address by changing parameter for proxy() method. Supply a number of state and click 'Get State Name' button. VISUAL BASIC SERVER EXAMPLE You may start local SOAP server by running soap.vbs script. By default server will accept requests on 'http://localhost/', but you can modify this URL. Probably you'll also need to modify dispatch_to() parameters where you can specify path to your Perl modules. ASP SERVER EXAMPLE (VBScript and PerlScript) Example of ASP SOAP server is provided. This implementation doesn't require ROPE or MSXML dlls, so all that you need is register Lite.dll and put soap.asp and/or soap_perl.asp in appropriate place (for example, c:\inetpub\wwwroot\). Now you can direct your SOAP requests to http://localhost/soap.asp (VBScript) or http://localhost/soap_perl.asp (PerlScript). XML-RPC examples (VBScript) Example of XML-PRC client is provided. You can use XML-RPC in a way you use SOAP protocol, only instead of new() method xmlrpc() method should be called to create an object. For example: MsgBox CreateObject("SOAP.Lite").xmlrpc( _ "proxy", "http://betty.userland.com/RPC2" _ ).call("examples.getStateName", 25).result ISSUES AND LIMITATIONS HASHES Since not all languages have primitive data type that is equivalent to Perl's hashes, hashes don't map neatly between Perl and languages like Visual Basic and Visual C++. However, SOAP::Lite derived a way to move hashes around. hash() method allow you create hash and manipulate it. If your Perl program returns a hash reference, it'll be wrapped in object around it. This wrapper object allows you to manipulate the hash in the host language. Set hash = CreateObject("SOAP.Lite").hash("a", 1, "b", 2) hash.c = 3 See hash.vbs for example that moves hashes around. See hashecho.cvs for hash of hash example. ARRAYS COM interface provides a simple way of returning arrays to the host language. Instead of returning an array, return an array reference (such as \@myarray instead of @myarray). when you return an array reference from a subroutine, it is automatically converted into an array in the host language. Although an array can be passed to a SOAP::Lite COM interface, a reference to the array can not be passed. Therefore any manipulation of the array elements must be returned to the caller. REFERENCES When you pass a reference (to an array, scalar, or hash) to, or return a reference from a COM interface, a copy of your data is passed, not a true reference to your data. Thus, when you manipulate the data from within a COM interface, you are not manipulating the calling script's data. The ability to use references in a traditional manner will be addressed in a future versions. CONTEXT How do I call a method in a list/array context? You can coerce any method call into a list context. Instead of invoking: Dim arrayFoo arrayFoo = myPerlObj.some_method() Use the List property to invoke the method: Dim arrayFoo arrayFoo = myPerlObj.List.some_method() How do I call a method in a scalar context? By default, methods are invoked in a scalar context. If, for some reason, you find that you need to explicitly invoke a method in a scalar context, you can invoke the method on the Scalar property of the object. Instead of: cntFoo = myPerlObj.some_method() Use the Scalar property to invoke the method: cntFoo = myPerlObj.Scalar.some_method() MORE INFORMATION For more information, see http://aspn.activestate.com/ASPN/docs/PDK/6.0/PerlCtrl_overview.html SOAP-Lite-1.19/examples/COM/remote.cs000644 000770 000024 00000001724 12567356463 017445 0ustar00phredstaff000000 000000 // -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- // Lots of thanks to Tony Hong (xmethods.net) for provided help and examples // Connect to remote SOAP server using System; using System.Reflection; public class test { public static void Main() { Type typ = Type.GetTypeFromProgID("SOAP.Lite"); object obj = Activator.CreateInstance(typ); object soaplite = typ.InvokeMember("new",BindingFlags.InvokeMethod,null,obj,null); Object[] uri = {"urn:xmethodsInterop"}; Object[] proxy = {"http://services.xmethods.net:80/perl/soaplite.cgi"}; typ.InvokeMember("uri",BindingFlags.InvokeMethod,null,soaplite,uri); typ.InvokeMember("proxy",BindingFlags.InvokeMethod,null,soaplite,proxy); object [] input = {"Hello"}; object resultObject = typ.InvokeMember("echoString",BindingFlags.InvokeMethod,null,soaplite,input); Console.WriteLine(typ.InvokeMember("result",BindingFlags.InvokeMethod,null,resultObject,null)); } } SOAP-Lite-1.19/examples/COM/remote.vba000644 000770 000024 00000001224 12567356463 017603 0ustar00phredstaff000000 000000 Function GetSOAPObject() As Object Static SOAPObject As Object If SOAPObject Is Nothing Then Set SOAPObject = CreateObject("SOAP.Lite").new If SOAPObject Is Nothing Then MsgBox ("Oops, no SOAP.Lite on this machine") Exit Function End If SOAPObject.proxy("http://soaplite:authtest@services.soaplite.com/auth/examples.cgi").uri ("http://www.soaplite.com/My/Examples") End If Set GetSOAPObject = SOAPObject End Function Sub GetStateNameRemotely() Application.StatusBar = "Running SOAP call..." Range("Current").FormulaR1C1 = GetSOAPObject.getStateName(Sheet1.TextBox1.Value).result Application.StatusBar = False End Sub SOAP-Lite-1.19/examples/COM/remote.vbs000644 000770 000024 00000000411 12567356463 017622 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to remote SOAP server MsgBox CreateObject("SOAP.Lite").new( _ "proxy", "http://services.xmethods.net/soap", _ "uri", "urn:xmethods-delayed-quotes" _ ).getQuote("MSFT").result SOAP-Lite-1.19/examples/COM/remote.xls000644 000770 000024 00000113000 12567356463 017635 0ustar00phredstaff000000 000000 аЯрЁБс>ўџ ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџ ўџџџ': !"#$%&(;)*,ўџџџ-E/092345678+ўџџџўџџџ<H>?@ABCD.FGIўџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ РF EЋяШР№Чš)ШР?Workbookџџџџ__VBA_PROJECT_CUR"џџџџџџџџряћ(ШР4–)ШРCtls џџџџџџџџXўџџџ  !"#$%&'()*+,-./0123456789:;<=ўџџџ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ўџџџ^_`abcdўџџџfgўџџџijklmnopqrstuvwxyz{|}~€в‹BьЮž Њ`ѓ@€H€,€мF21$5€УLucida Sans Unicode„ фˆВ Р (++џџ#ˆЖџџџџџџџџ<џџ-ЉђgrŠ]F‰Cћюqњ{bРF|[ТPЬДfMОsє Ы)^Rџџџџџџџџџџџџx|[ТPЬДfMОsє Ы)^R-ЉђgrŠ]F‰Cћюqњ{bџџMEџџџџџџџџџџпџџ8џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ ЏЭЩ@сАСт\peScout.com LLC BАaР=гК ThisWorkbookœЏМ=xZx<|)8X@"Зк1ШџArial1ШџArial1ШџArial1ШџArial16ШџLucida Sans Unicode1Ш Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)*Є%"$"#,##0.000000_);\("$"#,##0.000000\)Ѕ0.00_);\(0.00\)І "$"#,##0.00&Ї!"$"#,##0.0000_);\("$"#,##0.0000\) Ј#,##0.0000_);\(#,##0.0000\)Љ0.00_);[Red]\(0.00\)Њ0.0000_);[Red]\(0.0000\)рѕџ Р рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР р Р р+ѕџ јР р)ѕџ јР р,ѕџ јР р*ѕџ јР рєџєР р ѕџ јР р Р р#Р р!Р рЊ#œР рІ Р рЉ Р рЉ œР р Р р Р рI Р “€џ“€џ“€џ“€џ“€џ“€џ“€џ`…Ј Sheet1ŒЎўџўџCurrent:# GetStateNameRemotelyСС`iыж№Ю№ №t"№l<!’HУXьІТiРжЈmџH\@=№@<!’HУXьІТiРжЈml 08ж&3ўxк­U=LAўfvŽŸрyќN1‡†p -…g  Iш ЙЃИ„†рZnŒ…%%­БВВ36&––жЦТ‚DDˆ\ВО7?Лs—‹оlоюМyПпЬ›ЗР&’1Iдя№RР[ фчяп6;€"­ЗЁaјDPРqЃьЋ№r€Ы‰юнYИMŸmО}ќЕШj_G оq)\M‹4ё@—„’нrSlŒkhgП$‰ЂШшЩљСpлe3@^YВ"ˆc”ж2 УиR8z§Ъu–Œ^Ф–Ÿ?Х–вбы#жu-'дЊЕ,•JБЅчшѕ*KQg9N$›юЯ„dф]4›эд.еSЄx,ŸжF žђО^Ш“Hыюkˆ%ШЅНrЕВž_YпкЭЏnUЫл• ,œZaкфъ+O*гG7EуЗO™f1;“FZi‰(ђ”ѕeޘ(Эˆ2DSDfw]Ог№v4ЪGŒŸ1ЂAuzшѓFM,^_"Њ˜Кvылђ"іщVmxГљМљА1`|;dc‰џŒaБJkЁ*6С*ђАЃЯ™ “O+Ак=/:О-п*ЌžсѕKАzN6^б`ЕМ0|ЋАВЏ ѓuљVaѕ ЏЛB‚еoШУRoОXЅёgБY~МXџuЏ‡ fОЧLNва„ƒј}KS}ўв![KЦwЗбЫ:Нс!бŽаёФ6дuEнБ‡2ЊД?ыШc…о[иЅй*}Ћ$й&ЩЦ_‘ŸЭзuчэ#ЉГз5ЅУЗњpnч]Н ё0НП?&$Yь}-‹љ§‹`g?‡х9”кHяU-ањˆ§ Жk>rьAМ ћ—D|wžм8”ќ8‡gBUЬ9ЫЧG\ZOт4`пщw90Б гмйЯФwЈНз:ФЪSеЎуšN™šЗgТgНцдћѓПpЯкЪlŸѓ§qsЎЫќ7ТŒ Цt=ЉЇШЦІПo8šФЇЭќЭњф N­œ>[pњPСЩЃррыqzoЦЬџЬЎОU3 №П Р@@ё  їќ™#Enter number of state here (1..50):XRemote server test with authentication (https://services.soaplite.com/auth/examples.cgi) Massachusettsџ  ЏЭЩ@ њд  dќЉёвMbP?_*+‚€%џСƒ„M’\\CORLSFP01\HP LaserJet 4050 SeмДWъ odXLetterPRIVр''''=ЪџЁ"dXр?р?U} $ } ’ } $ } $ } $   џ џ џ џ џ џ џ џ џ џ§ О § § О  О  О О О О зrД ьТ№L№ №4№( №ƒAП №№r’ № ƒ №0€("П CƒCПР@П№ѓт3-№],@("и \ь!9ь №Ж$<Get State Name<`хьŠ№‚’ № “ №HПA ?ПР@џ€УПTextBox1№lёf<№]Z ( \1 0d"ЬнForms.TextBox.1X>Д@я7К Sheet1 VBAџџџџ €v§(ШР№ѓi)ШРThisWorkbook џџџџфSheet1џџџџџџџџ>Н__SRP_5џџџџ]Ьџџџџџџџџџџ [LџџџџSџџџџS”џџџџ6"џџџџ<<џџ<џџ<џџ<џџ<џџ< џџ<$џџ<(џџ<,џџ<0џџ<4џџ<џџџџџџN0{00020819-0000-0000-C000-000000000046}p џџџџ8и0џџџџџџџџџџџџШљ@џџџџџџџџ˜„€ўџџџџџџџhџџ@џџџџџџџџ%џџџџƒўџџџџџџџ џџџџџџџџџџџџџџ %‚ џџџџўџџџаџџўџџџџџџџџџџџ % 8 0 џџџџџџџџџџџџ(џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€џџџџ $*.ng  xxџџџ џџ @ўџhџџџ џџ @ўџXџџџ џџ @ўџHџџџ џџ @ўџ8џџџ џџ H(џџџ џџ  џџџ џџ@ўџџџџ џџ @ўџјўџџ џџ @ўџшўџџ џџ @ўџиўџџ џџ @ўџШўџџ џџ @ўџИўџџ џџ @ўџЈўџџ џџ @ўџ˜ўџџ џџ @ўџˆўџџ џџ @ўџxўџџ џџ @ўџhўџџ џџ @Ј@Xўџџ џџ @ўџHўџџ џџ @ўџ8ўџџ џџ @ўџ(ўџџ џџ @@ўџџ џџ @ўџўџџ џџ @ўџј§џџ џџ @ўџш§џџ џџ @h@и§џџ џџ @ўџШ§џџ џџ @ўџИ§џџ џџ @ўџЈ§џџ џџ @Ш@˜§џџ џџ @ўџˆ§џџ џџ @ўџx§џџ џџ @ўџh§џџ џџ @(@X§џџ џџ @ўџH§џџ џџ @ўџ8§џџ џџ @ўџ(§џџ џџ @ˆ@§џџ џџ @ўџ§џџ џџ @ўџјќџџ џџ @ўџшќџџ џџ @ш@иќџџ џџ @ўџШќџџ џџ @ўџИќџџ џџ @ўџЈќџџ џџ @H@˜ќџџ џџ @ўџˆќџџ џџ @ўџxќџџ џџ @ўџhќџџ џџ @Ј@Xќџџ џџ @ўџHќџџ џџ @ўџ8ќџџ џџ @ўџ(ќџџ џџ @@ќџџ џџ @ўџќџџ џџ @ўџјћџџ џџ @ўџшћџџ џџ @h@ићџџ џџ @ўџШћџџ џџ @ўџИћџџ џџ @ўџЈћџџ џџ @Ш@˜ћџџ џџ @ўџˆћџџ џџ @ўџxћџџ џџ @ўџhћџџ џџ @(@Xћџџ џџ @ўџHћџџ џџ @ўџ8ћџџ џџ @ўџ(ћџџ џџ @ˆ@ћџџ џџ @ўџћџџ џџ @ўџјњџџ џџ @ўџшњџџ џџ @ш@ињџџ џџ @ўџШњџџ џџ @ўџИњџџ џџ @ўџЈњџџ џџ @H @˜њџџ џџ @ўџˆњџџ џџ @ўџxњџџ џџ @ўџhњџџ џџ @Ј @Xњџџ џџ @ўџHњџџ џџ @ўџ8њџџ џџ @ўџ(њџџ џџ @ @њџџ џџ @ўџњџџ џџ @ўџјљџџ џџ @ўџшљџџ џџ   џџџџрH иљџџ џџ џџџџ џџџџ8 џџџџШљџџ џџ ˜џџџџ( џџџџ` џџџџџџџџџџџџ@џџџџџџџџџџџџџџџџџџџџ@џџџџџџџџџџџџЈx@˜˜џџџџџџџџџџџџџџџџџџџџџџJВ;$*\Rffff*073bb318aeпџџџџ4ўЪ€ џџџџџџџџџџџџџџџџh џџџџВАAttribute VB_Name = "ThisWorkbook" ŒBasŒ0{00020P819-0C$0046} |GlobalаSpac’False dCreatablPredeclaIdБTru BExposeTemplateDeriv’BustomizD2 $Р\!Б++џџcˆЖџџџџџџџџDџџц:TБЎ„I—dэЗ’МђŸ РF3Рl4gIŸг‘HЙ*цџџџџџџџџџџџџx TextBox1, 7, 2, MSForms, TextBox3Рl4gIŸг‘HЙ*цц:TБЎ„I—dэЗ’МђŸџџMEџџџџџџџџџџпџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџPSLџџџџSџџџџS”џџџџ sџџџџ6"џџџџ<џџ<џџ<џџџџџџN0{00020820-0000-0000-C000-000000000046}`и€ўџџџџџџџ(џџџџџџџџџџ% %*€џџџџ80@џџџџџџџџ№ƒўџџџџџџџџџџџџџџџџџџџџџ%‚ џџџџўџџџРџџўџџџџџџџџџџџ%џџџџ0џџџџШџџџџаџџџџ8џџџџhhp rџџџџ`џџџџџџџџџџџџ|џ џџџџe(œiƒўџџџџџџџџџџџџџџџџџ џџˆАџџџџјџџџџ@@џџџџџџџџџџџџШ`џџЄ€џџџџџџџџ№џџџџ џџџџрџџџџиџџџџјџџџџ €џџџџИџџџџxџџџџ џџџџџџџџ˜џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ8џџџџџџџџ8џџџџџџџџџџџџ8џџџџџџџџ˜hH,џџџџџџџџџџџџџџџџџџџџџџрJВ;*\R8003*#5f$*\Rffff*473bb24a9aпџџџџ48<ўЪ" € џџџџ џџџџx–oџџџџџџџџџџБAttribute VB_Name = "She@et1" шBast0{000Р20820- C$0046} |Global!ФSpac’False dCreatablPre declaIdЋTru BExposeTemplateDeriv$’Bustom izD2Control–TextBox1, 7, 2, MSFo`rms,  „P6: Sub CommandButton2_Click()  End rU€€€  i&Q ‘&џџџџ 4Ё aЩ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ <Щщ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€EyЯ0 ќЦ  8 ArU€€€ џџџџџџџџH$Й`(џџџџџџџџџџ Ёџџџџ@С8n__SRP_4џџџџџџџџџџџџeŽModule1џџџџh‚__SRP_3 џџџџЇZ__SRP_2џџџџџџџџџџџџЕŒl ь@џџџџv ’ +Р*џџЖџџџџџџџџџџџџџџ џџ`џџџџ`џџMEџџџџџџџџџџпџџ,џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ > џџџџLџџџџLџџџџLџџџџџџџџџџџџš"џџџџLџџџџLџџџџ”џџџџџџџџ<0џџ<4џџ<8џџ<<џџ<џџџџџџP џџџџЈPџџџџ%`@џџџџxџџџ џџџџџџ@џџџ@џџџџџџџџpр„Fџџџџџџ џџ@0џџƒ0џџџџџџџџџџџџџџџџџџџџ+@P`џџџџџџџџшјўkџџџџ џџџџ Œ€џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџXџџџџџџџџџџџџ џџџџаџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆ0џџџџ*Pџџ џџџџ@ўџИhџџџ џџ ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІўџџџЈЉЊЋЌ­ЎЏАБВГДўџџџЖЗўџџџЙКЛМНОПРСТУФХЦЧШЩЪўџџџЬЭЮЯабвгдежзиўџџџклмўџџџўџџџпўџџџстуфўџџџцўџџџшщъыьэюя№ёўџџџѓєѕўџџџїјљўџџџћўџџџџџџџџџџџџџџџџџџџ€@ўџXџџџ џџ h@ўџшHџџџ џџ @ўџ8џџџ џџ @ўџ@(џџџ џџ @ўџXџџџ џџ џџџџР@ўџџџџџџџџ џџ џџџџ@ўџџџџџјўџџ џџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(Xџџџџ@џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ$@  џџџџ@ўџpxџџџ џџ џџџџ@ўџ hџџџ џџ џџџџ@ўџˆXџџџ џџ џџџџ@ўџаTџџџ џџ џџџџ@ўџшDџџџ џџ џџџџ@ўџИ4џџџ џџ @ўџ$џџџ џџ @ўџџџџџ џџџ џџ 0@ўџџџџџџџџ џџ @ўџџџџџџџџ џџ (№ўџџ џџ фўџџ џџ џџџџА lџџџџ`џџџџџџџџpџkџџџџџџџџџџ „ИИџџџ џџ ‘ьџџџџшџџџџаџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ0џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆџџџџи@  џџ vишxџџџ џџ v;@ўџhџџџ џџ H@Xџџџ џџ HTџџџ џџ @ўџDџџџ џџ @ўџ4џџџ џџ @ўџ$џџџ џџ и( џџџ џџ @ўџџџџ џџ $@ўџџџџ џџ nsџџџџиџџџџЈџџџџџџџџџџџџџџџџџџџџPџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€ џџџџџџџџџџџџџџџџџџџџџџџџџџџџJВ;$*\Rffff*483bb24a9c*\R1*#b3*\R1*#c4*\R1*#c0*\R1*#175*\R8003*#44$*\Rffff*473bb24a9a*\R1*#b3*\R1*#c4*\R1*#229*\R0*#14пўЪBˆЈ А-` Р.+а~)X  € џџџџ" &0g0 %€€ џџџџ€ џџџџџџџџр–Ј–PЖRunning SOAP call... $(& !! @%d!fЖCurrent$ ("эЖ SOAP.Lite$*!.F LЗ $(&oџџаџџџџШiџџ0]€ђX FАœˆќ:xќ FАœ Ж"Oops, no SOAP.Lite on this machineA@Pkkzџџ э F.@APObjeџџџџhџџџџpџџџџџџџџ@џџџџ€џџџџ˜Ж#http://www.soaplite.com/My/ExamplesЖ@http://soaplite:authtest@services.soaplite.com/auth/examples.cgi F%RB@TџџџџpџџџџцБAttribute VB_Name = "Module1" Function GetSOAPObject() As , €Static @ stdo€le f%\*\G{00€020430-C 0046}#2.0#0#C:\WINNT\System32\c2.tlb#OLE Automation#^€MSForms>!SFEr ms3€DD452EE1-E08F-101A-8-02608C4D0BB4DFM20.DLL#Micr@osoft ‚9 € 046}#1.3#0#D:\apps\Program Files\Microsoft Office\Office\EXCEL9.OLB#Microsoft Excel 9.0 Object LibraryИ*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automationк*\G{0D452EE1-E08F-101\ ObЌ Library/;§C1€„sˆˆ 00}#0‚#€Ѓj0ІˆРACAC1657D-258A-492E-A3DA-17ABE20 C93886DOCUME~1\pvk001\LOCALSРTemp\Excel8.0\ФT.exdр<€"€с.E р….`ŒM ДA УŠOfficФŠOР‡fiдcТŠР †РA22DF8D04C-5BFР/01B -BDE5РJAA5Р‰4Р2H2@Дgram Files\f\„MSOь97Œnƒ Р9Ьn"E€ТЮТ+ТИThisWorkbookGDР ThР1sDW‚›kbРoPkЮ 2к QРHB1Тм.-@ВB,Т!+*"B+BТрSh eet1Gт S тe`*t1 !tЃЖ2Ўя ЗРэ ь С"module#mКo€~u‚~A2DqC Џ˜ ­Р*!Њ  Use6rЁmрСрzeЮrІ|aЪ2г/ЄЁ/у,(@ Ѓ-b-5BFA-101B-BDE5-00AA0044DE52rU€€€€~~~~w џџџџџџџџџџџџџџџџ  џџџџ щЁ  й TextBox1 й1 ( щЩ8`o–  фџџџџ }t 9‘ џџџџY ўџ џџџџMicrosoft Forms 2.0 FormEmbedded Objectє9ВqџџџџџС*б chop $csv; chop $csv;  p # $csv contains a comma-delimited quote.  p my @quote = split(',', $csv);  p if ($quote1 eq 0 and $quote[2] eq 'N/A') {  p return ['UNKN', 'UNKN'];  p } else {  p return [ @quote[1,2] ];  p }  p} й џџџџ` €ц:TБЎ„I—dэЗ’МђŸ3Рl4gIŸг‘HЙ*ц  E4 $Making SOAP call ( )...endpoint  ^https://services.soaplite.com/auth/examples.cgi \http://services.soaplite.com/auth/examples.cgi" €http://soaplite:authtest@servЬamџ  фњ*\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{00020813-0000-0000-C000-000000000046}#1.3#0#D:\apps\Program Files\Microsoft Office\Office\EXCEL9.OLB#Microsoft Excel 9.0 Object LibraryИ*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\System32\stdole2.tlb#OLE Automationк*\G{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0#C:\WINNT\System32\FM20.DLL#Microsoft Forms 2.0 Object Library*\G{CAC1657D-258A-492E-A3DA-17ABE20C9388}#2.0#0#C:\DOCUME~1\pvk001\LOCALS~1\Temp\Excel8.0\MSForms.exd#Microsoft Forms 2.0 Object Libraryс.E р….`ŒM Д *\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.1#0#C:\Program Files\Microsoft Office\Office\MSO97.DLL#Microsoft Office 8.0 Object Library  џџџџџџџџJВ;џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ+ThisWorkbook073bb318aeџџThisWorkbookџџ+.џџ Sheet1473bb24a9aџџ Sheet1џџ+ЗџџModule1483bb24a9cџџ0Module1џџР*џџџџ0˜ џџUserForm1013c1f0885џџƒUserForm1џџPЁџџџџџџpџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ0џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџPџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџVэГШ†сM—ЭF/ПДшџџџџџа0э2dJ™П,\ю3џџџџK™W=wХMЈVІдmRZџџџџџџџџ0„ЦOу а‘NЌLыqЅЪYЪџџџџџџџџ0€AJџ. €џas_€џifk€џisƒ€џnew†€џnothingЄ€џSetЉ€џstaticВ€џthenExcel€+VBAїтWin16С~Win32MacГВVBA6­# VBAProjectОПstdole“`MSFormsCOfficeu ThisWorkbook|у €џ_Evaluateй Workbook_Open›сSheet1шTextBox1ІSValueфKRangeк  FormulaR1C1S ApplicationЅ* StatusBarЪœ objPerlCOMu CreateObjectјŠ EvalScript_ ChrK~Module1b FetchQuote0“ arrayresultpоgetPriceЂџWorkbookk WorksheetСў _B_var_Chr\;€џџџ_B_var_arrayresultвЯ GetSOAPObjectK€џџџ_B_var_Function™O SOAPObjcetї_ SOAPObject_j €џџџ_B_var_ifPђ €џџџ_B_var_SetSOAP3 €џџџ_B_var_SOAPŸ}MsgBox—RproxyWuriіпhttpgЗwww№хsoaplite'comIMyK^ExamplesŠТ €џџџ_B_var_wwwЃ getStateNameЊresultur€џџџ_B_var_objPerlCOMпqCommandButton1|дGetStateNameRemotely5- €џџџ_B_var_SubН’CommandButton2}дCommandButton2_Clickєљ€џClickŠуTextBox2ЇS StateNumberч- FetchQuote1гAFetchQuote1GetStateNameRemotelyђ €џџџ_B_var_SOAPObjectЩиendpointдy UserForm1)жџџx1ƒ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџHices.soaplite.com/auth/examples.cgi UserForm1$CommandButton2_Click H88 LFetching quote from quote.yahoo.com...РFйРFq ™ џџџџеРFgetStateName result Currentq @ (Running SOAP call...кРF]ЗћК$Ц2KЛфђb м>Рџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ__SRP_1 џџџџйцUserForm1џџџџџџџџ№ѓi)ШР№(v)ШРfџџџџџџџџџџџџн&oџџџџўџџџCompObjџџџџџџџџоaVBFrameџџџџџџџџџџџџр PROJECTwmџџџџхtPROJECTџџџџџџџџџџџџчƒ“K*mџџџџrU€€€€~~~~~~~~~~~~~~~~~@ Œwfћ‚G„#-,o–  фџџџџƒ џџџџџџџџџџџџџџЙƒŠa ‘ џџџџY џџсˆa ™Й&а№9aљџџџџџџџџџџџџС*бщ сс ThisWorkbookSheet1Module1 VBAProjectяРF /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBA 1џџџџ YС0РF8D:\apps\Program Files\Microsoft Office\Office\EXCEL9.OLBExcel )џџџџQб@0РFC:\WINNT\System32\stdole2.tlbstdoleв‹BьЮž Њ`ѓ AџџџџiБPс.E р….`ŒM ДC:\WINNT\System32\FM20.DLLMSForms aa‰Щ`}eСЪŠ%.IЃкЋт “ˆ5C:\DOCUME~1\pvk001\LOCALS~1\Temp\Excel8.0\MSForms.exd 9aaЩpLај-њ[НхЊDоR 2C:\Program Files\Microsoft Office\Office\MSO97.DLLOffice 1џџџџYЩ€ GetSOAPObjectGetStateNameRemotely  SOAP.Litenew DOops, no SOAP.Lite on this machine Fhttp://www.soaplite.com/My/Examples "http://localhost/ proxyuriVBE6.DLL й џџџџЬ А й џџџџS а  иРFџ…КjROH‘AЎYh; РFќb^ D‡ѕkПh{#DРF WorksheetTextBox1в‹BьЮž Њ`ѓв‹BьЮž Њ`ѓCommandButton2_Click H88 LFetching quote from quote.yahoo.com...РFйРFq ™ џџџџеРFgetStateName result Currentq @ (Running SOAP call...кРF]ЗћК$Ц2KЛфђb м>РF6ЫючГDЎztЧŸ0DРFWorkbook Workbook_Open @  Previous NumberOfShares .Initializing PerlCOM... PerlCOM.Script use LWP::Simple;EvalScript psub getPrice { &Making SOAP call...  p  p my $sym = shift; # get the symbol  p # Construct the URL  p my $url = qq[http://quote.yahoo.com/d/quotes.csv] .  p qq[?s=$sym&f=sl1p&e=.csv];  p # Fetch the URL.  p my $csv = get($url);  p # Two extraneous characters appear at the  p # end of the line - let's delete them.  p VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} UserForm1 Caption = "UserForm1" ClientHeight = 3225 ClientLeft = 45 ClientTop = 330 ClientWidth = 4710 StartUpPosition = 1 'CenterOwner End ThisWorkbookThisWorkbookSheet1Sheet1Module1Module1UserForm1UserForm1ID="{DE18C1B6-263F-11D2-B45D-0800365DA902}" Document=ThisWorkbook/&H00000000 Document=Sheet1/&H00000000 Package={AC9F2F90-E877-11CE-9F68-00AA00574A4F} Module=Module1 BaseClass=UserForm1 Name="VBAProject" HelpContextID="0" VersionCompatible32="393222000" CMG="0B09B3CABACEBACEBACEBACE" DPB="1614AEC7B2D9BCDABCDABC" GC="212399DA9ADA9A25" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 &H00000002={00020818-0000-0000-C000-000000000046};Excel8.0;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C Module1=0, 0, 0, 0, C UserForm1=0, 0, 0, 0, C, 22, 22, 814, 511, C ўџр…ŸђљOhЋ‘+'Гй0А@H`x  œЈф Brian JepsonxeScout.com LLC Microsoft Excel@дмїKКН@€ )ШРўџеЭеœ.“—+,љЎ0Ф PXd lt|„ Œ ŸSummaryInformation(џџџџђрDocumentSummaryInformation8џџџџџџџџџџџџієCompObjџџџџџџџџџџџџњfџџџџџџџџџџџџфSMT  Sheet1  Worksheetsўџ џџџџ РFMicrosoft Excel WorksheetBiff8Excel.Sheet.8є9ВqSOAP-Lite-1.19/examples/COM/service.vbs000644 000770 000024 00000000274 12567356463 017776 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- MsgBox CreateObject("SOAP.Lite").new.service("http://www.xmethods.net/sd/StockQuoteService.wsdl").getQuote("MSFT") SOAP-Lite-1.19/examples/COM/SOAP-Lite-COM-minimal.ctrl000644 000770 000024 00000004201 12567356463 022177 0ustar00phredstaff000000 000000 # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # used by PerlCtrl for creating minimal COM interface package SOAP::Lite::COM; use SOAP::Lite; __END__ =pod =begin PerlCtrl %TypeLib = ( PackageName => 'SOAP::Lite::COM', TypeLibGUID => '{35794C5E-478D-4746-81FA-CF0194CC2417}', # do NOT edit this line ControlGUID => '{A0FE6F60-95D4-435B-98AE-93475FDCAA83}', # do NOT edit this line either DispInterfaceIID=> '{23767C1D-DA9B-4FAC-A6B3-3639F8CC0C29}', # or this one ControlName => 'SOAP.Lite', ControlVer => 0.52, # increment if new object with same ProgID ProgID => 'SOAP.Lite', DefaultMethod => 'new', Methods => { 'new' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'create' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'soap' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'xmlrpc' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'server' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'instanceof' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'hash' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'data' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'header' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, }, # end of 'Methods' Properties => { }, # end of 'Properties' ); # end of %TypeLib =end PerlCtrl SOAP-Lite-1.19/examples/COM/SOAP-Lite-COM-standalone.ctrl000644 000770 000024 00000004635 12567356463 022714 0ustar00phredstaff000000 000000 # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # used by PerlCtrl for creating standalone COM interface package SOAP::Lite::COM; use SOAP::Lite; use URI::_foreign; use URI::http; use URI::https; use LWP::Protocol::http; use LWP::Protocol::https; use LWP::Authen::Basic; use LWP::Authen::Digest; use HTTP::Daemon; use Compress::Zlib; use XML::Parser; use SOAP::Transport::HTTP; use XMLRPC::Lite; use XMLRPC::Transport::HTTP; __END__ =pod =begin PerlCtrl %TypeLib = ( PackageName => 'SOAP::Lite::COM', TypeLibGUID => '{35794C5E-478D-4746-81FA-CF0194CC2417}', # do NOT edit this line ControlGUID => '{A0FE6F60-95D4-435B-98AE-93475FDCAA83}', # do NOT edit this line either DispInterfaceIID=> '{23767C1D-DA9B-4FAC-A6B3-3639F8CC0C29}', # or this one ControlName => 'SOAP.Lite', ControlVer => 0.52, # increment if new object with same ProgID ProgID => 'SOAP.Lite', DefaultMethod => 'new', Methods => { 'new' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'create' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'soap' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'xmlrpc' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'server' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'instanceof' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'hash' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'data' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, 'header' => { RetType => VT_DISPATCH, TotalParams => 0, NumOptionalParams => 0, ParamList =>[ ] }, }, # end of 'Methods' Properties => { }, # end of 'Properties' ); # end of %TypeLib =end PerlCtrl SOAP-Lite-1.19/examples/COM/soap.asp000644 000770 000024 00000000736 12567356463 017274 0ustar00phredstaff000000 000000 <% ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) ' Path to Perl modules can be specified ' as '/PATH/TO/MODULES' or as 'drive:/PATH/TO/MODULES' Response.ContentType = "text/xml" Response.Write(Server.CreateObject("SOAP.Lite") _ .server("SOAP::Server") _ .dispatch_to("/Your/Path/To/Deployed/Modules") _ .handle(Request.BinaryRead(Request.TotalBytes)) _ ) %> SOAP-Lite-1.19/examples/COM/soap.vbs000644 000770 000024 00000001015 12567356463 017272 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) ' Doesn't require web server ' Path to Perl modules can be specified ' as '/PATH/TO/MODULES' or as 'drive:/PATH/TO/MODULES' call CreateObject("SOAP.Lite") _ .server("SOAP::Transport::HTTP::Daemon", _ "LocalAddr", "localhost", _ "LocalPort", 80) _ .dispatch_to("/Your/Path/To/Deployed/Modules") _ .options(CreateObject("SOAP.Lite").hash("compress_threshold", 10000)) _ .handle SOAP-Lite-1.19/examples/COM/soap_perl.asp000644 000770 000024 00000000741 12567356463 020312 0ustar00phredstaff000000 000000 <%@Language=PerlScript%> <% # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- # SOAP server. requires SOAP.Lite COM object (regsvr32 Lite.dll) # Path to Perl modules can be specified as '/PATH/TO/MODULES' $Response->{ContentType} = "text/xml"; $Response->Write($Server->CreateObject("SOAP.Lite") -> server("SOAP::Server") -> dispatch_to("/Your/Path/To/Deployed/Modules") -> handle($Request->BinaryRead($Request->{TotalBytes})) ); %> SOAP-Lite-1.19/examples/COM/states.html000644 000770 000024 00000002104 12567356463 020005 0ustar00phredstaff000000 000000 JavaScript SOAP::Lite for COM Examples

SOAP::Lite Examples



<script language="javascript"><!--

var objPerlCOM = new ActiveXObject("SOAP.Lite");
var SOAP = objPerlCOM.create();
SOAP.proxy("http://localhost/")
    .uri("http://www.soaplite.com/My/Examples");

function getStateName (form) {
  form.result.value = SOAP.getStateName(form.state.value).result();
}

//--></script>
SOAP-Lite-1.19/examples/COM/states.pl000644 000770 000024 00000000547 12567356463 017465 0ustar00phredstaff000000 000000 #!perl -w #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use Win32::OLE; $soap = Win32::OLE->CreateObject('SOAP.Lite')->new or die "SOAP::Lite for COM is not installed"; $soap->proxy('http://localhost/') ->uri('http://www.soaplite.com/My/Examples'); print $soap->getStateName(shift || 25)->result; SOAP-Lite-1.19/examples/COM/states.vba000644 000770 000024 00000001145 12567356463 017615 0ustar00phredstaff000000 000000 Function GetSOAPObject() As Object Static SOAPObject As Object If SOAPObject Is Nothing Then Set SOAPObject = CreateObject("SOAP.Lite").new If SOAPObject Is Nothing Then MsgBox ("Oops, no SOAP.Lite on this machine") Exit Function End If SOAPObject.proxy("http://localhost/").uri ("http://www.soaplite.com/My/Examples") End If Set GetSOAPObject = SOAPObject End Function Sub GetStateNameRemotely() Application.StatusBar = "Running SOAP call..." Range("Current").FormulaR1C1 = GetSOAPObject.getStateName(Sheet1.TextBox1.Value).result Application.StatusBar = False End Sub SOAP-Lite-1.19/examples/COM/states.vbs000644 000770 000024 00000000337 12567356463 017641 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- MsgBox CreateObject("SOAP.Lite").new( _ "proxy", "http://localhost/", _ "uri", "http://www.soaplite.com/My/Examples" _ ).getStateName(2).result SOAP-Lite-1.19/examples/COM/states.xls000644 000770 000024 00000104000 12567356463 017645 0ustar00phredstaff000000 000000 аЯрЁБс>ўџ ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ§џџџ ўџџџ'0 !"#$%&(6)*+,-./1ўџџџ2745ўџџџB8A:;<=>?@3ўџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ РFpОjuШРЊ€ШРGWorkbookџџџџ(_VBA_PROJECT_CUR"џџџџџџџџPъШР |ШРCtls џџџџџџџџXўџџџ  !"#$%&'()*+,-./0123456789:;<=ўџџџ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ўџџџ^_`abcdўџџџfgўџџџijklmnopqrstuvwxyz{|}~€в‹BьЮž Њ`ѓ@€H€,€мF25$5€УLucida Sans Unicode„ фˆВ Р (++џџ#ˆЖџџџџџџџџ<џџ-ЉђgrŠ]F‰Cћюqњ{bРF|[ТPЬДfMОsє Ы)^Rџџџџџџџџџџџџx|[ТPЬДfMОsє Ы)^R-ЉђgrŠ]F‰Cћюqњ{bџџMEџџџџџџџџџџпџџ8џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ ЏЭЩ@сАСт\peScout.com LLC BАaР=гК ThisWorkbookœЏМ=xZx<|)8X@"Зк1ШџArial1ШџArial1ШџArial1ШџArial16ШџLucida Sans Unicode1Ш Arial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)*Є%"$"#,##0.000000_);\("$"#,##0.000000\)Ѕ0.00_);\(0.00\)І "$"#,##0.00&Ї!"$"#,##0.0000_);\("$"#,##0.0000\) Ј#,##0.0000_);\(#,##0.0000\)Љ0.00_);[Red]\(0.00\)Њ0.0000_);[Red]\(0.0000\)рѕџ Р рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР рѕџ єР р Р р+ѕџ јР р)ѕџ јР р,ѕџ јР р*ѕџ јР рєџєР р ѕџ јР р Р р#Р р!Р рЊ#œР рІ Р рЉ Р рЉ œР р Р р Р рI Р “€џ“€џ“€џ“€џ“€џ“€џ“€џ`…q Sheet1ŒЎўџўџCurrent:# GetStateNameRemotelyСС`iыз№Я№ №u"№mиYFTжй)QAJtІџI\@=№AиYFTжй)QAJtІl 08ж&3ўxк­U=LAўfv.xо9N1‡†pЩq@0$M<Ѓhˆ˜‘ФRТQ\B СЅмТТ’вжиheЋ……vж&v&H rЩњоќьЮ].ZxГyЛѓц§~3oо ›HЦ бˆУПяоH Иxї АйThНmУ'ђ€Њ~ЖЫОљ_{ hВœшіЭЅє йцнЇ‹XэЋрРћA\Ю&ŽEŠx`PBI€ДХ,уњи/IЂ(2њђD~0о;AйŒ’WF–ЌтЅЕ У0ЖŽоˆВD‹%ЃБх—ЯcKщш “ыК–гjеZVЋеивsєrЪRДX–‰dЧр™Œ|fѓzУЅz*х3ТкHСSозyiн} Б ЙМЛ^Џ­Wж;ХеF}}ЋЖчK‡V˜3ЙњЪSПЪcHХє‘Іhќі)г,цRH)э)EžВ>ЭЅQ†h–hдьЎЫоŽvљ„ё3E”WЇЁ‡>`вФтѕeЂšЉkЗО-/bŸnе†з:Я;ЦwХЙC6–јЯЋДЊbЌВ-;†Й0љtЋнѓŠулђнТъ^пБЋчфaуU VЫ Уw +ћš6_—яVп№К+$X§Ж<,х:№нР*?‹Эђх.`§зН3˜љ?09ICгfрїuM­љK‡l=,пiЃ—uzУ}ЂmЁ;уmhщŠК/bыЈгўЌЁˆz7АCГUњжIВE’П"? :Џы ^пФдбЫІвс[НП0†уСœB[rњPЩЩЃфрrzoЦЬџdЧД`3 №П Р@@ё  їќa#Enter number of state here (1..50):Missouri%Local server test (http://localhost/)џ  ЏЭЩ@ У  dќЉёвMbP?_*+‚€%џСƒ„M’\\CORLSFP01\HP LaserJet 4050 SeмДWъ odXLetterPRIVр''''=ЪџЁ"dXр?р?U} $ } ’ } $ } $ } $   џ џ џ џ џ џ џ џ џ џ§ О § § О  О  О О О О зrД ьТ№L№ №4№( №ƒAП №№r’ № ƒ №0€("П CƒCПР@П№ѓт3-№],@("и \ь!9ь №Ж$<Get State Name<`хьŠ№‚’ № “ №HПA ?ПР@џ€УПTextBox1№lёf<№]Z ( \1 0d"ЬнForms.TextBox.1X>Д@я7К Sheet1 VBAџџџџџџџџ №pШР ‘]ШРThisWorkbookџџџџ џџџџфSheet1 џџџџџџџџ>Н__SRP_5џџџџ]Ьџџџџџџџџџџ [LџџџџSџџџџS”џџџџ6"џџџџ<<џџ<џџ<џџ<џџ<џџ< џџ<$џџ<(џџ<,џџ<0џџ<4џџ<џџџџџџN0{00020819-0000-0000-C000-000000000046}p џџџџ8и0џџџџџџџџџџџџШљ@џџџџџџџџ˜„€ўџџџџџџџhџџ@џџџџџџџџ%џџџџƒўџџџџџџџ џџџџџџџџџџџџџџ %‚ џџџџўџџџаџџўџџџџџџџџџџџ % 8 0 џџџџџџџџџџџџ(џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€џџџџ $*.ng  xxџџџ џџ @ўџhџџџ џџ @ўџXџџџ џџ @ўџHџџџ џџ @ўџ8џџџ џџ H(џџџ џџ  џџџ џџ@ўџџџџ џџ @ўџјўџџ џџ @ўџшўџџ џџ @ўџиўџџ џџ @ўџШўџџ џџ @ўџИўџџ џџ @ўџЈўџџ џџ @ўџ˜ўџџ џџ @ўџˆўџџ џџ @ўџxўџџ џџ @ўџhўџџ џџ @Ј@Xўџџ џџ @ўџHўџџ џџ @ўџ8ўџџ џџ @ўџ(ўџџ џџ @@ўџџ џџ @ўџўџџ џџ @ўџј§џџ џџ @ўџш§џџ џџ @h@и§џџ џџ @ўџШ§џџ џџ @ўџИ§џџ џџ @ўџЈ§џџ џџ @Ш@˜§џџ џџ @ўџˆ§џџ џџ @ўџx§џџ џџ @ўџh§џџ џџ @(@X§џџ џџ @ўџH§џџ џџ @ўџ8§џџ џџ @ўџ(§џџ џџ @ˆ@§џџ џџ @ўџ§џџ џџ @ўџјќџџ џџ @ўџшќџџ џџ @ш@иќџџ џџ @ўџШќџџ џџ @ўџИќџџ џџ @ўџЈќџџ џџ @H@˜ќџџ џџ @ўџˆќџџ џџ @ўџxќџџ џџ @ўџhќџџ џџ @Ј@Xќџџ џџ @ўџHќџџ џџ @ўџ8ќџџ џџ @ўџ(ќџџ џџ @@ќџџ џџ @ўџќџџ џџ @ўџјћџџ џџ @ўџшћџџ џџ @h@ићџџ џџ @ўџШћџџ џџ @ўџИћџџ џџ @ўџЈћџџ џџ @Ш@˜ћџџ џџ @ўџˆћџџ џџ @ўџxћџџ џџ @ўџhћџџ џџ @(@Xћџџ џџ @ўџHћџџ џџ @ўџ8ћџџ џџ @ўџ(ћџџ џџ @ˆ@ћџџ џџ @ўџћџџ џџ @ўџјњџџ џџ @ўџшњџџ џџ @ш@ињџџ џџ @ўџШњџџ џџ @ўџИњџџ џџ @ўџЈњџџ џџ @H @˜њџџ џџ @ўџˆњџџ џџ @ўџxњџџ џџ @ўџhњџџ џџ @Ј @Xњџџ џџ @ўџHњџџ џџ @ўџ8њџџ џџ @ўџ(њџџ џџ @ @њџџ џџ @ўџњџџ џџ @ўџјљџџ џџ @ўџшљџџ џџ   џџџџрH иљџџ џџ џџџџ џџџџ8 џџџџШљџџ џџ ˜џџџџ( џџџџ` џџџџџџџџџџџџ@џџџџџџџџџџџџџџџџџџџџ@џџџџџџџџџџџџЈx@˜˜џџџџџџџџџџџџџџџџџџџџџџJВ;$*\Rffff*073bb318aeпџџџџ4ўЪ€ џџџџџџџџџџџџџџџџh џџџџВАAttribute VB_Name = "ThisWorkbook" ŒBasŒ0{00020P819-0C$0046} |GlobalаSpac’False dCreatablPredeclaIdБTru BExposeTemplateDeriv’BustomizD2 $Р\!Б++џџcˆЖџџџџџџџџDџџц:TБЎ„I—dэЗ’МђŸ РF3Рl4gIŸг‘HЙ*цџџџџџџџџџџџџx TextBox1, 7, 2, MSForms, TextBox3Рl4gIŸг‘HЙ*цц:TБЎ„I—dэЗ’МђŸџџMEџџџџџџџџџџпџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџPSLџџџџSџџџџS”џџџџ sџџџџ6"џџџџ<џџ<џџ<џџџџџџN0{00020820-0000-0000-C000-000000000046}`и€ўџџџџџџџ(џџџџџџџџџџ% %*€џџџџ80@џџџџџџџџ№ƒўџџџџџџџџџџџџџџџџџџџџџ%‚ џџџџўџџџРџџўџџџџџџџџџџџ%џџџџ0џџџџШџџџџаџџџџ8џџџџhhp rџџџџ`џџџџџџџџџџџџ|џ џџџџe(œiƒўџџџџџџџџџџџџџџџџџ џџˆАџџџџјџџџџ@@џџџџџџџџџџџџШ`џџЄ€џџџџџџџџ№џџџџ џџџџрџџџџиџџџџјџџџџ €џџџџИџџџџxџџџџ џџџџџџџџ˜џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ8џџџџџџџџ8џџџџџџџџџџџџ8џџџџџџџџ˜hH,џџџџџџџџџџџџџџџџџџџџџџрJВ;*\R8003*#5f$*\Rffff*473bb24a9aпџџџџ48<ўЪ" € џџџџ џџџџx–oџџџџџџџџџџБAttribute VB_Name = "She@et1" шBast0{000Р20820- C$0046} |Global!ФSpac’False dCreatablPre declaIdЋTru BExposeTemplateDeriv$’Bustom izD2Control–TextBox1, 7, 2, MSFo`rms,  „P6: Sub CommandButton2_Click()  End rU€€€  i&Q ‘&џџџџ 4Ё aЩ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ <Щщ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€EyЯ0 ќЦ  8 ArU€€€ џџџџџџџџH$Й`(џџџџџџџџџџ Ёџџџџ@С8n__SRP_4џџџџџџџџџџџџeŽModule1џџџџh2__SRP_3 џџџџЅB__SRP_2џџџџџџџџџџџџГŒl ь@џџџџv Z +Р*џџЖџџџџџџџџџџџџџџ џџ`џџџџ`џџMEџџџџџџџџџџпџџ,џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ > џџџџLџџџџLџџџџLџџџџџџџџџџџџš"џџџџLџџџџLџџџџ”џџџџџџџџ<0џџ<4џџ<8џџ<<џџ<џџџџџџP џџџџЈPџџџџ%`@џџџџxџџџ џџџџџџ@џџџ@џџџџџџџџpр„Fџџџџџџ џџ@0џџƒ0џџџџџџџџџџџџџџџџџџџџ+@P`џџџџџџџџшјўkџџџџ џџџџ Œ€џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџXџџџџџџџџџџџџ џџџџаџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆ0џџџџ*Pџџ џџџџ@ўџИhџџџ џџ ‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄўџџџІЇЈЉЊЋЌ­ЎЏАБВўџџџДЕўџџџЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєўџџџіїјљњћќ§ўџ€@ўџXџџџ џџ h@ўџшHџџџ џџ @ўџ8џџџ џџ @ўџ@(џџџ џџ @ўџXџџџ џџ џџџџР@ўџџџџџџџџ џџ џџџџ@ўџџџџџјўџџ џџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ(Xџџџџ@џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ$@  џџџџ@ўџpxџџџ џџ џџџџ@ўџ hџџџ џџ џџџџ@ўџˆXџџџ џџ џџџџ@ўџаTџџџ џџ џџџџ@ўџшDџџџ џџ џџџџ@ўџИ4џџџ џџ @ўџ$џџџ џџ @ўџџџџџ џџџ џџ 0@ўџџџџџџџџ џџ @ўџџџџџџџџ џџ (№ўџџ џџ фўџџ џџ џџџџА lџџџџ`џџџџџџџџpџkџџџџџџџџџџ „ИИџџџ џџ ‘ьџџџџшџџџџаџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ0џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆџџџџи@  џџ vишxџџџ џџ v;@ўџhџџџ џџ H@Xџџџ џџ HTџџџ џџ @ўџDџџџ џџ @ўџ4џџџ џџ @ўџ$џџџ џџ и( џџџ џџ @ўџџџџ џџ $@ўџџџџ џџ nsџџџџиџџџџЈџџџџџџџџџџџџџџџџџџџџPџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€ џџџџџџџџџџџџџџџџџџџџџџџџџџџџJВ;$*\Rffff*483bb24a9c*\R1*#b3*\R1*#c4*\R1*#c0*\R1*#175*\R8003*#44$*\Rffff*473bb24a9a*\R1*#b3*\R1*#c4*\R1*#229*\R0*#14пўЪBˆЈ А-` Р.+аP)(  € џџџџ" &0g0 %€€ џџџџ€ џџџџџџџџЈ–Ј–PЖRunning SOAP call... $(& !! @%d!fЖCurrent$ ("эЖ SOAP.Lite$*!.F LЗ $(&oџџаџџџџШiџџ0]€ђX FАœˆќ:xќ FАœ Ж"Oops, no SOAP.Lite on this machineA@Pkkzџџ э F.@APObjeЖ#http://www.soaplite.com/My/ExamplesЖhttp://localhost/ F%RB@Tџџџџhџџџџpџџџџџџџџ@џџџџ€џџџџ˜џџџџЮБAttribute VB_Name = "Module1" Function GetSOAPObject() As , €Static @ stdo€le f%\*\G{00€020430-C 0046}#2.0#0#C:\WINNT\System32\c2.tlўџџџўџџџўџџџ     ўџџџўџџџўџџџўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџb#OLE Automation#^€MSForms>!SFEr ms3€DD452EE1-E08F-101A-8-02608C4D0BB4DFM20.DLL#Micr@osoft ‚9 €\ ObЌ Library/;§C1€„sˆˆ 00}#0‚#€Ѓj0ІˆРACAC1657D-258A-492E-A3DA-17ABE20 C93886DOCUME~1\pvk001\LOCALSРTemp\Excel8.0\ФT.exdр<€"€с.E р….`ŒM ДA УŠOfficФŠOР‡fiдcТŠР †РA22DF8D04C-5BFР/01B -BDE5РJAA5Р‰4Р2H2@Дgram Files\f\„MSOь97Œnƒ Р9Ьn"E€ТЮТ+ТИThisWorkbookGDР ThР1sDW‚›kbРoPkЮ 2к QРHB1Тм.-@ВB,Т!+*"B+BТрSh eet1Gт S тe`*t1 !tЃЖ2Ўя ЗРэ ь С"module#mКo€~u‚~A2DqC Џ` ­Р*!ЈbrU€€€€~~~~w џџџџџџџџџџџџџџџџ   щЁ  й TextBox1 й1 ( щЩ8`њ…ŠA’  фџџџџThisWorkbookThisWorkbookSheet1Sheet1Module1Module1™Й&а№9chop $csv;  p # $csv contains a comma-delimited quote.  p my @quote = split(',', $csv);  p if ($quote1 eq 0 and $quote[2] eq 'N/A') {  p return ['UNKN', 'UNKN'];  p } else {  p return [ @quote[1,2] ];  p }  p} й џџџџ` €ц:TБЎ„I—dэЗ’МђŸ3Рl4gIŸг‘HЙ*ц  E4 $Making SOAP call ( )...endpoint e Fhttp://www.soaplite.com/My/Examples "http://localhost/ proxyuriVBE6.DLL й џџџџЬ А й џџџџS а  иРFџ…КjROH‘AЎYh;PROJECTwmџџџџџџџџџџџџVPROJECTџџџџWSummaryInformation(џџџџрDocumentSummaryInformation8џџџџџџџџџџџџєID="{DE18C1B6-263F-11D2-B45D-0800365DA902}" Document=ThisWorkbook/&H00000000 Document=Sheet1/&H00000000 Package={AC9F2F90-E877-11CE-9F68-00AA00574A4F} Module=Module1 Name="VBAProject" HelpContextID="0" VersionCompatible32="393222000" CMG="C6C47EBA82464C4A4C4A4C4A4C4A" DPB="8C8E34803C473D473D47" GC="5250EACEB1CFB1CF4E" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 &H00000002={00020818-0000-0000-C000-000000000046};Excel8.0;&H00000000 [Workspace] ThisWorkbook=-19, 14, 828, 660, C Sheet1=-11, 61, 646, 521, C Module1=21, 14, 749, 636, ўџр…ŸђљOhЋ‘+'Гй0А@H`x  œЈф Brian JepsonxeScout.com LLC Microsoft Excel@дмїKКН@€р.ШРўџеЭеœ.“—+,љЎ0Ф PXd lt|„ Œ Ÿ“K*mџџџџrU€€€~~~~~~~~~~~~~~~~~@ Н+ѓ5њ™B….њ…ŠA’  фџџџџƒ џџџџџџџџџџџџџџЙƒŠa ‘ џџџџY џџсˆa ™Й&а№9aљбщ сс ThisWorkbookSheet1Module1 VBAProjectяРF /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBA 1џџџџ YС0РF8D:\apps\Program Files\Microsoft Office\Office\EXCEL9.OLBExcel )џџџџQб@0РFC:\WINNT\System32\stdole2.tlbstdoleв‹BьЮž Њ`ѓ AџџџџiБPс.E р….`ŒM ДC:\WINNT\System32\FM20.DLLMSForms aa‰Щ`}eСЪŠ%.IЃкЋт “ˆ5C:\DOCUME~1\pvk001\LOCALS~1\Temp\Excel8.0\MSForms.exd 9aaЩpLај-њ[НхЊDоR 2C:\Program Files\Microsoft Office\Office\MSO97.DLLOffice 1џџџџYЩ€ GetSOAPObjectGetStateNameRemotely  SOAP.Litenew DOops, no SOAP.Lite on this machine Fhttp://www.soaplite.com/My/Examples "http://localhost/ proxyuriVBE6.DLL й џџџџЬ А й џџџџS а  иРFџ…КjROH‘AЎYh; РFќb^ D‡ѕkПh{#DРF WorksheetTextBox1в‹BьЮž Њ`ѓв‹BьЮž Њ`ѓCommandButton2_Click H88 LFetching quote from quote.yahoo.com...РFйРFq ™ џџџџеРFgetStateName result Currentq @ (Running SOAP call...кРF]ЗћК$Ц2KЛфђb м>РF6ЫючГDЎztЧŸ0DРFWorkbook Workbook_Open @  Previous NumberOfShares .Initializing PerlCOM... PerlCOM.Script use LWP::Simple;EvalScript psub getPrice { &Making SOAP call...  p  p my $sym = shift; # get the symbol  p # Construct the URL  p my $url = qq[http://quote.yahoo.com/d/quotes.csv] .  p qq[?s=$sym&f=sl1p&e=.csv];  p # Fetch the URL.  p my $csv = get($url);  p # Two extraneous characters appear at the  p # end of the line - let's delete them.  p chop $csv; фSMT  Sheet1  Worksheetsўџ џџџџ РFMicrosoft Excel WorksheetBiff8Excel.Sheet.8є9ВqCompObjџџџџџџџџџџџџfџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџSOAP-Lite-1.19/examples/COM/temper.vbs000644 000770 000024 00000000421 12567356463 017624 0ustar00phredstaff000000 000000 ' -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to remote SOAP server MsgBox CreateObject("SOAP.Lite").new( _ "proxy", "http://services.soaplite.com/temper.cgi", _ "uri", "http://www.soaplite.com/Temperatures" _ ).c2f(37.5).result SOAP-Lite-1.19/examples/COM/xmlrpc.vbs000644 000770 000024 00000000362 12567356463 017641 0ustar00phredstaff000000 000000 ' -- XMLRPC::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- ' Connect to remote XMLRPC server MsgBox CreateObject("SOAP.Lite").xmlrpc( _ "proxy", "http://betty.userland.com/RPC2" _ ).call("examples.getStateName", 25).result SOAP-Lite-1.19/bin/SOAPsh.pl000644 000770 000024 00000005345 12567356463 015574 0ustar00phredstaff000000 000000 #!/bin/env perl #!d:\perl\bin\perl.exe # -- SOAP::Lite -- soaplite.com -- Copyright (C) 2001 Paul Kulchenko -- use strict; use SOAP::Lite; use Data::Dumper; $Data::Dumper::Terse = 1; $Data::Dumper::Indent = 1; @ARGV or die "Usage: $0 proxy [uri [commands...]]\n"; my($proxy, $uri) = (shift, shift); my %can; my $soap = SOAP::Lite->proxy($proxy)->on_fault(sub{}); $soap->uri($uri) if $uri; print STDERR "Usage: method[(parameters)]\n> "; while (defined($_ = shift || <>)) { next unless /\w/; my($method) = /\s*(\w+)/; $can{$method} = $soap->can($method) unless exists $can{$method}; my $res = eval "\$soap->$_"; $@ ? print(STDERR join "\n", "--- SYNTAX ERROR ---", $@, '') : $can{$method} && !UNIVERSAL::isa($res => 'SOAP::SOM') ? print(STDERR join "\n", "--- METHOD RESULT ---", $res || '', '') : defined($res) && $res->fault ? print(STDERR join "\n", "--- SOAP FAULT ---", $res->faultcode, $res->faultstring, '') : !$soap->transport->is_success ? print(STDERR join "\n", "--- TRANSPORT ERROR ---", $soap->transport->status, '') : print(STDERR join "\n", "--- SOAP RESULT ---", Dumper($res->paramsall), '') } continue { print STDERR "\n> "; } __END__ =head1 NAME SOAPsh.pl - Interactive shell for SOAP calls =head1 SYNOPSIS perl SOAPsh.pl http://services.soaplite.com/examples.cgi http://www.soaplite.com/My/Examples > getStateName(2) > getStateNames(1,2,3,7) > getStateList([1,9]) > getStateStruct({a=>1, b=>24}) > Ctrl-D (Ctrl-Z on Windows) or # all parameters after uri will be executed as methods perl SOAPsh.pl http://soap.4s4c.com/ssss4c/soap.asp http://simon.fell.com/calc doubler([10,20,30]) > Ctrl-D (Ctrl-Z on Windows) =head1 DESCRIPTION SOAPsh.pl is a shell for making SOAP calls. It takes two parameters: mandatory endpoint and optional uri (actually it will tell you about it if you try to run it). Additional commands can follow. After that you'll be able to run any methods of SOAP::Lite, like autotype, readable, encoding, etc. You can run it the same way as you do it in your Perl script. You'll see output from method, result of SOAP call, detailed info on SOAP faulure or transport error. For full list of available methods see documentation for SOAP::Lite. Along with methods of SOAP::Lite you'll be able (and that's much more interesting) run any SOAP methods you know about on remote server and see processed results. You can even switch on debugging (with call something like: C) and see SOAP code with headers sent and received. =head1 COPYRIGHT Copyright (C) 2000 Paul Kulchenko. All rights reserved. =head1 AUTHOR Paul Kulchenko (paulclinger@yahoo.com) =cut SOAP-Lite-1.19/bin/stubmaker.pl000644 000770 000024 00000006525 12567356463 016475 0ustar00phredstaff000000 000000 #!/usr/bin/env perl #!d:\perl\bin\perl.exe # # Filename: stubmaker.pl # Authors: Byrne Reese # Paul Kulchenko # # Copyright (C) 2005 Byrne Reese # # Usage: # stubmaker.pl -[vd] ################################################### use SOAP::Lite; use Getopt::Long; my $VERBOSE = 0; my $DIRECTORY = "."; GetOptions( 'd=s' => \$DIRECTORY, 'v' => \$VERBOSE, help => sub { HELP_MESSAGE(); }, version => sub { VERSION_MESSAGE(); exit(0); }, ) or HELP_MESSAGE(); HELP_MESSAGE() unless $ARGV[0]; my $WSDL_URL = shift; print "Writing stub files...\n" if $VERBOSE; my %services = %{SOAP::Schema->schema_url($WSDL_URL) ->cache_ttl(1) ->cache_dir($DIRECTORY) ->parse() ->load ->services}; Carp::croak "More than one service in service description. Service and port names have to be specified\n" if keys %services > 1; sub VERSION_MESSAGE { print "$0 $SOAP::Lite::VERSION (C) 2005 Byrne Reese.\n"; } sub HELP_MESSAGE { VERSION_MESSAGE(); print < options: -v Verbose Outputbe quiet -d Output directory EOT exit 0; } __END__ =pod =head1 NAME stubmaker.pl - Generates client stubs from a WSDL file. =head1 OPTIONS =over =item -d Specifies the directory you wish to output the files to. The directory must already exist. =item -v Turns on "verbose" output during the code stub generation process. To be honest, there is not much the program outputs, but if you must see something output to the console, then this fits the bill. =item --help Outputs a short help message. =item --version Outputs the current version of stubmaker.pl. =back =cut =head1 STUB FILES =head2 STUB SUBROUTINES The "class" or "package" created by stubmaker.pl is actually a sub-class of the core SOAP::Lite object. As a result, all methods one can call upon L one can also call upon generated stubs. For example, suppose you wanted to obtain readable output from the generated stub, then simply call C on the stub's instance. See the example below. The following subroutines are unique to generated stub classes, and help the user control and configure the stub class. =over =item want_som(boolean) When set to 1, SOAP::Lite will return SOAP::SOM objects to the user upon invoking a method on a remote service. This is very helpful when you need to check to see if the return value is a SOAP::Fault or not. When set to 0, SOAP::Lite will return the return value of the method. =back =cut =head1 EXAMPLES =head2 Invoking stubmaker.pl from the command line > perl stubmaker.pl http://www.xmethods.net/sd/StockQuoteService.wsdl Or: > perl "-MStockQuoteService qw(:all)" -le "print getQuote('MSFT')" =head2 Working with stub classes Command line: > perl stubmaker.pl http://ws1.api.re2.yahoo.com/ws/soap-demo/full.wsdl File: echo.pl > use full; > use SOAP::Lite +trace => qw( debug ); > my $f = new full; > $f->use_prefix(0); > $f->readable(1); > $f->want_som(1); > $som = $f->echoViaBase64("foo"); =head1 COPYRIGHT Copyright (C) 2000-2005 Paul Kulchenko. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.