Generating Taleo Web Service Client using Eclipse Juno

Here is the short Tutorial on how to create the Taleo Web Service APIs using Eclipse Juno.

Creating the 2 WS clients needed access the Taleo WS API.

http://tbe.taleo.net/wsdl/DispatcherAPI.wsdl

http://tbe.taleo.net/wsdl/WebAPI.wsdl

Taleo uses Axis to generate their WSLD’s. This can be seen by viewing the WSLD comments. We used Eclipse Juno to generate the WS Clients.

Create 2 new Java Projects

  • TaleoDispatcherClient
  • TaleoWebAPIClient
Generating Taleo Web Service APIs
Taleo Create Java Project
Taleo Web Client

Download the WSLD and save them into the root of their project

  • TaleoDispatcherClient/DispatcherAPI.wsdl
  • TaleoWebAPIClient/WebAPI.wsdl
Taleo WSDLs in eclipse
Next, right click the WSDL and select: Web Services –> Generate Client
  • Note: You must right click the WSLD file not the project
  • Note: If you do not see “Web Services” in your menu you may have to enable all capabilities: Preferences –> General –> Capabilities : “Enable All” : “OK
taleo-generate-client
Drag the slider bar on the left up until you see “Assemble Client”.

Assemble Web Service Client

taleo-axis-libraries

  • The WebAPI.wsdl will generate a lot more classes since the WSDL Types (Schema) are generated into Java Beans.  The DispatcherAPI.wsdl passes Strings so it does not generate any Schema Types.

Create a new source package called ‘test’ for each web service.

taleo-test
Create unit test source folder.

 

 

Select the ‘IWebAPI.java’ class, right click and create a new “JUnit Case”

  • Make sure to change the “source folder” to test
  • Check the ‘setUp()’ box
  • Check the ‘generate comments’ box because comments are good!
  • Click “Next”; NOT “FINISH”
  • If you are asked to add Junit 4 to the class path, click OK.
  • After clicking “Next” you should be able to select all Test Methods
taleo-generate-unit-test
Create a unit test using eclipse.
taleo-generate-unit-test-2
Create a new Unit test using Eclipse.

 

taleo-test-methods
Select test methods for the JUnit test.
taleo-unit-test-case
Create a JUnit 4 test case.

Instantiate the Server in the ‘test/TBEWebAPI.IWebAPITest.setUp()’

tbewebapi
Instantiating Taleo Web Service JUnit test.

Instantiate the ‘test/IWebAPITest.testCreateTask()’ method

testCreateTask
Creating a JUnit test for Taleo Web Service.

 

Run Junit Test:

run-taleo-test
Running tests against Taleo Web Service using Eclipse

 

 

 

Tagged with: , , , , ,
Posted in Tech Talk, Tutorials