.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SOAP::WSDL::Factory::Deserializer 3pm" .TH SOAP::WSDL::Factory::Deserializer 3pm "2020-01-20" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" SOAP::WSDL::Factory::Deserializer \- Factory for retrieving Deserializer objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& # from SOAP::WSDL::Client: \& $deserializer = SOAP::WSDL::Factory::Deserializer\->get_deserializer({ \& soap_version => $soap_version, \& class_resolver => $class_resolver, \& }); \& \& # in deserializer class: \& package MyWickedDeserializer; \& use SOAP::WSDL::Factory::Deserializer; \& \& # register class as deserializer for SOAP1.2 messages \& SOAP::WSDL::Factory::Deserializer\->register( \*(Aq1.2\*(Aq , _\|_PACKAGE_\|_ ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" SOAP::WSDL::Factory::Deserializer serves as factory for retrieving deserializer objects for \s-1SOAP::WSDL.\s0 .PP The actual work is done by specific deserializer classes. .PP SOAP::WSDL::Deserializer tries to load one of the following classes: .IP "\(bu" 4 The class registered for the scheme via \fBregister()\fR .PP By default, SOAP::WSDL::Deserializer::XSD is registered for \s-1SOAP1.1\s0 messages. .SH "METHODS" .IX Header "METHODS" .SS "register" .IX Subsection "register" .Vb 1 \& SOAP::WSDL::Deserializer\->register(\*(Aq1.1\*(Aq, \*(AqMyWickedDeserializer\*(Aq); .Ve .PP Globally registers a class for use as deserializer class. .SS "get_deserializer" .IX Subsection "get_deserializer" Returns an object of the deserializer class for this endpoint. .SH "WRITING YOUR OWN DESERIALIZER CLASS" .IX Header "WRITING YOUR OWN DESERIALIZER CLASS" Deserializer classes may register with SOAP::WSDL::Factory::Deserializer. .SS "Registering a deserializer" .IX Subsection "Registering a deserializer" Registering a deserializer class with SOAP::WSDL::Factory::Deserializer is done by executing the following code where \f(CW$version\fR is the \s-1SOAP\s0 version the class should be used for, and \f(CW$class\fR is the class name. .PP .Vb 1 \& SOAP::WSDL::Factory::Deserializer\->register( $version, $class); .Ve .PP To auto-register your transport class on loading, execute \fBregister()\fR in your tranport class (see \s-1SYNOPSIS\s0 above). .SS "Deserializer package layout" .IX Subsection "Deserializer package layout" Deserializer modules must be named equal to the deserializer class they contain. There can only be one deserializer class per deserializer module. .SS "Methods to implement" .IX Subsection "Methods to implement" Deserializer classes must implement the following methods: .IP "\(bu" 4 new .Sp Constructor. .IP "\(bu" 4 deserialize .Sp Deserialize data from \s-1XML\s0 to arbitrary formats. .Sp \&\fBdeserialize()\fR must return a fault indicating that deserializing failed if any error is encountered during the process of deserializing the \s-1XML\s0 message. .Sp The following positional parameters are passed to the deserialize method: .Sp .Vb 1 \& $content \- the xml message .Ve .IP "\(bu" 4 generate_fault .Sp Generate a fault in the supported format. The following named parameters are passed as a single hash ref: .Sp .Vb 3 \& code \- The fault code, e.g. \*(Aqsoap:Server\*(Aq or the like \& role \- The fault role (actor in SOAP1.1) \& message \- The fault message (faultstring in SOAP1.1) .Ve .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright 2007 Martin Kutter. All rights reserved. .PP This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself .SH "AUTHOR" .IX Header "AUTHOR" Martin Kutter .SH "REPOSITORY INFORMATION" .IX Header "REPOSITORY INFORMATION" .Vb 4 \& $Rev: 176 $ \& $LastChangedBy: kutterma $ \& $Id: Serializer.pm 176 2007\-08\-31 15:28:29Z kutterma $ \& $HeadURL: https://soap\-wsdl.svn.sourceforge.net/svnroot/soap\-wsdl/SOAP\-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $ .Ve