Qore xml Module 2.1.0
Loading...
Searching...
No Matches
SoapHandler::SoapHandler Class Reference

SoapHandler implementation; to be registered as a request handler in the HttpServer class. More...

#include <SoapHandler.qm.dox.h>

Inherits AbstractHttpRequestHandler.

Public Member Methods

void constructor (AbstractAuthenticator auth, soft< code > n_getLogMessage, bool dbg, soft< int > n_max_message_size)
 creates the handler with the given method list
 
void setDebug (bool dbg)
 turns on or off debugging; when debugging is enabled more verbose error messages are reported
 
bool getDebug ()
 returns the current status of the debug flag
 
void setMaxMessageSize (soft< int > size)
 sets the maximum message size in bytes
 
soft< int > getMaxMessageSize ()
 returns the current maximum message size setting
 
nothing msglog (hash< auto > cx, hash< auto > msg)
 
auto dispatchSoapOperationCall (auto args, hash< auto > method, hash< auto > cx)
 Dispatches the SOAP operation call and returns the result for validation and serialization.
 

Public Attributes

const auto Version = ...
 version of the SoapHandler implementation
 

Detailed Description

SoapHandler implementation; to be registered as a request handler in the HttpServer class.

Member Function Documentation

◆ constructor()

void SoapHandler::SoapHandler::constructor ( AbstractAuthenticator  auth,
soft< code >  n_getLogMessage,
bool  dbg,
soft< int >  n_max_message_size 
)

creates the handler with the given method list

Parameters
authan authentication object (use new AbstractAuthenticator() for no authentication)
n_getLogMessagean optional closure or call reference to be called when an incoming request is received; if this is set then it will be called with the following arguments: a context hash (see HttpServer::AbstractHttpRequestHandler::handleRequest() for a description of the context hash), the method definition as passed in the methods argument to this constructor, and a reference to the arguments in this call
dbgthis parameter is set to True, then additional information will be logged when errors occur
n_max_message_sizeoptional maximum message size in bytes; if set, messages larger than this will be rejected with a 413 Payload Too Large response (recommended: 1048576 for 1MB, 10485760 for 10MB)

◆ getMaxMessageSize()

soft< int > SoapHandler::SoapHandler::getMaxMessageSize ( )

returns the current maximum message size setting

Returns
the maximum message size in bytes, or nothing if no limit is set

◆ msglog()

nothing SoapHandler::SoapHandler::msglog ( hash< auto >  cx,
hash< auto >  msg 
)

Method is to be overriden to implement custom logging HTTP messages handled by this object.

cx context passed from @ref HttpServer::HttpServer "HttpServer"
msg information about message to be logged. There are keys 'reason' with value 'request', 'response'
or 'error', 'header' (HTTP header, in casew ) and 'body' containing XML data in readable form, i.e. uncompressed and in case of multipart message only the related part is passed. The method is executed before the message is sent or after it has been received. This method must not throw exceptions.
Example:
private nothing msglog(hash<auto> cx, hash<auto> msg) {
log(sprintf("%s:\n%s\n", msg.reason, msg.body));
}
Since
SoapHandler 0.2.5

◆ setMaxMessageSize()

void SoapHandler::SoapHandler::setMaxMessageSize ( soft< int >  size)

sets the maximum message size in bytes

Parameters
sizethe maximum message size in bytes; if nothing, no limit is enforced

Messages exceeding this size will be rejected with a 413 Payload Too Large response.


The documentation for this class was generated from the following file: