Interface SOAPRequestHandlerInterface

  • All Known Implementing Classes:
    SOAPRequestHandler

    public interface SOAPRequestHandlerInterface
    SOAPRequestHandlerInterface provides the interfaces to process and secure the in-bound or out-bound SOAPMessages of the web service clients and web service providers.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void init​(Map config)
      Initializes the handler with the given configuration.
      String print​(Node node)
      Prints a Node tree recursively.
      jakarta.xml.soap.SOAPMessage secureRequest​(jakarta.xml.soap.SOAPMessage soapMessage, Subject subject, Map sharedState)
      Secures the SOAPMessage request by adding necessary credential information.
      jakarta.xml.soap.SOAPMessage secureResponse​(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedState)
      Secures the SOAP Message response to the client.
      Object validateRequest​(jakarta.xml.soap.SOAPMessage soapRequest, Subject subject, Map sharedState, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Authenticates the SOAPMessage from a remote client.
      void validateResponse​(jakarta.xml.soap.SOAPMessage soapMessage, Map sharedState)
      Validates the SOAP Response from the service provider.
    • Method Detail

      • init

        void init​(Map config)
           throws SecurityException
        Initializes the handler with the given configuration.
        Parameters:
        config - the configuration map to initializate the provider.
        Throws:
        SecurityException - if the initialization fails.
      • validateRequest

        Object validateRequest​(jakarta.xml.soap.SOAPMessage soapRequest,
                               Subject subject,
                               Map sharedState,
                               jakarta.servlet.http.HttpServletRequest request,
                               jakarta.servlet.http.HttpServletResponse response)
                        throws SecurityException
        Authenticates the SOAPMessage from a remote client.
        Parameters:
        soapRequest - SOAPMessage that needs to be validated.
        subject - the subject that may be used by the callers to store Principals and credentials validated in the request.
        sharedState - that may be used to store any shared state information between validateRequest and
        request - the HttpServletRequest associated with this SOAP Message request.
        response - the HttpServletResponse associated with this SOAP Message response.
        Returns:
        Object the authenticated token.
        Throws:
        SecurityException - if any error occured during validation.
      • secureResponse

        jakarta.xml.soap.SOAPMessage secureResponse​(jakarta.xml.soap.SOAPMessage soapMessage,
                                                    Map sharedState)
                                             throws SecurityException
        Secures the SOAP Message response to the client.
        Parameters:
        soapMessage - SOAP Message that needs to be secured.
        sharedState - a map for the callers to store any state information between validateRequest and secureResponse.
        Throws:
        SecurityException - if any error occurs during securing.
      • secureRequest

        jakarta.xml.soap.SOAPMessage secureRequest​(jakarta.xml.soap.SOAPMessage soapMessage,
                                                   Subject subject,
                                                   Map sharedState)
                                            throws SecurityException
        Secures the SOAPMessage request by adding necessary credential information.
        Parameters:
        soapMessage - the SOAPMessage that needs to be secured.
        subject - the Subject of the authenticating entity.
        sharedState - Any shared state information that may be used between the secureRequest and validateResponse.
        Throws:
        SecurityException - if any failure for securing the request.
      • validateResponse

        void validateResponse​(jakarta.xml.soap.SOAPMessage soapMessage,
                              Map sharedState)
                       throws SecurityException
        Validates the SOAP Response from the service provider.
        Parameters:
        soapMessage - the SOAPMessage that needs to be validated.
        sharedState - Any shared data that may be used between the secureRequest and validateResponse.
        Throws:
        SecurityException - if any failure occured for validating the response.
      • print

        String print​(Node node)
        Prints a Node tree recursively.
        Parameters:
        node - A DOM tree Node
        Returns:
        An xml String representation of the DOM tree.