29#include <sptk5/cthreads>
30#include <sptk5/net/HttpAuthentication.h>
52 , m_location(location)
61 : m_alias(other.m_alias)
62 , m_location(other.m_location)
80 std::scoped_lock lock(m_mutex);
81 m_alias = other.m_alias;
82 m_location = other.m_location;
93 std::scoped_lock lock(m_mutex);
103 std::scoped_lock lock(m_mutex);
108 mutable std::mutex m_mutex;
125 : m_logEngine(logEngine)
140 void processRequest(
const xdoc::SNode& xmlContent,
const xdoc::SNode& jsonContent,
150 return "Generic SPTK WS Request Broker";
168 return String(
"Not defined");
181 using RequestMethod = std::function<void(
const sptk::xdoc::SNode&,
const sptk::xdoc::SNode&,
194 virtual void requestBroker(
const String& requestName,
const xdoc::SNode& xmlContent,
const xdoc::SNode& jsonContent,
206 virtual void handleError(
const xdoc::SNode& xmlContent,
const xdoc::SNode& jsonContent,
226 void setRequestMethods(std::map<sptk::String, RequestMethod>&& requestMethods);
230 std::map<sptk::String, RequestMethod> m_requestMethods;
233using SWSRequest = std::shared_ptr<WSRequest>;
Definition: HttpAuthentication.h:41
Definition: LogEngine.h:60
Definition: WSRequest.h:43
Definition: WSRequest.h:118
virtual String title() const
Definition: WSRequest.h:148
String getLocation() const
Definition: WSRequest.h:101
virtual void logError(const sptk::String &requestName, const sptk::String &error, int errorCode) const
String getAlias() const
Definition: WSRequest.h:91
WSRequest(sptk::LogEngine *logEngine=nullptr)
Definition: WSRequest.h:124
virtual void handleError(const xdoc::SNode &xmlContent, const xdoc::SNode &jsonContent, const sptk::String &error, int errorCode) const
virtual ~WSRequest()=default
virtual String wsdl() const
Definition: WSRequest.h:166
WSNameSpace(const String &alias="", const String &location="")
Definition: WSRequest.h:50
WSNameSpace(const WSNameSpace &other)
Definition: WSRequest.h:60
virtual String defaultPage() const
Definition: WSRequest.h:158
void processRequest(const xdoc::SNode &xmlContent, const xdoc::SNode &jsonContent, HttpAuthentication *authentication, String &requestName)
virtual void requestBroker(const String &requestName, const xdoc::SNode &xmlContent, const xdoc::SNode &jsonContent, HttpAuthentication *authentication, const WSNameSpace &requestNameSpace)
~WSNameSpace() noexcept=default
xdoc::SNode findSoapBody(const xdoc::SNode &soapEnvelope, const WSNameSpace &soapNamespace)