SoapHandler.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* SoapHandler.qm Copyright (C) 2012 - 2018 Qore Technologies, s.r.o.
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.6";
private :
// method mappings: method name -> method hash
hash<auto> methods;
// reverse mappings for methods: unique_id -> method -> True
hash<string, hash<string, bool>> rmethods;
// URI path -> method name -> method mappings
hash<string, hash> uri_methods;
// reverse URI path method mappings: unique_id -> URI path -> method name -> true
hash<string, hash<string, hash<string, bool>>> ruri_methods;
// service name -> WebService objects
hash<string, WebService> wsh;
// reverse mapping to remove wsh mappings; unique_id -> path -> True
hash<string, hash<string, bool>> rwsh;
// operation name -> WebService object
hash<string, WebService> owsh;
// reverse operation mappings; unique_id -> op name -> true
hash<string, hash<string, bool>> rowsh;
// lookup URI path -> WebService object
hash<string, WebService> wsph;
// reverse URI path lookups: unique_id -> URI path -> true
hash<string, hash<string, bool>> rwsph;
// URI path -> SOAP Action -> method mappings
hash<string, hash<string, hash>> uri_sam;
// reverse URI path -> SOAP Action mappings: unique_id -> URI path -> SOAPAction -> true
hash<string, hash<string, hash<string, bool>>> ruri_sam;
// soapaction map: action -> binding -> operation
hash<string, hash> sam;
// reverse mapping: unique_id -> soapaction -> True
hash<string, hash<string, bool>> rsam;
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();
// path TreeMap for each HTTP method
hash<string, TreeMap> mapMethodPathToOperation;
// soapaction -> method -> binding
public:
constructor(AbstractAuthenticator auth, *code n_getLogMessage, bool dbg = False) ;
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);
setDebug(bool dbg = True);
bool getDebug();
removeService(string unique_id);
// don't reimplement this method; fix/enhance it in the module
private:
final addMethodInternal(WebService ws, hash<auto> method);
public:
private:
*hash<auto> help(hash<auto> cx);
public:
// don't reimplement this method; fix/enhance it in the module
private:
final log(hash<auto> cx, string str);
public:
private:
nothing msglog(hash<auto> cx, hash<auto> msg);
public:
// don't reimplement this method; fix/enhance it in the module
private:
hash<auto> makeSoapFaultResponse(hash<auto> cx, string errLog, bool soap12, string err, string desc, *bool fmt);
public:
// don't reimplement this method; fix/enhance it in the module
private:
final *hash<auto> callOperation(hash<auto> cx, auto args, hash<auto> method, bool reqsoap12);
public:
private:
*hash<auto> matchMethod(TreeMap tm, string path, reference unmatched);
public:
// method called by HttpServer
// don't reimplement this method; fix/enhance it in the module
final hash<auto> handleRequest(hash<auto> cx, hash<auto> hdr, *data body);
private:
*WebService tryMatch(string path);
public:
};
};
SoapHandler
main SoapHandler namespace
Definition: SoapHandler.qm.dox.h:93