XMLA Client
Use scripts/xmla_client.py to speak XMLA directly over SOAP 1.1. It uses only the Python standard library.
Workflow
- Start with
DISCOVER_DATASOURCES. Do not reject an endpoint because HTTPGETreturns 404; XMLA is exercised by a SOAPPOSTand a service may accept only that method. - Inspect the returned
DataSourceInfo, provider name, provider type, URL, and authentication mode. - Continue with
DISCOVER_SCHEMA_ROWSETSfor the selected data source. Then use an advertised schema rowset such asDBSCHEMA_CATALOGS,MDSCHEMA_CUBES, orMDSCHEMA_MEASURESwith appropriate restrictions. - Use
executeonly when the user wants a statement run. XMLA providers may accept MDX, SQL, or another command dialect. Treat data-changing statements as mutations and require explicit authorization before sending them. - On failure, preserve the HTTP status and SOAP Fault. Retry only when a changed binding, credential, property, or restriction is supported by evidence.
Read references/xmla-protocol.md when choosing discovery rowsets, properties, output handling, or authentication. Read references/demo-openlink-proof.md for the live OpenLink proof that motivated this client.
Read README.md when the user wants runnable, verified SQL or SPASQL/SPARQL-FED examples.
Commands
Discover data sources:
bashpython3 scripts/xmla_client.py \ --endpoint https://example.com/XMLA \ discover --request-type DISCOVER_DATASOURCES
Discover catalogs for one advertised data source:
bashpython3 scripts/xmla_client.py \ --endpoint https://example.com/XMLA \ --data-source-info 'DSN=Local_Instance' \ discover --request-type DBSCHEMA_CATALOGS
Execute a statement from a file:
bashpython3 scripts/xmla_client.py \ --endpoint https://example.com/XMLA \ --data-source-info 'DSN=Local_Instance' \ --catalog Demo \ execute --statement-file query.mdx --output-format pretty-xml
Use repeated --restriction NAME=VALUE and --property NAME=VALUE arguments for provider-specific discovery. Use --dry-run --output-format pretty-xml to inspect the SOAP envelope without sending it.
Credentials and TLS
- Basic authentication: set
XMLA_USERNAMEandXMLA_PASSWORD. The environment variable names can be changed with--username-envand--password-env. - Bearer authentication: set
XMLA_BEARER_TOKENor select another variable with--bearer-token-env. - XMLA
PropertyListauthentication: setXMLA_PROPERTY_USERNAMEandXMLA_PROPERTY_PASSWORD. Change the variable names with--xmla-username-envand--xmla-password-env. Use this whenDISCOVER_PROPERTIESadvertisesUserNameandPasswordproperties or a SOAP Fault explicitly requests them. - Never place passwords or bearer tokens in command arguments, generated XML, logs, or skill files.
- Prefer normal certificate validation. Use
--ca-certfor a private CA. Use--insecureonly for an explicitly approved diagnostic against a known endpoint. - For mutual TLS, use
--client-certand, when separate,--client-key.
Result discipline
Default JSON output contains normalized rowset rows and a row count. Use --output-format xml when exact server bytes matter and pretty-xml for inspection. --response-out preserves the unmodified response independently of formatted stdout. Do not claim a query succeeded unless the response is HTTP-successful and contains no SOAP Fault.


