Class SOAPReceiver

  • All Implemented Interfaces:
    jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

    public class SOAPReceiver
    extends jakarta.servlet.http.HttpServlet
    The SOAPReceiver class defines a SOAP Receiver which supports SOAP over HTTP binding. It receives requests sent from Client. During the startup, it will read RequestHandler from SOAP binding SM schema and store in a static HashMap. Each RequestHandler is associated with a unique key. When a web service client uses Client to send request, the SOAP URL must be in the format of 'this_servlet_URL>/key'. The SOAPReceiver will parse the SOAP URL to get the key and use it to find corresponding RequestHandler. After it is done processing, it will invoke RequestHandler.processRequest to let web service to do further processing.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SOAPReceiver()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doPost​(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Processes HTTP request and sends back HTTP response.
      void init​(jakarta.servlet.ServletConfig config)
      Initializes the Servlet.
      jakarta.xml.soap.SOAPMessage onMessage​(jakarta.xml.soap.SOAPMessage message, jakarta.servlet.http.HttpServletRequest request)
      Processes the request message and invokes RequestHandler.processRequest.
      • Methods inherited from class jakarta.servlet.http.HttpServlet

        doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class jakarta.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • SOAPReceiver

        public SOAPReceiver()
    • Method Detail

      • init

        public void init​(jakarta.servlet.ServletConfig config)
                  throws jakarta.servlet.ServletException
        Initializes the Servlet.
        Specified by:
        init in interface jakarta.servlet.Servlet
        Overrides:
        init in class jakarta.servlet.GenericServlet
        Parameters:
        config - the ServletConfig.
        Throws:
        jakarta.servlet.ServletException - if there is any error.
      • doPost

        public void doPost​(jakarta.servlet.http.HttpServletRequest request,
                           jakarta.servlet.http.HttpServletResponse response)
                    throws IOException,
                           jakarta.servlet.ServletException
        Processes HTTP request and sends back HTTP response. It gets called internally by the servlet engine.
        Overrides:
        doPost in class jakarta.servlet.http.HttpServlet
        Parameters:
        request - the HTTP request.
        response - the HTTP response.
        Throws:
        IOException - if an IO error occurs while processing the request
        jakarta.servlet.ServletException - if an servlet error occurs while processing the request
      • onMessage

        public jakarta.xml.soap.SOAPMessage onMessage​(jakarta.xml.soap.SOAPMessage message,
                                                      jakarta.servlet.http.HttpServletRequest request)
        Processes the request message and invokes RequestHandler.processRequest.
        Parameters:
        message - request received from the requestor
        request - the HTTP request
        Returns:
        response being sent to the requestor