[8.5.5.4 or later]

Generating a JAX-RS resource from a WADL file

You can generate a Java™ API for RESTful Web Services (JAX-RS) resource from a Web Application Description Language (WADL) file in a web service application.

Before you begin

Important: Applicable to Liberty
Complete the following setup for WebSphere® Application Server Developer Tools for Eclipse:
  • Add the Liberty run time to the preferences.
  • Create a Liberty server in the Servers view.
  • Create a web project that targets the Liberty runtime environment.
  • Import a WADL file into the workspace.

Procedure

  1. In the Enterprise Explorer view, locate the WADL file.
  2. Right-click the file and select Web Services > Generate the JAX-RS Service from WADL.

    The JAX-RS Service Generation from WADL dialog is displayed.

    • The Source Folder field specifies the destination folder of the generated client.
    • The Name field specifies the Java class name of the client.
    • The Package field specifies the Java package name of the client.
  3. Accept the defaults and click Finish, or make modifications as appropriate.

Results

You created a JAX-RS resource. The generated code is in the destination folder.

What to do next

You can deploy the web application and test out the service. You can also generate sample client code from your JAX-RS resource.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: t_jaxrs_scc_wadl.html