Articles Tagged ‘webservice’

Creating REST Clients for JAX-RS based Webservices with Netflix Feign

Thursday, October 22nd, 2015

For us developers there plenty of libraries exist helping us in deriving and generating clients for existing RESTful web-services and I have already covered some of the in this blog (e.g. the JAX-RS Client API). Nevertheless, I’d like to share my experience with another interesting lightweight library here: Netflix Feign.

Feign offers a nice fluent-builder API, a rich integration for  common libraries and APIs like JAX-RS, Jackson, GSON, SAX, JAX-B, OkHttp, Ribbon, Hystrix, SLF4J and more and last bot not least, it is setup easy and the service contracts are specified using interfaces and annotations.

In the following tutorial I’d like to demonstrate how to derive a service binding from a simple, JAX-RS based RESTful web-service, how to create the service adapter using the integrated builder and at last, performing CRUD operations.

(more…)

Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer

Tuesday, June 16th, 2015

A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.

In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.

The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.

(more…)

JAX-RS 2.0 REST Client Features by Example

Monday, December 30th, 2013

JAX-RS 2.0 aka JSR 339 not also specifies the API to build up a RESTful webservice but also enhances the client side API to easen up the process of writing a client for a REST service.

In the following tutorial we’re building up a client for a ready-to-play REST service and explore the different new options e.g. how to handle requests in a synchronous or asynchronous way, how to add callback handlers for a request, how to specify invocation targets to build up requests for a later execution or how to filter the client-server communication using client request filters and client response filters.

(more…)

Testing RESTful Web Services made easy using the REST-assured Framework

Sunday, October 23rd, 2011

REST-assured Integration Test Tutorial Logo There are many frameworks out there to facilitate testing RESTful webservices but there is one framework I’d like to acquaint you with my favourite framework named REST-assured.

REST-assured offers a bunch of nice features like a DSL-like syntax, XPath-Validation, Specification Reuse, easy file uploads and those features we’re going to explore in the following article.

With a few lines of code and Jersey I have written a RESTful web service that allows us to explore the features of the REST-assured framework and to run tests against this service.

(more…)

Creating a REST Client Step-by-Step using JAX-RS, JAX-B and Jersey

Thursday, November 25th, 2010

Often in a developer’s life there is a REST service to deal with and nowadays one wants a fast and clean solution to create a client for such a service.

The following tutorial shows a quick approach using JAX-RS with its reference implementation, Jersey in combination with JAX-B for annotation driven marshalling between XML or JSON structures and our Java-Beans.

(more…)

How to create a Confluence SOAP Component in 5 Minutes

Sunday, October 24th, 2010

You’re using the popular Confluence wiki? You’re using its RPC/SOAP API and missing a function you really need? Just extend the  capabilities of the Confluence RPC API by programming a custom web service component – it is really easy and also well documented.

In this tutorial we’re going to take a look on how to quickly implement a SOAP service, securing it and putting its methods in a transactional context.

(more…)

Creating a SOAP Service using JAX-WS Annotations

Thursday, September 23rd, 2010

It is possible to create SOAP webservices with only a few lines of code using the JAX-WS annotations. In a productivity environment you might prefer using contract-first instead of code-first to create your webservice but for now we’re going to use the fast method and that means code-first and annotations olé!

(more…)

Create a SOAP client using the JAX-WS Maven Plugin

Thursday, April 8th, 2010

Having written the article “How to build a Confluence SOAP client in 5 minutes” some readers asked me for some more information and help using the  JAX-WS plugin that I mentioned in the article instead of the Axis plugin – so here we go ;) (more…)

Search
Categories