mondrian.xmla
Interface XmlaRequestCallback


public interface XmlaRequestCallback

Extract data from HTTP request, SOAP header for following XML/A request.

Fill context binding with whatever data you want, then use them in XmlaServlet.handleSoapHeader(javax.servlet.http.HttpServletResponse, org.w3c.dom.Element[], byte[][], java.util.Map) and XmlaServlet.handleSoapBody(javax.servlet.http.HttpServletResponse, org.w3c.dom.Element[], byte[][], java.util.Map).

Author:
Gang Chen
 

Nested Class Summary
static class XmlaRequestCallback.Helper
           
 
Field Summary
static String AUTHORIZATION
           
static String EXPECT
           
static String EXPECT_100_CONTINUE
           
 
Method Summary
 String generateSessionId(Map<String,Object> context)
          The Callback is requested to generate a sequence id string.
 void init(ServletConfig servletConfig)
           
 void postAction(HttpServletRequest request, HttpServletResponse response, byte[][] responseSoapParts, Map<String,Object> context)
          This is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred.
 void preAction(HttpServletRequest request, Element[] requestSoapParts, Map<String,Object> context)
          This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed.
 boolean processHttpHeader(HttpServletRequest request, HttpServletResponse response, Map<String,Object> context)
          Process the request header items.
 

Field Detail

AUTHORIZATION

static final String AUTHORIZATION
See Also:
Constant Field Values

EXPECT

static final String EXPECT
See Also:
Constant Field Values

EXPECT_100_CONTINUE

static final String EXPECT_100_CONTINUE
See Also:
Constant Field Values
Method Detail

init

void init(ServletConfig servletConfig)
          throws ServletException
Throws:
ServletException

processHttpHeader

boolean processHttpHeader(HttpServletRequest request,
                          HttpServletResponse response,
                          Map<String,Object> context)
                          throws Exception
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).

Throws:
Exception
Returns:
true if XmlaServlet handling is to continue and false if there was an Expect header "100-continue".

preAction

void preAction(HttpServletRequest request,
               Element[] requestSoapParts,
               Map<String,Object> context)
               throws Exception
This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed.

Throws:
Exception

generateSessionId

String generateSessionId(Map<String,Object> context)
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.


postAction

void postAction(HttpServletRequest request,
                HttpServletResponse response,
                byte[][] responseSoapParts,
                Map<String,Object> context)
                throws Exception
This is called after all Mondrian processing (DISCOVER/EXECUTE) has occurred.

Throws:
Exception

SourceForge.net_Logo