Feign makes writing java http clients easier
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Marvin Froeder 0e005445b2 [ci skip] updating versions to next development iteration 13.1-SNAPSHOT 11 months ago
..
src Retryer: replace an instance of Date with an epoch millisecond (#2170) 1 year ago
README.md Update README.md (#2148) 1 year ago
pom.xml [ci skip] updating versions to next development iteration 13.1-SNAPSHOT 11 months ago

README.md

JAXB Codec

This module adds support for encoding and decoding XML via JAXB.

Add JAXBEncoder and/or JAXBDecoder to your Feign.Builder like so:

JAXBContextFactory jaxbFactory = new JAXBContextFactory.Builder()
    .withMarshallerJAXBEncoding("UTF-8")
    .withMarshallerSchemaLocation("http://apihost http://apihost/schema.xsd")
    .build();

Response response = Feign.builder()
                         .encoder(new JAXBEncoder(jaxbFactory))
                         .decoder(new JAXBDecoder(jaxbFactory))
                         .target(Response.class, "https://apihost");

JAXBDecoder can also be created with a builder to allow overriding some default parser options:

JAXBDecoder jaxbDecoder = new JAXBDecoder.Builder()
    .withJAXBContextFactory(jaxbFactory)
    .withNamespaceAware(false) // true by default
    .build();

Usage

The feign library is available from Maven Central.

<dependency>
    <groupId>io.github.openfeign</groupId>
    <artifactId>feign-jaxb</artifactId>
    <version>??feing-jaxb-version??</version>
</dependency>