GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XML::Compile::SOAP::Server(3) User Contributed Perl Documentation XML::Compile::SOAP::Server(3)

XML::Compile::SOAP::Server - server-side SOAP message processing

 XML::Compile::SOAP::Server is extended by
   XML::Compile::SOAP11::Server
   XML::Compile::SOAP12::Server

  # 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);

This class defines methods that each server for the SOAP message exchange protocols must implement.

This object can not be instantiated, but is only used as secundary base class. The primary must contain the "new".
XML::Compile::SOAP::Server->new(%options)
 -Option--Default
  role    'NEXT'
    
role => URI
In SOAP1.1, the term is 'actor', but SOAP1.2 has renamed this into 'role': the role [this daemon] plays in the transport protocol.

Please use the role abbreviations as provided by the protocol implementations when possible: they will be translated into the right URI on time. See XML::Compile::SOAP::roleAbbreviation() and the constants defined in XML::Compile::SOAP::Util

$obj->role()
Returns the URI of the role (actor) of this server.

$obj->compileFilter(%options)
This routine returns a CODE reference which can be used for compileHandler(selector); so see whether a certain message has arrived. On the moment, only the first "body" element is used to determine that.

 -Option--Default
  body    []
  fault   <undef>
  header  <undef>
  style   'document'
    
body => ARRAY-of-TYPES
fault => ARRAY-of-TYPES
header => ARRAY-of-TYPES
style => 'rpc'|'document'
$obj->compileHandler(%options)
Returns an HTTP status code and an XML::LibXML::Document pair.

 -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 (Perl version) are passed in. As output, a suitable output structure must be produced. If the callback is not set, then a fault message will be returned to the user.
decode => CODE
The CODE reference is used to decode the (parsed) XML input message into the pure Perl request. The reference is a READER, created with XML::Compile::Schema::compile(). If no input decoder is specified, then the callback handler will be called with the un-decoded XML::LibXML::Document node.
encode => CODE
The CODE reference is used to encode the Perl answer structure into the output message. The reference is a WRITER. created with XML::Compile::Schema::compile(). If no output encoder is specified, then the callback must return an XML::LibXML::Document, or only produce error messages.
name => STRING
The identification for this action, for instance used for logging. When the action is created via a WSDL, the portname will be used here.

It is a pity that the portname is not passed in the SOAP message, because it is 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 will only be used if the CODE reference specified here returns a true value.

The CODE reference will be called with the XML version of the message, and a HASH which contains the information about the XML collected with XML::Compile::SOAP::messageStructure() plus the "soap_version" entry.

XML::Compile::SOAP::Server->faultWriter()
Returns a CODE reference which can be used to produce faults.

This module is part of XML-Compile-SOAP distribution version 3.27, built on April 07, 2021. Website: http://perl.overmeer.net/CPAN/

Copyrights 2007-2021 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/

2021-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.