Eclipse - How to consume a web service (OBIEE) with WTP ?
Table of Contents
1 - About
For this purpose, we will use the Web Service that offer OBIEE.
2 - Articles Related
3 - How to
3.1 - Install / Download WTP
First, you need to install WTP:
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
3.2 - 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
Therefore, we start by creating a java utility project : Menu / File / New Project / Java EE / 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
3.3 - 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 :
Right click on your project, New / Others / Web Service / Web Service Client
Next, we give the web service URL :
The level must be by default on “Deploy Client”.
Next, check the check box “define custom mapping for …”.
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 :
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
4 - The result
When you click on the finish button, WTP will create all class and functions by parsing the WSDL file.
You are now ready to use them !