Class DefaultXmlaServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
mondrian.xmla.XmlaServlet
mondrian.xmla.impl.DefaultXmlaServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, XmlaConstants
Direct Known Subclasses:
MondrianXmlaServlet, Olap4jXmlaServlet

public abstract class DefaultXmlaServlet extends XmlaServlet
Default implementation of XML/A servlet.
Author:
Gang Chen
See Also:
  • Field Details

    • nl

      protected static final String nl
  • Constructor Details

    • DefaultXmlaServlet

      public DefaultXmlaServlet()
  • Method Details

    • getDocumentBuilderFactory

      protected static DocumentBuilderFactory getDocumentBuilderFactory()
    • init

      public void init(javax.servlet.ServletConfig servletConfig) throws javax.servlet.ServletException
      Description copied from class: XmlaServlet
      Initializes servlet and XML/A handler.
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class XmlaServlet
      Throws:
      javax.servlet.ServletException
    • unmarshallSoapMessage

      protected void unmarshallSoapMessage(javax.servlet.http.HttpServletRequest request, Element[] requestSoapParts) throws XmlaException
      Description copied from class: XmlaServlet
      Implement to provide application specified SOAP unmarshalling algorithm.
      Specified by:
      unmarshallSoapMessage in class XmlaServlet
      Throws:
      XmlaException
    • logXmlaRequest

      protected void logXmlaRequest(Element envElem)
    • handleSoapHeader

      protected void handleSoapHeader(javax.servlet.http.HttpServletResponse response, Element[] requestSoapParts, byte[][] responseSoapParts, Map<String,Object> context) throws XmlaException
      Implement to handle application specified SOAP header.

      See if there is a "mustUnderstand" header element. If there is a BeginSession element, then generate a session id and add to context Map.

      Excel 2000 and Excel XP generate both a BeginSession, Session and EndSession mustUnderstand=1 in the "urn:schemas-microsoft-com:xml-analysis" namespace Header elements and a NamespaceCompatibility mustUnderstand=0 in the "http://schemas.microsoft.com/analysisservices/2003/xmla" namespace. Here we handle only the session Header elements.

      We also handle the Security element.

      Specified by:
      handleSoapHeader in class XmlaServlet
      Throws:
      XmlaException
    • generateSessionId

      protected String generateSessionId(Map<String,Object> context)
    • handleSoapBody

      protected void handleSoapBody(javax.servlet.http.HttpServletResponse response, Element[] requestSoapParts, byte[][] responseSoapParts, Map<String,Object> context) throws XmlaException
      Description copied from class: XmlaServlet
      Implement to handle XML/A request.
      Specified by:
      handleSoapBody in class XmlaServlet
      Throws:
      XmlaException
    • marshallSoapMessage

      protected void marshallSoapMessage(javax.servlet.http.HttpServletResponse response, byte[][] responseSoapParts, Enumeration.ResponseMimeType responseMimeType) throws XmlaException
      Description copied from class: XmlaServlet
      Implement to provide application specified SOAP marshalling algorithm.
      Specified by:
      marshallSoapMessage in class XmlaServlet
      Throws:
      XmlaException
    • handleFault

      protected void handleFault(javax.servlet.http.HttpServletResponse response, byte[][] responseSoapParts, XmlaServlet.Phase phase, Throwable t)
      This produces a SOAP 1.1 version Fault element - not a 1.2 version.
      Specified by:
      handleFault in class XmlaServlet