1SOAP::Deserializer(3) User Contributed Perl DocumentationSOAP::Deserializer(3)
2
3
4
6 SOAP::Deserializer - the means by which the toolkit manages the
7 conversion of XML into an object manageable by a developer
8
10 SOAP::Deserializer provides the means by which incoming XML is decoded
11 into a Perl data structure.
12
14 context
15 This provides access to the calling context of
16 "SOAP::Deserializer". In a client side context the often means a
17 reference to an instance of SOAP::Lite. In a server side context
18 this means a reference to a SOAP::Server instance.
19
21 DESERIALIZING RAW XML INTO A SOAP::SOM OBJECT
22 A useful utility for SOAP::Deserializer is for parsing raw XML
23 documents or fragments into a SOAP::SOM object. SOAP::Lite developers
24 use this technique to write unit tests for the SOAP::Lite module
25 itself. It is a lot more efficient for testing aspects of the toolkit
26 than generating client calls over the network. This is a perfect way
27 for developers to write unit tests for their custom data types for
28 example.
29
30 Here is an example of how raw XML content can be parsed into a
31 SOAP::SOM object by using SOAP::Deserializer:
32
33 $xml = <<END_XML;
34 <foo>
35 <person>
36 <foo>123</foo>
37 <foo>456</foo>
38 </person>
39 <person>
40 <foo>789</foo>
41 <foo>012</foo>
42 </person>
43 </foo>
44 END_XML
45
46 my $som = SOAP::Deserializer->deserialize($xml);
47
49 Copyright (C) 2000-2004 Paul Kulchenko. All rights reserved.
50
51 This library is free software; you can redistribute it and/or modify it
52 under the same terms as Perl itself.
53
55 Byrne Reese (byrne@majordojo.com)
56
57
58
59perl v5.34.0 2022-01-21 SOAP::Deserializer(3)