You are on page 1of 8

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

Home About Clients Consulting Training Support Articles Events Blog

Rittman Mead - Delivered Intelligence


Accessing BI Publisher 11g Web Services through a JDeveloper Web Service Proxy
November 24th, 2011 by Robin Moffatt In the second part of this series looking at Web Services in BI Publisher 11g, I will look at using JDeveloper to create a Web Service Proxy. This exposes the BI Publisher Web Services in Java, from where they can be embedded in numerous other applications. I demonstrated in part one how simple it is to invoke a Web Service, such as running an existing report in BI Publisher and writing the output as PDF to file. Now we will take a look at extending this to something that can actually be used in real applications. JDeveloper is Oracles development platform for Java applications, and it includes functionality to dynamically generate java code for accessing Web Services. It calls this a Web Service Proxy, for obvious reasons since it is generating a proxy for the Web Service proper as a set of java methods and data types. By utilising a Web Service Proxy, calls can be made out to the BI Publisher Web Services from any java code. Think of the possibilities! Whether you just want to touch BI Publisher briefly to schedule a report, or integrate a lot more closely, perhaps putting together report components on the fly, all of this is possible from java code.

Versions
Before we start on the worked example, a very important note about versions. Pay attention to this and you will save yourself the loss of hair and hours that I suffered! If you are running OBIEE 11.1.1.5, then you must use JDeveloper 11.1.1.5. You cannot use JDeveloper 11.1.2! If you try to use JDeveloper 11.1.2.1.0 you will most likely see the following: Using a JAX-WS style proxy, the generate fails with an error:
java.lang.IllegalArgumentException: Not a valid simple name: 'v2/ScheduleServiceClient'

Using a JAX-RPC style proxy, your Java code will be generated full of these errors:
Unreported Exception

Create a Web Service Proxy in JDeveloper, step by step


1 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

The following steps walk you through creating a Web Service Proxy in JDeveloper for the ReportService BI Publisher Web Service. It then uses the proxy to invoke the runReport method that we prototyped in part one to run a report and write the output to PDF. 1. Run JDeveloper 11.1.1.5, and create a new Generic Application. In the new project, insert a Web Service Proxy (under Business Tier -> Web Services) 1. Select a JAX-WS Client Style 2. Use the same WSDL URL as you prototyped in soapUI, for example,

3. Click Finish (you dont need to specify anything in the rest of the Wizard)

2. You should get a successful creation of your proxy. Remember, it is just a java program, that has been generated to wire into the specified Web Service, but is still just java code.

2 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

If not open already, open up V2ReportServiceClient.java and locate the line which says Add your code to call the desired methods. So now, you can add your code to call the desired methods :-)

3 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

3. Run it, and you should get Success! in the JDeveloper message window

And there should be a PDF file in the path specified:

So there you have it easy access of BI Publisher 11g Web Services from Java, using the JDeveloper Web Service Proxy functionality NB: The above java code is heavily based on Venkats original code here.

BI Publisher Web Services and BPEL


The third part of this series will demonstrate incorporating a call to a BI Publisher Web Service in a SOA / BPEL process. Click here to read it. Tags: 11g, BI Publisher, BIP, Java, Jdeveloper, ReportService, runReport, Web Service, Web Service Proxy, XML
Share 1

Tweet

Tags: 11g, BI Publisher, BIP, Java, Jdeveloper, ReportService, runReport, Web Service, Web Service Proxy, XML Posted in Oracle BI Suite EE | 1 Comment

Comments

4 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

1. Web Designer Tampa Says: December 27th, 2011 at 12:16 pm Thats good!!! thanks a lot for sharing.

Write a comment
Name (required)

Mail (will not be published) (required)

Website

Your comment

Recent Posts
Agile Data Warehousing with Exadata and OBIEE: Model-Driven Iteration BI EE 11.1.1.5 Calling BI EE 11g Agents through Oracle Data Integrator 11g Rittman Mead BI Forum 2012 Call for Papers Now Open Closing Date 31st January 2012 Scripted OBI 11g Linux startup/shutdown Looking Back at 2011, Looking forward to 2012

Recent Comments
5 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

Stewart Bryson on Agile Data Warehousing with Exadata and OBIEE: Model-Driven Iteration Shailesh Kulkarni on OBIEE 11gR1 : Installation and Initial Configuration Dan on Agile Data Warehousing with Exadata and OBIEE: Model-Driven Iteration Dan on Agile Data Warehousing with Exadata and OBIEE: Puzzle Pieces Matt on OBIEE 10g Web Catalog "Best Practices"

Categories
Apple Application Server BI (General) BI (General) BI 2.0 BI 2.0 BI Suite Developer Book Conferences Courses Data Mining Data Quality Data Warehousing Dimensional Modelling Discoverer Exadata FMW General Hyperion Hyperion Essbase Hyperion Smart View Linux Methodology Oracle BI Apps Oracle BI Apps Oracle BI Suite EE Oracle Data Integrator Oracle Database Oracle Discoverer Oracle EPM Oracle GoldenGate Oracle News Oracle OLAP Oracle Reports & XML Publisher Oracle Warehouse Builder Professional rant Real-Time Decisions Rittman Mead Seminar Series Technology The Great Blog Disaster Uncategorized User Groups & Conferences Call us now to talk about your BI project:

6 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

+44 (0) 8446 697 995 (UK) or (888) 631-1410 (USA) or +61 (0) 390 160 100 (Australia & New Zealand) or +91 997 256 7970 (India) Home About Us > About us > About our team > Contact us > Our clients Services > Consulting > Training > Support Consulting Services > Projects > Expert Services > OBIEE 11g > Sustainability > On Discoverer? > Oracle DW Training > OBI10g Developer > OBI11g Training Days > OBI10g End-User > BI Publisher > Oracle BI Apps Resources > Articles > Blog > OBIEE 11g Blog Authors > Mark Rittman > Venkat J > Stewart Bryson > Peter Scott > Borkur S > Mike Vickers > Adrian Ward > Jon Mead
Rittman Mead Consulting ltd.

Registered Office : Preston Park House, South Road, Brighton, East Sussex, BN1 6SB, United Kingdom United Kingdom Company No. : 6032852 VAT No. : 900 3839 48
Rittman Mead America, Inc.

7 of 8

1/18/2012 3:07 PM

Rittman Mead Consulting Blog Archive Accessing BI Publishe...

http://www.rittmanmead.com/2011/11/accessing-bi-publisher-11g...

Registered Office : 3605 Sandy Plains Road, Suite 240-404, Marietta, GA 30066, USA
Rittman Mead Oceania Pty Ltd.

Registered Office : 8/196, North Road, Brighton East, Victoria, 3187, Australia Australian Company No. : 149 458 935
Rittman Mead Consulting Pvt Ltd.

#101 Evoma Business Center, 82, Borewell Road, Whitefield Bengaluru, Karnataka 560066 INDIA 2010-2011 Rittman Mead Consulting.

Privacy Policy

E: info@rittmanmead.com

Website Design & Build: tymedia.co.uk

8 of 8

1/18/2012 3:07 PM

You might also like