Package mondrian.xmla

Class XmlaErrorTest.Callback

    • Field Detail

      • MY_SESSION_ID

        static java.lang.String MY_SESSION_ID
    • Constructor Detail

      • Callback

        Callback()
    • Method Detail

      • processHttpHeader

        public boolean processHttpHeader​(HttpServletRequest request,
                                         HttpServletResponse response,
                                         java.util.Map<java.lang.String,​java.lang.Object> context)
                                  throws java.lang.Exception
        Description copied from interface: XmlaRequestCallback
        Process the request header items. Specifically if present the Authorization and Expect headers. If the Authorization header is present, then the callback can validate the user/password. If authentication fails, the callback should throw an XmlaException with the correct XmlaConstants values. The XmlaRequestCallback.Helper class contains the authorizationException method that can be used by a callback to generate the XmlaException with the correct values. If the Expect header is set with "100-continue", then it is upto the callback to create the appropriate response and return false. In this case, the XmlaServlet stops processing and returns the response to the client application. To facilitate the generation of the response, the XmlaRequestCallback.Helper has the method generatedExpectResponse that can be called by the callback.

        Note that it is upto the XMLA client to determine whether or not there is an Expect header entry (ADOMD.NET seems to like to do this).

        Specified by:
        processHttpHeader in interface XmlaRequestCallback
        Returns:
        true if XmlaServlet handling is to continue and false if there was an Expect header "100-continue".
        Throws:
        java.lang.Exception
      • preAction

        public void preAction​(HttpServletRequest request,
                              org.w3c.dom.Element[] requestSoapParts,
                              java.util.Map<java.lang.String,​java.lang.Object> context)
                       throws java.lang.Exception
        Description copied from interface: XmlaRequestCallback
        This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed.
        Specified by:
        preAction in interface XmlaRequestCallback
        Throws:
        java.lang.Exception
      • generateSessionId

        public java.lang.String generateSessionId​(java.util.Map<java.lang.String,​java.lang.Object> context)
        Description copied from interface: XmlaRequestCallback
        The Callback is requested to generate a sequence id string. This sequence id was requested by the XMLA client and will be used for all subsequent communications in the Soap Header block. Implementation can return null if they do not want to generate a custom session ID, in which case, the default algorithm to generate session IDs will be used.
        Specified by:
        generateSessionId in interface XmlaRequestCallback
        Parameters:
        context - The context of this query.
        Returns:
        An arbitrary session id to use, or null.
      • postAction

        public void postAction​(HttpServletRequest request,
                               HttpServletResponse response,
                               byte[][] responseSoapParts,
                               java.util.Map<java.lang.String,​java.lang.Object> context)
                        throws java.lang.Exception
        Description copied from interface: XmlaRequestCallback
        This is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred.
        Specified by:
        postAction in interface XmlaRequestCallback
        Throws:
        java.lang.Exception