Question

I maintain a library that provides XML/A access trhough javascript: https://github.com/rpbouman/xmla4js

Mostly it works ok, but I would like to improve handling of error responses. As far as I understand the XML/A spec corectly, error responses take this form:

<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
  <faultcode>...</faultcode>
  <faultstring>...</faultstring>
  <faultactor>...</faultactor>
  <detail>
     ...
  </detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

However, I found that at least for Mondrian (the XML/A provider I am most familiar with) the <detail> element often contains invaluable information. For instance, the general <faultcode> element may say something generic like "datasource not found" whereas the <detail> element may contain something like:

    <XA:error xmlns:XA="http://mondrian.sourceforge.net">
      <code>00HSBC01</code>
      <desc>The Mondrian XML: MondrianOneToOneUserRoleListMapper.ERROR_001_ - Access is denied because the roles of this user don&#39;t correspond to any present in the Mondrian schema requested.</desc>
    </XA:error>

Which indicates a rather more specific condition.

My question is, is there some kind of pattern in the error response of other XML/A providers that I can use to impove my api and provide better error messages to the users of my library? If you don't know about a patter but can only provide samples of XML/A providers you happen to have access to than that is also greatly appreciated. Thank you!

No correct solution

OTHER TIPS

You can download the Microsoft specification of the XMLA protocol here: http://msdn.microsoft.com/en-us/library/ee320606.aspx (more than seven hundred pages).

In general, there are two types of errors:

  • Global ones, that either prevent the request from being executed, or prevent the server from returning anything useful (e. g. syntax errors),
  • and local ones, e. g. within a single cell of a response to an MDX SELECT request where the general result structure is returned. In this case error objects may be returned e. g. in one or several cells instead of the result. An example would be an error an prevents the server from calculating this specific cell value, like a reference to an unknown element in the definition of a calculated member.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top