Qore xml Module 2.0.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

 constructor (AbstractAuthenticator auth, *code n_getLogMessage, bool dbg=False)
 creates the handler with the given method list
 
 addMethod (WebService ws, WSOperation op, auto func, *string help, *int logopt, auto cmark, *string path, auto err_func, *string altpath, *string binding, *string unique_id)
 adds a method to the handler dynamically
 
 setDebug (bool dbg=True)
 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
 
 removeService (string unique_id)
 call to remove the given service
 

Public Attributes

const Version = "0.2.6"
 version of the SoapHandler implementation
 

Detailed Description

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

Member Function Documentation

◆ addMethod()

SoapHandler::SoapHandler::addMethod ( WebService  ws,
WSOperation  op,
auto  func,
*string  help,
*int  logopt,
auto  cmark,
*string  path,
auto  err_func,
*string  altpath,
*string  binding,
*string  unique_id 
)

adds a method to the handler dynamically

Parameters
wsthe WebService object for the method
opthe WSOperation object for the web service operation the method corresponds to
funca call reference, a closure, or a string function name to call with the deserialized arguments to the method; the return value will be serialized to SOAP according to the WSDL and sent back to the caller
helpoptional help text for the method
logoptlog options which can be used by a custom logger (see the getLogMessage parameter in the constructor)
cmarkan optional "context marker" for the method
pathan optional path for the method (assumed to be the name of the service)
err_funca call reference, a closure, or a string function name to call with error information if an exception is thrown with SOAP data
altpathan alternate path for the service / WSDL
bindingSOAP binding name, leave empty to use the first assigned binding
unique_idthe unique ID for the backend service implementation for all operations on this WSDL; necessary for any removeService() call

◆ constructor()

SoapHandler::SoapHandler::constructor ( AbstractAuthenticator  auth,
*code  n_getLogMessage,
bool  dbg = False 
)

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

◆ removeService()

SoapHandler::SoapHandler::removeService ( string  unique_id)

call to remove the given service

Parameters
unique_idmust correspond to the unique_id in any addMethod() calls

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