Skip to Content
Java EE 8 Application Development
book

Java EE 8 Application Development

by David R. Heffelfinger
December 2017
Intermediate to advanced
372 pages
8h 46m
English
Packt Publishing
Content preview from Java EE 8 Application Development

Developing a RESTful web service client

Although curl allows us to quickly test our RESTful web services and it is a developer-friendly tool, it is not exactly user-friendly; we shouldn't expect to have our user enter curl commands in their command line to use our web service. For this reason, we need to develop a client for our services. JAX-RS includes a standard client-side API that we can use to easily develop RESTful web service clients.

The following example illustrates how to use the JAX-RS client API:

package com.ensode.javaee8book..jaxrsintroclient; import com.ensode.jaxbxmlconversion.entity.Customer; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; public class App { public ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java EE 8 Development with Eclipse

Java EE 8 Development with Eclipse

Ram Kulkarni
Beginning EJB in Java EE 8: Building Applications with Enterprise JavaBeans

Beginning EJB in Java EE 8: Building Applications with Enterprise JavaBeans

Jonathan Wetherbee, Massimo Nardone, Chirag Rathod, Raghu Kodali

Publisher Resources

ISBN: 9781788293679Supplemental Content