001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2005-2011 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.xmla; 011 012/** 013 * Constants for XML/A. 014 * 015 * @author Gang Chen 016 */ 017public interface XmlaConstants { 018 019 /* SOAP 1.1 */ 020 public static final String NS_SOAP_ENV_1_1 = 021 "http://schemas.xmlsoap.org/soap/envelope/"; 022 public static final String NS_SOAP_ENC_1_1 = 023 "http://schemas.xmlsoap.org/soap/encoding/"; 024 025 /* SOAP 1.2 - currently not supported */ 026 public static final String NS_SOAP_ENV_1_2 = 027 "http://www.w3.org/2003/05/soap-envelope"; 028 public static final String NS_SOAP_ENC_1_2 = 029 "http://www.w3.org/2003/05/soap-encoding"; 030 031 /* Namespaces for XML */ 032 public static final String NS_XSD = "http://www.w3.org/2001/XMLSchema"; 033 public static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance"; 034 035 /* Namespaces for XML/A */ 036 public static final String NS_XMLA = 037 "urn:schemas-microsoft-com:xml-analysis"; 038 public static final String NS_XMLA_MDDATASET = 039 "urn:schemas-microsoft-com:xml-analysis:mddataset"; 040 public static final String NS_XMLA_EMPTY = 041 "urn:schemas-microsoft-com:xml-analysis:empty"; 042 public static final String NS_XMLA_ROWSET = 043 "urn:schemas-microsoft-com:xml-analysis:rowset"; 044 public static final String NS_SQL = "urn:schemas-microsoft-com:xml-sql"; 045 public static final String NS_XMLA_EX = 046 "urn:schemas-microsoft-com:xml-analysis:exception"; 047 048 public static final String NS_SOAP_SECEXT = 049 "http://schemas.xmlsoap.org/ws/2002/04/secext"; 050 051 public static final String SOAP_PREFIX = "SOAP-ENV"; 052 053 /* 054 * Soap Header mustUnderstand attribute name. 055 */ 056 public static final String SOAP_MUST_UNDERSTAND_ATTR = "mustUnderstand"; 057 058 /* 059 * Soap XMLA Header elements and attribute names. 060 */ 061 public static final String XMLA_BEGIN_SESSION = "BeginSession"; 062 public static final String XMLA_SESSION = "Session"; 063 public static final String XMLA_END_SESSION = "EndSession"; 064 public static final String XMLA_SESSION_ID = "SessionId"; 065 public static final String XMLA_SECURITY = "Security"; 066 067 /* 068 * Names of context keys known by both callbacks and Mondrian code. 069 */ 070 // context key for role name storage 071 public static final String CONTEXT_ROLE_NAME = "role_name"; 072 // context key for language (SOAP or JSON) 073 public static final String CONTEXT_MIME_TYPE = "language"; 074 // context key for session id storage 075 public static final String CONTEXT_XMLA_SESSION_ID = "session_id"; 076 077 // Username and password tokens 078 public static final String CONTEXT_XMLA_USERNAME = "username"; 079 public static final String CONTEXT_XMLA_PASSWORD = "password"; 080 081 // context key for session state storage 082 public static final String CONTEXT_XMLA_SESSION_STATE = "SessionState"; 083 public static final String CONTEXT_XMLA_SESSION_STATE_BEGIN = 084 "SessionStateBegin"; 085 public static final String CONTEXT_XMLA_SESSION_STATE_WITHIN = 086 "SessionStateWithin"; 087 public static final String CONTEXT_XMLA_SESSION_STATE_END = 088 "SessionStateEnd"; 089 090 /************************************************************************* 091 * 092 * The following are XMLA exception fault codes used as faultcode entries 093 * in the SOAP Fault element. 094 * 095 * If Mondrian Exceptions actually used the "id" attributes found in the 096 * MondrianResource.xml file, then those would be used as the SOAP Fault 097 * detail error code values, but, alas they do not show up as part of 098 * the generated Exception Java code so, here we simply duplicate 099 * the fault code entry. 100 * 101 * Currently, SOAP 1.2 errors are not supported. 102 * 103 *************************************************************************/ 104 105 /** 106 * This is the namespace used to qualify the faultcode identifier. 107 */ 108 public static final String MONDRIAN_NAMESPACE = "http://mondrian.sourceforge.net"; 109 public static final String FAULT_NS_PREFIX = "XA"; 110 111 public static final String FAULT_ACTOR = "Mondrian"; 112 113 // soap 1.1 default faultcodes 114 public static final String VERSION_MISSMATCH_FAULT_FC = "VersionMismatch"; 115 public static final String MUST_UNDERSTAND_FAULT_FC = "MustUnderstand"; 116 public static final String CLIENT_FAULT_FC = "Client"; 117 public static final String SERVER_FAULT_FC = "Server"; 118 119 //<faultcode>XA:Mondrian.XML.88BA1202</faultcode> 120 public static final String FAULT_FC_PREFIX = "Mondrian"; 121 public static final String FAULT_FS_PREFIX = "The Mondrian XML: "; 122 123 ///////////////////////////////////////////////////////////////////////// 124 // Unmarshall Soap Message : USM 125 ///////////////////////////////////////////////////////////////////////// 126 public static final String USM_REQUEST_STATE_CODE = "00USMA01"; 127 public static final String USM_REQUEST_STATE_FAULT_FS = 128 "Request input method invoked at illegal time"; 129 130 public static final String USM_REQUEST_INPUT_CODE = "00USMA02"; 131 public static final String USM_REQUEST_INPUT_FAULT_FS = 132 "Request input Exception occurred"; 133 134 public static final String USM_DOM_FACTORY_CODE = "00USMB01"; 135 public static final String USM_DOM_FACTORY_FAULT_FS = 136 "DocumentBuilder cannot be created which satisfies the configuration " 137 + "requested"; 138 139 public static final String USM_DOM_PARSE_IO_CODE = "00USMC01"; 140 public static final String USM_DOM_PARSE_IO_FAULT_FS = 141 "DOM parse IO errors occur"; 142 143 public static final String USM_DOM_PARSE_CODE = "00USMC02"; 144 public static final String USM_DOM_PARSE_FAULT_FS = 145 "DOM parse errors occur"; 146 147 // unknown error while unmarshalling soap message 148 public static final String USM_UNKNOWN_CODE = "00USMU01"; 149 public static final String USM_UNKNOWN_FAULT_FS = 150 "Unknown error unmarshalling soap message"; 151 152 ///////////////////////////////////////////////////////////////////////// 153 // Callback http header : CHH 154 ///////////////////////////////////////////////////////////////////////// 155 public static final String CHH_CODE = "00CHHA01"; 156 public static final String CHH_FAULT_FS = 157 "Error in Callback processHttpHeader"; 158 159 public static final String CHH_AUTHORIZATION_CODE = "00CHHA02"; 160 public static final String CHH_AUTHORIZATION_FAULT_FS = 161 "Error in Callback processHttpHeader Authorization"; 162 163 ///////////////////////////////////////////////////////////////////////// 164 // Callback Pre-Action : CPREA 165 ///////////////////////////////////////////////////////////////////////// 166 public static final String CPREA_CODE = "00CPREA01"; 167 public static final String CPREA_FAULT_FS = 168 "Error in Callback PreAction"; 169 170/* 171 public static final String CPREA_AUTHORIZATION_CODE = "00CPREA02"; 172 public static final String CPREA_AUTHORIZATION_FAULT_FS = 173 "Error Callback PreAction Authorization"; 174*/ 175 176 ///////////////////////////////////////////////////////////////////////// 177 // Handle Soap Header : HSH 178 ///////////////////////////////////////////////////////////////////////// 179 public static final String HSH_MUST_UNDERSTAND_CODE = "00HSHA01"; 180 public static final String HSH_MUST_UNDERSTAND_FAULT_FS = 181 "SOAP Header must understand element not recognized"; 182 183 // This is used to signal XMLA clients supporting Soap header session ids 184 // that the client's metadata may no longer be valid. 185 public static final String HSH_BAD_SESSION_ID_CODE = "00HSHB01"; 186 public static final String HSH_BAD_SESSION_ID_FAULT_FS = 187 "Bad Session Id, re-start session"; 188 189 // unknown error while handle soap header 190 public static final String HSH_UNKNOWN_CODE = "00HSHU01"; 191 public static final String HSH_UNKNOWN_FAULT_FS = 192 "Unknown error handle soap header"; 193 194 ///////////////////////////////////////////////////////////////////////// 195 // Handle Soap Body : HSB 196 ///////////////////////////////////////////////////////////////////////// 197 public static final String HSB_BAD_SOAP_BODY_CODE = "00HSBA01"; 198 public static final String HSB_BAD_SOAP_BODY_FAULT_FS = 199 "SOAP Body not correctly formed"; 200 201 public static final String HSB_PROCESS_CODE = "00HSBB01"; 202 public static final String HSB_PROCESS_FAULT_FS = 203 "XMLA SOAP Body processing error"; 204 205 public static final String HSB_BAD_METHOD_CODE = "00HSBB02"; 206 public static final String HSB_BAD_METHOD_FAULT_FS = 207 "XMLA SOAP bad method"; 208 209 public static final String HSB_BAD_METHOD_NS_CODE = "00HSBB03"; 210 public static final String HSB_BAD_METHOD_NS_FAULT_FS = 211 "XMLA SOAP bad method namespace"; 212 213 public static final String HSB_BAD_REQUEST_TYPE_CODE = "00HSBB04"; 214 public static final String HSB_BAD_REQUEST_TYPE_FAULT_FS = 215 "XMLA SOAP bad Discover RequestType element"; 216 217 public static final String HSB_BAD_RESTRICTIONS_CODE = "00HSBB05"; 218 public static final String HSB_BAD_RESTRICTIONS_FAULT_FS = 219 "XMLA SOAP bad Discover Restrictions element"; 220 221 public static final String HSB_BAD_PROPERTIES_CODE = "00HSBB06"; 222 public static final String HSB_BAD_PROPERTIES_FAULT_FS = 223 "XMLA SOAP bad Discover or Execute Properties element"; 224 225 public static final String HSB_BAD_COMMAND_CODE = "00HSBB07"; 226 public static final String HSB_BAD_COMMAND_FAULT_FS = 227 "XMLA SOAP bad Execute Command element"; 228 229 public static final String HSB_BAD_RESTRICTION_LIST_CODE = "00HSBB08"; 230 public static final String HSB_BAD_RESTRICTION_LIST_FAULT_FS = 231 "XMLA SOAP too many Discover RestrictionList element"; 232 233 public static final String HSB_BAD_PROPERTIES_LIST_CODE = "00HSBB09"; 234 public static final String HSB_BAD_PROPERTIES_LIST_FAULT_FS = 235 "XMLA SOAP bad Discover or Execute PropertyList element"; 236 237 public static final String HSB_BAD_STATEMENT_CODE = "00HSBB10"; 238 public static final String HSB_BAD_STATEMENT_FAULT_FS = 239 "XMLA SOAP bad Execute Statement element"; 240 241 public static final String HSB_BAD_NON_NULLABLE_COLUMN_CODE = "00HSBB16"; 242 public static final String HSB_BAD_NON_NULLABLE_COLUMN_FAULT_FS = 243 "XMLA SOAP non-nullable column"; 244 245 246 public static final String HSB_CONNECTION_DATA_SOURCE_CODE = "00HSBC01"; 247 public static final String HSB_CONNECTION_DATA_SOURCE_FAULT_FS = 248 "XMLA connection datasource not found"; 249 250 public static final String HSB_ACCESS_DENIED_CODE = "00HSBC02"; 251 public static final String HSB_ACCESS_DENIED_FAULT_FS = 252 "XMLA connection with role must be authenticated"; 253 254 public static final String HSB_PARSE_QUERY_CODE = "00HSBD01"; 255 public static final String HSB_PARSE_QUERY_FAULT_FS = 256 "XMLA MDX parse failed"; 257 258 public static final String HSB_EXECUTE_QUERY_CODE = "00HSBD02"; 259 public static final String HSB_EXECUTE_QUERY_FAULT_FS = 260 "XMLA MDX execute failed"; 261 262 public static final String HSB_DISCOVER_FORMAT_CODE = "00HSBE01"; 263 public static final String HSB_DISCOVER_FORMAT_FAULT_FS = 264 "XMLA Discover format error"; 265 266 public static final String HSB_DRILL_THROUGH_FORMAT_CODE = "00HSBE02"; 267 public static final String HSB_DRILL_THROUGH_FORMAT_FAULT_FS = 268 "XMLA Drill Through format error"; 269 270 public static final String HSB_DISCOVER_UNPARSE_CODE = "00HSBE02"; 271 public static final String HSB_DISCOVER_UNPARSE_FAULT_FS = 272 "XMLA Discover unparse results error"; 273 274 public static final String HSB_EXECUTE_UNPARSE_CODE = "00HSBE03"; 275 public static final String HSB_EXECUTE_UNPARSE_FAULT_FS = 276 "XMLA Execute unparse results error"; 277 278 public static final String HSB_DRILL_THROUGH_NOT_ALLOWED_CODE = "00HSBF01"; 279 public static final String HSB_DRILL_THROUGH_NOT_ALLOWED_FAULT_FS = 280 "XMLA Drill Through not allowed"; 281 282 public static final String HSB_DRILL_THROUGH_SQL_CODE = "00HSBF02"; 283 public static final String HSB_DRILL_THROUGH_SQL_FAULT_FS = 284 "XMLA Drill Through SQL error"; 285 286 // unknown error while handle soap body 287 public static final String HSB_UNKNOWN_CODE = "00HSBU01"; 288 public static final String HSB_UNKNOWN_FAULT_FS = 289 "Unknown error handle soap body"; 290 291 ///////////////////////////////////////////////////////////////////////// 292 // Callback Post-Action : CPOSTA 293 ///////////////////////////////////////////////////////////////////////// 294 public static final String CPOSTA_CODE = "00CPOSTA01"; 295 public static final String CPOSTA_FAULT_FS = 296 "Error in Callback PostAction"; 297 298 ///////////////////////////////////////////////////////////////////////// 299 // Marshall Soap Message : MSM 300 ///////////////////////////////////////////////////////////////////////// 301 302 // unknown error while marshalling soap message 303 public static final String MSM_UNKNOWN_CODE = "00MSMU01"; 304 public static final String MSM_UNKNOWN_FAULT_FS = 305 "Unknown error marshalling soap message"; 306 307 ///////////////////////////////////////////////////////////////////////// 308 // Unknown error : UE 309 ///////////////////////////////////////////////////////////////////////// 310 public static final String UNKNOWN_ERROR_CODE = "00UE001"; 311 // While this is actually "unknown", for users "internal" 312 // is a better term 313 public static final String UNKNOWN_ERROR_FAULT_FS = "Internal Error"; 314 315} 316 317// End XmlaConstants.java