Eclipse - How to consume a web service (OBIEE) with WTP ?

Card Puncher Data Processing

About

The aim of this article is to show how with WTP, the Web Tools Platform Plugin of Eclipse, you can consume a web service. All the details about the Web Service Subproject can be found on this page.

For this purpose, we will use the Web Service that offer OBIEE.

How to

Install / Download WTP

First, you need to install WTP:

Eclipse Wtp Installation Update

or you can just download a complete bundle.

You will find for instance in WTP:

  • The Jst Server: J2EE Server Tools framework and adapters for selected popular J2EE servers such as Apache Tomcat and OC4J

Creation of a project

First, we need to create project that support the web service. If you go to the preference (Menu/Window/Preference), you can see in the Project Toplology of the web service, that you can use three type of client :

  • Dynamic Web Project
  • JPA Project
  • Java Utility Project

Eclipse Wtp Webservice Preference Project Topo

Therefore, we start by creating a java utility project : Menu / File / New Project / Java EE / Utility Project

Eclipse New Utility Project Wizard

Eclipse New Utility Project

I use the OC4J server of OBIEE. If you don't know how to configure OBIEE to use OC4J, you can have a look to this article : Eclipse - How to add OC4J as an Eclipse server

Web service client wizard

Then, we have to consume the web service by launching the new web service client wizard and giving it the WSDL file location. For OBIEE, the web service URL is in the form :

http://obiee_host:port/analytics/saw.dll?WSDL

The WSDL contain the complete definition of all class and function that provide the Web Service. More about WSDL ….

Right click on your project, New / Others / Web Service / Web Service Client

Eclipse Wtp Web Service Client

Next, we give the web service URL :

http://obiee_host:port/analytics/saw.dll?WSDL

The level must be by default on “Deploy Client”.

Eclipse Wtp Web Service Client 1

Next, check the check box “define custom mapping for …”.

Eclipse Wtp Web Service Client 2

In the next step, you have to enter the namespace of the OBIEE webservice implementation. You can find it in the WSDL file. Just enter the URI, in a browser and you will see in the first line the OBIEE WSDL namespace :

http://obiee_host:port/analytics/saw.dll?WSDL

Obiee Namespace Wsdl

In the above case, we fina that the namespace is com.siebel.analytics.web/soap/v5.

Then we click on the Add button and enter this values :

  • namespace : com.siebel.analytics.web/soap/v5
  • package : com.siebel.analytics.web.soap.v5

The name of the package must follow the Java rules. No slash as you can find in the namespace.

Eclipse Wtp Web Service Client 3

The result

When you click on the finish button, WTP will create all class and functions by parsing the WSDL file.

Eclipse Wsdl Client Class

You are now ready to use them !

Reference





Discover More
Bip Eclipse Web Service
BIP - Web Service

Getting Started with BIP Web Service How to generate the BI Publisher Stub Classes See See Include the following jar files in your classpath activation.jar from the Java...
Card Puncher Data Processing
Eclipse

Workspace log : workspace/.metadata/.log. Configuration log : configuration/ -console : Open eclipse with a console -consoleLog : prohibit the plug-ins to silently log entries to the log file -debug...
Obiee Answer Cross Join
OBIEE - How to retrieve a result set with the XMLViewService WebService and the logical SQL ?

This article show you how you can easily retrieve information with the help of the XMLViewService OBIEE web services. We are going to make a simple connexion, then sending an Obiee Logical Sql to retrieve...



Share this page:
Follow us:
Task Runner