Sie sind auf Seite 1von 7

Using Web Services to Execute

BI Analytics and BI Publisher Reports

Follow: @fadevrel

Read: blogs.oracle.com/fadevrel

Watch: youtube.com/FADeveloperRelations

Discuss: bit.ly/fadevrelforum
Contents

Using BI Publisher Web Services to get Applications Data ........................................................................................ 3


Demo Video .......................................................................................................................................................... 3

Service WSDL ........................................................................................................................................................ 3

Operation and Sample Payload ............................................................................................................................ 3

Result .................................................................................................................................................................... 4

Using BI Analytics Web Services to get Applications Data......................................................................................... 5


Demo Video .......................................................................................................................................................... 5

Service WSDL ........................................................................................................................................................ 5

Operation and Sample Payload ............................................................................................................................ 5

Result .................................................................................................................................................................... 7
Using BI Publisher Web Services to get Applications Data

Demo Video
The following video demonstrates using the BI Publisher web service.

https://www.youtube.com/watch?v=4Ltkl7KIS9M

Service WSDL
The ExternalReportWSSService is supported for use within a Fusion Applications environment and is available in
all product family domains in cloud deployments.

https://[YourDomain]/xmlpserver/services/ExternalReportWSSService?WSDL

Operation and Sample Payload


Create your report online and save it under the BI Publisher /shared/Custom/ folder. It can be called using the
runReport() operation. The following is a simple payload example; replace the reportAbsolutePath with the
/path/name.xdo of your report.

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">
<soapenv:Header/>
<soapenv:Body>
<pub:runReport>
<pub:reportRequest>
<pub:reportAbsolutePath>/Custom/BIPParticipantParty.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
</pub:runReport>
</soapenv:Body>
</soapenv:Envelope>

You can also pass report parameters, as in this example.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService">


<soap:Header/>
<soap:Body>
<pub:runReport>
<pub:reportRequest>
<pub:parameterNameValues>
<pub:item>
<pub:name>User_Population</pub:name>
<pub:values>
<pub:item>ALL</pub:item>
</pub:values>
</pub:item>
<pub:item>
<pub:name>From_Date</pub:name>
<pub:values>
<pub:item>1980-01-01T00:00:00.000+00:00 </pub:item>
</pub:values>
</pub:item>
<pub:item>
<pub:name>To_Date</pub:name>
<pub:values>
</pub:values>
</pub:item>
<pub:item>
<pub:name>User_Active_Status</pub:name>
<pub:values>
<pub:item>ALL</pub:item>
</pub:values>
</pub:item>
</pub:parameterNameValues>
<pub:reportAbsolutePath>/Human Capital Management/Workforce Management/Human Resources Dashboard/User Details System
Extract.xdo</pub:reportAbsolutePath>
<pub:sizeOfDataChunkDownload>-1</pub:sizeOfDataChunkDownload>
</pub:reportRequest>
<pub:appParams/>
</pub:runReport>
</soap:Body>
</soap:Envelope>

Result
The response contains the resulting report output. Note that you get a Base64 encoded string. This needs to be
decoded using either a Java library or for testing you can use a website utility like
https://www.base64decode.org/.
Using BI Analytics Web Services to get Applications Data

Demo Video
The following video demonstrates using the BI Analytics web service.

https://www.youtube.com/watch?v=4Ltkl7KIS9M

Service WSDL
As listed below, the OBIEE server exposes multiple service interfaces to support remote interactions via web
services. In this example well run a report and get the results with the SAWSessionService and the
XmlViewService.

These services are available in the BI server for all product family domains in cloud deployments.

https://[YourHost]/analytics-ws/saw.dll/wsdl/v7

Operation and Sample Payload


Create your analytics online and save it in the /shared/Custom/ folder. Call it using the following sequence of
steps:

Step 1: Get a Session ID using the SAWSessionService.

Use the logon operation to generate a sessionsID for use in Step 2.

Service URL

https://[YourHost]/analytics-ws/saw.dll?SoapImpl=nQSessionService

The request should include a valid applications user account:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v7="urn://oracle.bi.webservices/v7">
<soapenv:Header/>
<soapenv:Body>
<v7:logon>
<v7:name>richard.bingham@oracle.com</v7:name>
<v7:password>yourpaswd</v7:password>
</v7:logon>
</soapenv:Body>
</soapenv:Envelope>

The response includes a sessionID value:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:sawsoap="urn://oracle.bi.webservices/v7">
<soap:Body>
<sawsoap:logonResult>
<sawsoap:sessionID xsi:type="xsd:string">hprn67ufqg8f7v095hcdi4n1ua50miqrcg27qh278mvqqcf8</sawsoap:sessionID>
</sawsoap:logonResult>
</soap:Body>
</soap:Envelope>

Step 2: Call The Report using the XmlViewService

You make a request using the sessionID value above and call the executeXMLQuery operation of the
XmlViewService that also includes your report path/name, such as below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v7="urn://oracle.bi.webservices/v7">


<soapenv:Header/>
<soapenv:Body>
<v7:executeXMLQuery>
<v7:report>
<v7:reportPath>/shared/ParticipantParty</v7:reportPath>
<v7:reportXml></v7:reportXml>
</v7:report>
<v7:outputFormat></v7:outputFormat>
<v7:executionOptions>
<v7:async></v7:async>
<v7:maxRowsPerPage></v7:maxRowsPerPage>
<v7:refresh></v7:refresh>
<v7:presentationInfo></v7:presentationInfo>
<v7:type></v7:type>
</v7:executionOptions>
<v7:reportParams>
<!--Zero or more repetitions:-->
<v7:filterExpressions></v7:filterExpressions>
<!--Zero or more repetitions:-->
<v7:variables>
<v7:name></v7:name>
<v7:value></v7:value>
</v7:variables>
<!--Zero or more repetitions:-->
<v7:nameValues>
<v7:name></v7:name>
<v7:value></v7:value>
</v7:nameValues>
<!--Zero or more repetitions:-->
<v7:templateInfos>
<v7:templateForEach></v7:templateForEach>
<v7:templateIterator></v7:templateIterator>
<!--Zero or more repetitions:-->
<v7:instance>
<v7:instanceName></v7:instanceName>
<!--Zero or more repetitions:-->
<v7:nameValues>
<v7:name></v7:name>
<v7:value></v7:value>
</v7:nameValues>
</v7:instance>
</v7:templateInfos>
<!--Optional:-->
<v7:viewName></v7:viewName>
</v7:reportParams>
<v7:sessionID>hprn67ufqg8f7v095hcdi4n1ua50miqrcg27qh278mvqqcf8</v7:sessionID>
</v7:executeXMLQuery>
</soapenv:Body>
</soapenv:Envelope>

Result
This returns XML rows of data just like the report would online.

Title: Using Web Services to Execute BI Analytics and BI Publisher Reports


Author: Richard Bingham
Oracle Fusion Applications Developer Relations

Oracle Corporation, World Headquarters Worldwide Inquiries


500 Oracle Parkway Phone: +1.650.506.7000
Redwood Shores, CA 94065, USA Fax: +1.650.506.7200

Copyright 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only,
and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to
any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of
merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no
contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or
transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission.

Das könnte Ihnen auch gefallen