Skip to content

Instantly share code, notes, and snippets.

@rmoff
Last active February 11, 2020 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmoff/8601382 to your computer and use it in GitHub Desktop.
Save rmoff/8601382 to your computer and use it in GitHub Desktop.
Calling OBIEE SOAP Web Service from Python using SUDS
# RNM 20140124
#
# https://twitter.com/rmoff/
# --------------------
# Required
from suds.client import Client
client = Client('http://obiee-server:9704/analytics-ws/saw.dll/wsdl/v7')
#------------
# Logon
sessionid = client.service['SAWSessionService'].logon('weblogic','Password01')
# List subject areas
sa_list=client.service['MetadataService'].getSubjectAreas(sessionid)
for sa in sa_list:
print sa.name
# List SA's tables and Columns
sa_description=client.service['MetadataService'].describeSubjectArea(sa_list[0].name,'IncludeTablesAndColumns',sessionid)
for table in sa_description.tables:
print '\t%s' % (table.name)
for col in table.columns:
print '\t\t%s' % (col.name)
# ----------------------
# Reference
# Print all methods and services
print str(client);
# See http://docs.oracle.com/cd/E28280_01/bi.1111/e16364/methods.htm for full WS documentation
@mavericklb
Copy link

While using the below lines, I'm unable to get the result set and the query executed :

data=client.service['ReportEditingService'].applyReportDefaults('/shared/DAO - CCR/Task Details',sessionid)
print(data)
x=client.service['ReportEditingService'].generateReportSQL('/shared/DAO - CCR/Task Details',sessionid)
print(x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment