I'm trying to use the webservices API in OBIEE with the initiateAnalysisExport() method of the AnalysisExportViews service in OBIEE 12C. I can send the API request without any issues, but the status and queryID fields in the AnalysisExportResult structure aren't returning anything. However, the viewData and mimeType fields are properly populated.
I'm not sure what I'm doing wrong here. I need the queryID for the completeAnalysisExport method to obtain the export file. I've also noticed that the documentation for queryID is empty: https://docs.oracle.com/middleware/1221/biee/BIEIT/structures.htm#BIEIT6968.
I am using python to with Zeep to connect. Any help or guidance is appreciated
import zeep
from credentials import get_credentials
# Get the credentials
username, password = get_credentials()
wsdl = 'http://domain.domain.com:PORT/analytics-ws/saw.dll/wsdl/v12'
client = zeep.Client(wsdl=wsdl)
SessionService = client.bind('SAWSessionService')
ExportService = client.bind('AnalysisExportViewsService')
SessionID = None # define the variable before the try block
ReportPath = "/users/person/Report Name"
ExportFormat = "EXCEL2007"
try:
SessionID = SessionService.logon(name = username, password = password)
print(f"SessionID is: {SessionID}")
# do something with the SessionID
output = ExportService.initiateAnalysisExport(report = ReportPath,outputFormat=ExportFormat,sessionID=SessionID)
print(output.queryID)
except Exception as e:
print(f"An error occurred: {str(e)}")
finally:
if SessionID is not None: # check if the variable is not None before calling logoff()
SessionService.logoff(SessionID)
print("Logged off")