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