XML::C...Server(3pm)
π NAME π
XML::Compile::SOAP::Server β server-side SOAP message processing π«Ά
bestie, this is the manual page for XML::C...Server(3pm), and yes we are about to make SOAP servers make sense. buckle up. β¨
πΈ INHERITANCE πΈ
XML::Compile::SOAP::Serveris extended byXML::Compile::SOAP11::ServerXML::Compile::SOAP12::Server
it's giving base-class energy, and the two SOAP-flavoured children are the main characters. π
β¨ SYNOPSIS β¨
# used by distribution XML::Compile::SOAP::Daemon
my $soap = XML::Compile::SOAP11::Server->new;
my $input = $soap->compileMessage('RECEIVER', ...);
my $output = $soap->compileMessage('SENDER', ...);
$soap->compileHandler
( name => $name, input => $input, output => $output
, callback => \$my_handler
);
my $daemon = XML::Compile::SOAP::HTTPDaemon->new(...);
$daemon->addHandler($type => $daemon);
look at that little pipeline. you compile the message in, you compile the message out, you wire up a handler with name, input, output and callback, and then your daemon picks it up with addHandler. no cap, that's the whole vibe. π₯
π DESCRIPTION π
this class defines the methods that every server for the SOAP message exchange protocols has to implement. like, it's the group chat rules everyone agrees to before they're allowed to talk. π¬
π METHODS π
π§ Instantiation
okay so plot twist: you can not actually instantiate this object. it only exists as a secondary base class. the primary class is the one that has to bring the new. π
XML::Compile::SOAP::Server->new(%options)
-Option--Default
role 'NEXT'
role => URIβ in SOAP1.1 the term for this is 'actor', but SOAP1.2 renamed it to 'role': it's the role [this daemon] plays in the transport protocol. please use the role abbreviations as provided by the protocol implementations when you can β they'll get translated into the right URI on time. seeXML::Compile::SOAP::roleAbbreviation()and the constants defined inXML::Compile::SOAP::Util. β
π Accessors
$obj->role()β returns the URI of the role (actor) of this server. that's it, that's the accessor. π
π Actions
$obj->compileFilter(%options)β this routine returns aCODEreference which can be used forcompileHandler(selector); so you can check whether a certain message has arrived. right now, only the firstbodyelement is used to figure that out. π
-Option--Default
body []
fault <undef>
header <undef>
style 'document'
body => ARRAY-of-TYPESfault => ARRAY-of-TYPESheader => ARRAY-of-TYPESstyle => 'rpc'|'document'
$obj->compileHandler(%options)β returns an HTTP status code and anXML::LibXML::Documentpair. iconic duo, honestly. π«Ά
-Option --Default
callback <fault: not implemented>
decode <undef>
encode <undef>
name <required>
selector sub {0}
callback => CODEβ as input, the SERVER object and the translated input message (the Perl version) are passed in. as output, you have to produce a suitable output structure. if the callback isn't set, then a fault message gets returned to the user. πdecode => CODEβ thisCODEreference decodes the (parsed) XML input message into the pure Perl request. the reference is a READER, created withXML::Compile::Schema::compile(). if no input decoder is specified, then the callback handler gets called with the un-decodedXML::LibXML::Documentnode. raw. πencode => CODEβ thisCODEreference encodes the Perl answer structure into the output message. the reference is a WRITER, created withXML::Compile::Schema::compile(). if no output encoder is specified, then the callback must return anXML::LibXML::Document, or only produce error messages. no in-between, bestie.name => STRINGβ the identification for this action, used for logging and stuff. when the action is created via a WSDL, the portname gets used here. it's a pity that the portname is not passed in the SOAP message, because it's not so easy to detect which handler must be called. πselector => CODEβ one way or the other, you have to figure out whether a message addresses a certain process. the callback only gets used if theCODEreference specified here returns a true value. theCODEreference gets called with the XML version of the message, and aHASHwhich contains the information about the XML collected withXML::Compile::SOAP::messageStructure()plus thesoap_versionentry. πΈ
XML::Compile::SOAP::Server->faultWriter()β returns aCODEreference which can be used to produce faults. for when things go wrong and you need to say so politely. β¨
β SEE ALSO β
this module is part of the XML-Compile-SOAP distribution version 3.28, built on August 01, 2022. website: http://perl.overmeer.net/CPAN/ π
π LICENSE π
copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>]. for other contributors see ChangeLog. π
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. see http://dev.perl.org/licenses/ π
and that's the whole page, bestie π this one was written for perl v5.34.0 and landed on 2022-08-04 β go forth and serve some SOAP, you've absolutely got this. slay. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-compile-soap-perl 3.28+ds-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms