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.

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.

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.

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.

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.