SoapHandler.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* SoapHandler.qm Copyright (C) 2012 - 2016 David Nichols
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// make sure we have the required qore version
// requires XML functionality
// requires the WSDL module
// need mime definitions
// need definitions from the HttpServerUtil
// need Util functions
// do not use $ for vars
// require type declarations everywhere
// do not ignore errors in call arguments
namespace SoapHandler {
class SoapHandler : public AbstractHttpRequestHandler {
public:
const Version = "0.2.5";
private :
hash methods;
// service name -> WebService objects
hash wsh;
// operation name -> WebService object
hash owsh;
// lookup service name -> alternate paths
hash plh;
// lookup alt path -> WebService object
hash wsph;
// soapaction map: action -> operation
hash sam;
// service -> soapaction
hash psam;
int loglevel;
// if True then verbose exception info will be logged
bool debug;
// a closure/call reference to get the log message and/or process arguments in incoming requests
*code getLogMessage;
// for atomicity when adding / removing methods
RWLock rwl();
// hash of methods by path
hash th;
public:
constructor(AbstractAuthenticator auth, *code n_getLogMessage, bool dbg = False);
addMethod(WebService ws, WSOperation op, any func, *string help, *int logopt, any cmark, *string path, any err_func, *string altpath);
setDebug(bool dbg = True);
bool getDebug();
removeService(string name);
// don't reimplement this method; fix/enhance it in the module
final private addMethodInternal(WebService ws, hash method);
private *hash help(hash cx);
// don't reimplement this method; fix/enhance it in the module
final private log(hash cx, string str);
// don't reimplement this method; fix/enhance it in the module
private:
static string makeSoapFaultResponse(bool soap12, string err, string desc, *bool fmt);
public:
// don't reimplement this method; fix/enhance it in the module
final private *hash callOperation(hash cx, any args, *string soapaction, bool reqsoap12);
// method called by HttpServer
// don't reimplement this method; fix/enhance it in the module
final hash handleRequest(hash cx, hash hdr, *data body);
private *WebService tryMatch(string path);
};
};
SoapHandler
main SoapHandler namespace
Definition: SoapHandler.qm.dox.h:82