sptk2 logo
SPTK Home Page
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
sptk::BaseWebServiceProtocol Class Referenceabstract
Inheritance diagram for sptk::BaseWebServiceProtocol:
sptk::WSProtocol sptk::WSWebServiceProtocol

Public Member Functions

 BaseWebServiceProtocol (TCPSocket *socket, const HttpHeaders &headers, sptk::WSServices &services, const URL &url)
 
- Public Member Functions inherited from sptk::WSProtocol
 WSProtocol (TCPSocket *socket, const HttpHeaders &headers)
 
 WSProtocol (const WSProtocol &)=delete
 
virtual ~WSProtocol ()
 
WSProtocoloperator= (const WSProtocol &)=delete
 
virtual RequestInfo process ()=0
 Process virtual method - to be implemented in derived classes. More...
 

Protected Member Functions

virtual std::shared_ptr< HttpAuthenticationgetAuthentication ()=0
 
virtual void generateFault (Buffer &output, HttpResponseStatus &httpStatus, String &contentType, const HTTPException &e, bool jsonOutput) const =0
 
xdoc::SNode processXmlContent (const char *startOfMessage, const xdoc::SNode &xmlContent) const
 
void processJsonContent (const char *startOfMessage, const xdoc::SNode &jsonContent, RequestInfo &requestInfo, HttpResponseStatus &httpStatus, String &contentType) const
 
String processMessage (Buffer &output, const xdoc::SNode &xmlContent, const xdoc::SNode &jsonContent, const SHttpAuthentication &authentication, bool requestIsJSON, HttpResponseStatus &httpResponseStatus, String &contentType) const
 
- Protected Member Functions inherited from sptk::WSProtocol
TCPSocketsocket ()
 
HttpHeaders & headers ()
 
String header (const sptk::String &name)
 

Static Protected Member Functions

static void RESTtoSOAP (const URL &url, const char *startOfMessage, const xdoc::SNode &message)
 
static xdoc::SNode findRequestNode (const xdoc::SNode &message, const String &messageType)
 

Protected Attributes

WSServicesm_services
 
const URL m_url
 

Member Function Documentation

◆ processMessage()

String sptk::BaseWebServiceProtocol::processMessage ( Buffer output,
const xdoc::SNode &  xmlContent,
const xdoc::SNode &  jsonContent,
const SHttpAuthentication &  authentication,
bool  requestIsJSON,
HttpResponseStatus httpResponseStatus,
String contentType 
) const
protected

Process request message, and store response to output

Parameters
outputOutput buffer
xmlContentInput message
authenticationAuthentication
requestIsJSONRequest is in JSON format
httpResponseStatusOutput HTTP response status
contentTypeOutput content type

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

Fri Oct 14 2022 09:58:32: SPTK 5.4.1