Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
146 lines (119 sloc) 6.57 KB

jaxrs-client: JAX-RS Client API example

The jaxrs-client quickstart demonstrates JAX-RS Client API, which interacts with a JAX-RS Web service that runs on {productName}.

What is it?

The jaxrs-client quickstart demonstrates the JAX-RS Client API which interacts with a JAX-RS Web service.

This client "calls" many POST, GET, and DELETE operations using different ways: synchronized, asynchronous, delayed and filtered invocations.

Investigate the Console Output

When you run the Arquillian tests, Maven prints summary of the performed tests to the console. You should see the following results.

Running requestResponseFiltersTest
INFO: ### Testing Request and Response Filters ### requestResponseFiltersTest
INFO: dropping all contacts requestResponseFiltersTest
INFO: Invoking create new contact using a ClientRequestFilter requestResponseFiltersTest
INFO: Invoking list all contacts using a ClientResponseFilter filter
INFO: Date: Mon Dec 29 15:34:45 BRST 2014- Status: 200 delayedInvocationTest
INFO: ### Testing Delayed invocaton ### delayedInvocationTest
INFO: dropping all contacts delayedInvocationTest
INFO: Creating a new contact invocation delayedInvocationTest
INFO: Creating list all contacts invocation delayedInvocationTest
INFO: invoking the new contact delayedInvocationTest
INFO: invoking list all contacts ASYNC asyncCrudTest
INFO: ### CRUD tests  ASYNC ### asyncCrudTest
INFO: dropping all contacts ASYNC asyncCrudTest
INFO: creating a new contact ASYNC asyncCrudTest
INFO: delete a contact by id ASYNC asyncCrudTest
INFO: fetching all contacts ASYNC invocationCallBackTest
INFO: ### Testing invocation callback ### invocationCallBackTest
INFO: dropping all contacts invocationCallBackTest
INFO: Creating a InvocationCallback invocationCallBackTest
INFO: Invoking a service using the InvocationCallback cruedTest
INFO: ### CRUD tests ### cruedTest
INFO: dropping all contacts cruedTest
INFO: creating a new contact cruedTest
INFO: fetching a contact by id cruedTest
INFO: fetching all contacts cruedTest
INFO: delete a contact by id
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.51 sec - in

Results :

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0

To run the tests in {JBDSProductName}:

  1. You must first set the active Maven profile in project properties to be either arq-managed for running on managed server or arq-remote for running on remote server.

  2. Then, to run the tests, right click on the project or individual classes and select Run As –> JUnit Test in the context menu.

You can’t perform that action at this time.