Home » Tag Archives: JAXB

Tag Archives: JAXB

JAXB Tutorial for Java XML Binding – The ULTIMATE Guide

java-logo

Java offers several options for handling XML structures and files. One of the most common and used ones is JAXB. JAXB stands for Java Architecture for XML Binding. It offers the possibility to convert Java objects into XML structures and the other way around. JAXB comes with the JRE standard bundle since the first versions of the JRE 1.6. The ...

Read More »

The JAXB Well Known Secret

java-interview-questions-answers

Introduction I rediscovered a library that Java offers to the masses. When I first read the specification, I was confused and thought I needed all these special tools to implement. I found recently that all was needed was some annotations and a POJO. JAXB JAXB stands for Java Architecture for XML Binding. This architecture allows a developer to turn the ...

Read More »

JAXB – A Newcomer’s Perspective, Part 2

java-logo

In Part 1 of this series, I discussed the basics of loading data from an XML file into a database using JAXB and JPA. (If JSON is called for instead of XML, then the same idea should translate to a tool like Jackson.) The approach is to use shared domain objects – i.e. a single set of POJOs with annotations ...

Read More »

JAXB – A Newcomer’s Perspective, Part 1

java-logo

I know what a lot of you are already thinking, so let’s get this out of the way: “JAXB? As in XML? Come on, all the cool kids are using JSON.” The “XML vs. JSON” debate and the many arguments that contribute to it are pretty well documented; I won’t spend a lot of time rehashing them here. I believe ...

Read More »

Generate your JAXB classes in a second with xjc

java-interview-questions-answers

Since JAXB is part of the JDK, it is one of the most often used frameworks to process XML documents. It provides a comfortable way to retrieve and store data from XML documents to Java classes. As nearly every Java developer has already used JAXB, I will not explain the different JAXB annotations. Instead I will focus on a little ...

Read More »

Custom Spring namespaces made easier with JAXB

spring-interview-questions-answers

First of all, let me tell this out loud: Spring is no longer XML-heavy. As a matter of fact you can write Spring applications these days with minimal or no XML at all, using plenty of annotations, Java configuration and Spring Boot. Seriously stop ranting about Spring and XML, it’s the thing the of the past. That being said you ...

Read More »

Orika: Mapping JAXB Objects to Business/Domain Objects

java-interview-questions-answers

This post looks at mapping JAXB objects to business domain objects with Orika. Earlier this month, I covered the same mapping use case using reflection-based Dozer. In this post, I’ll assume the same example classes need to be mapped, but they will be mapped using Orika instead of Dozer. Dozer and Orika are intended to solve the same type of ...

Read More »

Dozer: Mapping JAXB Objects to Business/Domain Objects

java-interview-questions-answers

Dozer is an open source (Apache 2 license) "Java Bean to Java Bean mapper that recursively copies data from one object to another." As this description from its main web page states, it is used to map two JavaBeans instances for automatic data copying between the instances. Although these can be any of the many types of JavaBeans instances, I ...

Read More »

Mockito – RETURNS_DEEP_STUBS for JAXB

mockito-logo

Sorry for not having written for some time but I was busy with writing the JBoss Drools Refcard for DZone and I am in the middle of writing a book about Mockito so I don’t have too much time left for blogging… Anyway quite recently on my current project I had an interesting situation regarding unit testing with Mockito and ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close