6.3.1.4. Launching a REST Service and Preview Server Console Messages

With eXo IDE, you cannot only write and deploy services, but launch these services and view service response in the Output tab. You can view WADL-description of methods, make requests with your ownheader, query, path parameters and body content using one of the supported methods. To do that, simply click on the toolbar,

Or, go to RunLaunch REST Service... from the top menu as follows:

  1. Select the deployed REST Service.

  2. Click on the toolbar to get the REST Service form which is relied on the WADL-description of REST Service.

  3. Select and type the path to the service in the Path field. Path parameters are enclosed in curly braces.

  4. Select one of the supported methods from the Method combo-box.

  5. Select the appropriate Request Media Type.

  6. Check the Response Media Type.

  7. Uncheck the redundant query parameters and set values of the rest in the table at the bottom of the dialog window.

  8. Go to the Header Parameters middle tab and set appropriate values.

  9. Set request with the body content within the Body tab. This tab is disabled for the GET request.

  10. Click Send.

    You will receive a success message if the path is verified to be correct or an error message in the Output tab.

    To learn about launching REST Service, see the REST Service operations illustration above.

    The following table shows annotations of reproducing service in the Launch REST Service form:

    REST Service AnnotationElement of Launch REST Service form
    @Path The Path field
    @GET, @POST,... The Method field.
    @Consumes The Request Media Type field.
    @Produces The Response Media Type field.
    @PathParam The path parameters figured in curly braces, for example, /service/{ param}/{paramList: .+}.
    @HeaderParam The Header Parameter tab of the bottom table.
    @QueryParam The Query Parameter tab of the bottom table.
    @DefaultValue The By default column of the bottom table.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus