JAX-RS 2.0 with Apache CXF

Similar documents
JAX-RS 2.0 With Apache CXF Continued. Sergey Beryozkin, Talend

RESTful Java with JAX-RS 2.0 and Jersey

REST WEB SERVICES IN JAVA EE 6 AND SPRING 3. Srini Penchikala Austin Java User Group March 30, 2010

RESTful Java with JAX-RS

JAX-RS. Sam Guinea

<Insert Picture Here> JAX-RS 2.0 What's New in JSR 339?

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Rest Client for MicroProfile. John D. Ament

Rest Client for MicroProfile. John D. Ament, Andy McCright

Create and Secure Your REST APIs with Apache CXF

Rest Client for MicroProfile. John D. Ament, Andy McCright

Rest Client for MicroProfile. John D. Ament, Andy McCright

Developing Applications for the Java EE 7 Platform 9-2

JAX-RS 2.1 Reloaded. Santiago Pericas-Geertsen JAX-RS Co-Spec Lead. #jax-rs

JVA-563. Developing RESTful Services in Java

RESTful Java with JAX-RS 2.0

RESTEasy. Distributed peace of mind

Apache Wink User Guide

Oliver Wulff / Talend. Flexibles Service Enabling mit Apache CXF

What s New in JAX-RS 2.1?

Introduc)on to JAX- RS 3/14/12

Apache Wink Developer Guide. Draft Version. (This document is still under construction)

Stefan Tilkov innoq Deutschland GmbH REST + JSR 311 Java API for RESTful Web Services

Keep Learning with Oracle University

Apache Wink 0.1 Feature Set

Oracle Fusion Middleware Developing and Securing RESTful Web Services for Oracle WebLogic Server. 12c ( )

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

JAX-RS and Jersey Paul Sandoz

[CON7983] JAX-RS 2.1 for Java EE 8

5.1 Registration and Configuration

JAX-RS and CDI Bike the (ReacIve) Bridge CON2549

Apache CXF Web Services

Restful Application Development

Keep Learning with Oracle University

JavaEE.Next(): Java EE 7, 8, and Beyond

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

Session 12. RESTful Services. Lecture Objectives

Open Java EE and Eclipse MicroProfile - A New Java Landscape for Cloud Native Apps

REST & JSR 311. Stefan Tilkov, innoq Deutschland GmbH November 2008

JAX-RS: Java API for RESTful Web Services

JAX-RS: REST, the Java Way. Stefan Tilkov,

BEAAquaLogic. Service Bus. JPD Transport User Guide

2 Apache Wink Building Blocks

SERVICE TECHNOLOGIES

RESTful Web Services. 20-Jan Gordon Dickens Chariot Solutions

RESTful Services. Distributed Enabling Platform

RESTful SCA with Apache Tuscany

Red Hat JBoss Enterprise Application Platform 7.1

Web Service and JAX-RS. Sadegh Aliakbary

C exam. IBM C IBM WebSphere Application Server Developer Tools V8.5 with Liberty Profile. Version: 1.

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Java EE 6: Develop Web Applications with JSF

JSR 311: JAX-RS: The Java API for RESTful Web Services

JAX-RS 2.1 New Features

Hands-on Development of Web Applications with Java EE 6

Using SMI-S with the Cloud Data Management Interface Scott Baker September 21th, 2010

Lecture 4: Security and Access Control

RESTful Java Web Services

Download at WoweBook.Com

Java J Course Outline

Migrating traditional Java EE applications to mobile

JakartaEE and the road ahead An ASF View. Mark Struberg, RISE GmbH, Apache Software Foundation, INSO TU Wien

Java EE 7 is ready What to do next? Peter Doschkinow Senior Java Architect

JSR 365 (CDI 2.0) Review

SUN. Java Platform Enterprise Edition 6 Web Services Developer Certified Professional

Java EE 8 What s coming? David Delabassee Oracle May 17, 2017

JBoss SOAP Web Services User Guide. Version: M5

Java SE7 Fundamentals

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

Want to read more? It s also available at your favorite book retailer, including the ibookstore, the Android Marketplace, and Amazon.com.

Baking a Java EE 8 Micro Pi Mike Croft Ondrej Mihályi. Payara Support

JAX-WS 2.2 and JAX-RS 1.1 support in WebSphere Application Server Version 8.0 Beta

Modern web applications and web sites are not "islands". They need to communicate with each other and share information.

1 Markus Eisele, Insurance - Strategic IT-Architecture

Developing Applications with Java EE 6 on WebLogic Server 12c

JAX-RS: Java API for RESTful Web Services

JAVA. 1. Introduction to JAVA

Courses For Event Java Advanced Summer Training 2018

Lisa Banks Distributed Systems Subcommittee

IBM WebSphere Application Server 8. Java EE 6 Feature Packs

JAX-RS: Java API for RESTful Web Services

Optimizing Enterprise Java for a Microservices Architecture Otávio

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

GlassFish Project Web Services Stack Metro : Easy to Use, Robust, and High-Performance

Keep Learning with Oracle University

INVESTIGATING QoS OF REAL WORLD WEB SERVICES

Eclipse MicroProfile: Accelerating the adoption of Java Microservices

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

What is tackled in the Java EE Security API (Java EE 8)

Java EE 6 - Update Harpreet Singh GlassFish Portfolio Product Manager

open source community experience distilled

DEVELOPING WEB AZURE AND WEB SERVICES MICROSOFT WINDOWS AZURE

Eclipse SOA Tools Platform Project

See JAXB for details how you can control namespace prefix mappings when marshalling using SOAP data format.

Reactive Java EE - Let Me Count the Ways!

Developing RESTful Web services with JAX-RS. Sabyasachi Ghosh, Senior Application Engneer Oracle

Reliable asynchronous web-services with Apache CXF

Java Training Center, Noida - Java Expert Program

Mobile Computing. Logic and data sharing. REST style for web services. Operation verbs. RESTful Services

Transcription:

JAX-RS 2.0 with Apache CXF

Sergey Beryozkin Talend sberyozkin.blogspot.com

Apache CXF Overview Ships production-quality WS and RS modules Common runtime, transports, interceptors, features Runs in Servlet and OSGi containers Blueprint, Spring, CDI (in progress) CXF 3.0: JAX-RS 2.0, OAuth2, WSSec Streaming, WebSocket Major Focus on Security, Interoperability, Compatibility SubProjects: Fediz SSO, DOSGi CXF Philosophy: what works best for the user wins

Brief History of JAX-RS Server and client HTTP services made easy Great for REST and HTTP applications in general JAX-RS 1.0: Oct 2008, Paul Sandoz, Mark Hadley, Sun JAX-RS 1.1: Nov 2009 Jersey: RI. RestEasy (Bill Burke). Apache CXF catches up. Apache Clereza, Apache Wink; other projects adopt JAX-RS Oracle acquires Sun, Paul and Mark leave, is JAX-RS dead? JAX-RS 2.0: Marec Potociar and Santiago Pericas-Geertsen JAX-RS 2.0: May 2013, major improvements Next: 2.1 planning is under way, 3.0 will follow

JAX-RS 1.0 features Root and subresource service resources Annotations mark resource methods URI, headers, payloads captured as method parameters Message Body providers handle reads/writes Injected contexts help with the request processing Response: beans or beans and headers Very good support for conditional HTTP requests Basic server streaming and link builder support Code example...

Typical JAX-RS API terms @Path( root ), @Path( /book/{id}/{type} ) @GET, @POST, @PUT, @DELETE, custom HTTP methods @PathParam, @QueryParam, @HeaderParam @Produces, @Consumes, MediaType UriInfo context, UriBuilder, URI EntityTag, CacheControl, Cookie, NewCookie, Variant SecurityContext, HttpHeaders, Request, UriInfo contexts ResponseBuilder, Response MessageBodyWriter, MessageBodyReader, Providers

JAX-RS 2.0 features Client API: sync and async calls, fluent style Top class support for asynchronous servers Server and client in/out filters and interceptors Targeted and dynamic binding of filters Extended exception hierarchy Injection support for sub-resources Support for grouping and converting parameters Link header builder Matching algorithm improvements

Typical 2.0 API terms ClientBuilder, Client, WebTarget ClientRequestFilter, ClientResponseFilter ContainerRequestFilter, ContainerResponseFilter WriterInterceptor, ReaderInterceptor @NameBinding, @Priority Feature, Configuration, DynamicFeature ParamConverterProvider, BeanParam, Form Link, Link.Builder AsyncResponse, RequestInfo, RequestContext

2.0: Client API ClientBuilder Client WebTarget Invoker SyncInvoker, AsyncInvoker (Future, InvocationCallback) JAX-RS 1.0 Response is reused on the client side (+1) Type-safe reads: Response.readEntity(Book.class), etc Client in/out filters and interceptors Support for setting SSL properties Sophisticated configuration and features support Nice mapping of error statuses to exceptions Code Example...

2.0: Server Filters In/out filters and reader/writer interceptors Advanced customization of requests and responses In filters can block requests, interceptors reads/writes Global or method-specific filters (@NameBinding) Priority-ordered chains (@Priority) Bound statically or dynamically (DynamicFeature) Normal and exceptional responses go via out chains Code example...

2.0: Suspended requests The complexity is hidden by simple API The request can be suspended once or many times TimeoutHandler controls the number of suspensions Suspended requests can be resumed or canceled Requests resumed with responses or exceptions Notifications of the responses being sent Notifications of the disconnected clients (write time only) Code example...

2.0: Miscellaneous User-friendly exception hierarchy NotFoundException = new WebApplicationException(404) ResourceInfo Context: current resource class and method ResourceContext Context: injection into subresources HTTP Link Header Builder Matching across multiple roots with the same Path Server and client parameter conversion support Capturing of request parameters and contexts into beans Features and configuration Code example...

My JAX-RS favourites All of JAX-RS is cool, but the following shines: 1.0: Request Context and Conditional HTTP real gem 2.0: Asynchronous/suspended invocations top design

JAX-RS 2.0 Compliance CXF tested against jaxrstck-2.0_26-feb-2013 Final 2.0 TCK is not available to Apache => Technically complete but no 'formal compliance' tag Apache projects working with JCP specifications may be affected by the TCK unavailability

Links CXF JAX-RS: cxf.apache.org/docs/jax-rs.html Examples: github.com/sberyozkin/jaxrs20examples JAX-RS: https://jax-rs-spec.java.net/

Questions?