Oracle WebLogic 12.1.2 is now available. WebLogic 12.1.2 contains EclipseLink 2.4.2, this means that for the first time EclipseLink MOXy's JSON-binding is available in WebLogic out of the box. I will demonstrate the benefits of using MOXy for JSON-binding with an example.
Showing posts with label REST. Show all posts
Showing posts with label REST. Show all posts
July 12, 2013
Oracle WebLogic 12.1.2 Now With EclipseLink MOXy JSON-Binding
Labels:
EclipseLink,
EclipseLink 2.4,
JAX-RS,
JSON,
MOXy,
REST,
WebLogic
June 12, 2013
MOXy is the New Default JSON-Binding Provider in GlassFish 4
GlassFish 4 is now available offering the complete Java EE 7 (JSR-342) platform. EclipseLink made some major contributions to this release. The first is providing the JPA 2.1 (JSR-338) implementation. The second which I'll cover in this post is EclipseLink MOXy is now the default JSON-binding provider for JAX-RS applications.
Labels:
EclipseLink,
EclipseLink 2.5,
GlassFish,
JAX-RS,
JSON,
MOXy,
REST
April 12, 2013
Customizing EclipseLink JPA-RS Messages with MOXy
In a previous post I covered how EclipseLink JPA-RS can be used to expose a JPA persistence unit as a RESTful service. In that example we interacted with the default message formats. Since JPA-RS leverages MOXy for its XML and JSON binding we can use MOXy to customize the messages. In this post I will demonstrate how this is done.
Labels:
EclipseLink,
EclipseLink 2.5,
JAX-RS,
JPA-RS,
JSON,
Mapping File,
MOXy,
REST
Introducing EclipseLink JPA-RS
In a previous series of posts I covered how to create a JAX-RS service that leveraged JPA for the persistence layer. EclipseLink contains a component called JPA-RS that can be used to easily and automatically expose a persistence unit as RESTful service (that supports XML and JSON messages). MOXy provides the XML and JSON-binding for JPA-RS and things like bidirectional mappings are automatically mapped for you. In another post I cover how MOXy can be used to customize the messages shown in this example.
I will use the JPA model that I created in the posts below:
I will use the JPA model that I created in the posts below:
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
April 5, 2013
MOXy and JSON with Padding
JSON with padding is a communication mechanism used in JavaScript to overcome restrictions due to the same origin policy (for more information see: http://en.wikipedia.org/wiki/JSONP). In this post I will demonstrate how to leverage JSON with padding when using MOXy as your JSON provider.
This functionality is new in EclipseLink 2.5.0 (and 2.4.2), you can try it out today using a nightly build available from:
This functionality is new in EclipseLink 2.5.0 (and 2.4.2), you can try it out today using a nightly build available from:
Labels:
EclipseLink,
EclipseLink 2.5,
JAX-RS,
JSON,
MOXy,
REST
May 25, 2012
MOXy as Your JAX-RS JSON Provider - MOXyJsonProvider
In a previous post I demonstrated how you can implement a MessageBodyReader/MessageBodyWriter to leverage EclipseLink JAXB (MOXy)'s JSON binding in a JAX-RS service. MOXy now includes an implementation (MOXyJsonProvider) that can be used directly or extended to make the integration even easier.
Labels:
EclipseLink,
EclipseLink 2.4,
Extension,
JAX-RS,
JSON,
MOXy,
REST
April 17, 2012
Creating a RESTful Web Service - Part 2/5 (XML Metadata)
Java Persistence Architecture (JPA) is the Java EE standard for mapping POJOs to a relational database. In this example we will use JPA to interact with our database data we set up in part 1. In the previous post we specified the mapping metadata as annotations. This post will demonstrate how to specify the same metadata as XML. One advantage of specifying the metadata as XML is that the domain objects will not have a dependency on the JPA APIs. This is useful if we want to use the same domain classes on the client side.
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
March 15, 2012
MOXy as Your JAX-RS JSON Provider - Client Side
Recently I posted how to leverage EclipseLink JAXB (MOXy)'s JSON binding to create a RESTful service. In this post I will demonstrate how easy it is to take advantage of MOXy's JSON binding on the client side.
Labels:
EclipseLink,
EclipseLink 2.4,
Extension,
JAX-RS,
JAXB,
JSON,
MOXy,
REST
March 13, 2012
MOXy as Your JAX-RS JSON Provider - Server Side
In a previous series of posts I covered how EclipseLink JAXB (MOXy) can be leveraged to create a RESTful data access service. In this post I will cover how easy it is to leverage MOXy's JSON binding on the server side to add support for JSON messages based on JAXB mappings.
UPDATE
UPDATE
MOXy now includes an implementation of MessageBodyReader/MessageBodyWriter to make it even easier to leverage MOXy's JSON binding in a JAX-RS application.
Labels:
EclipseLink,
EclipseLink 2.4,
Extension,
JAX-RS,
JAXB,
JSON,
MOXy,
REST
April 11, 2011
MOXy's XML Metadata in a JAX-RS Service
In previous posts I introduced how EclipseLink JAXB (MOXy) can represent it's metadata as XML, and how MOXy can be used in a JAX-RS service. In this post I'll demonstrate how to leverage MOXy's metadata file in a JAX-RS service by using a ContextResolver.
Labels:
EclipseLink,
Extension,
JAX-RS,
Mapping File,
MOXy,
REST
August 23, 2010
Creating a RESTful Web Service - Part 5/5
In this post we will examine how a client may interact with the RESTful service we created in part 4.
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
August 20, 2010
Creating a RESTful Web Service - Part 4/5
Java API for RESTful Web Services (JAX-RS) is the Java EE standard for creating RESTful Web Services. In this post we will create a RESTful service from an EJB session bean using JAX-RS.
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
Creating a RESTful Web Service - Part 3/5
Java Architecture for XML Binding (JAXB) is the Java EE standard for mapping POJOs to XML. In this example we will use JAXB to apply an XML representation to the JPA entities we created in part 2. Since we are mapping JPA entities to XML we will use the EclipseLink JAXB (MOXy) implementation and leverage some of its extensions.
Some developers will maintain separate JPA and JAXB models, and perform a copy step to move data between them. This can be quite a painful and error prone process. Luckily MOXy has a number of extensions that make this unnecessary:
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
Some developers will maintain separate JPA and JAXB models, and perform a copy step to move data between them. This can be quite a painful and error prone process. Luckily MOXy has a number of extensions that make this unnecessary:
August 19, 2010
Creating a RESTful Web Service - Part 2/5 (Annotations)
Java Persistence Architecture (JPA) is the Java EE standard for mapping POJOs to a relational database. In this example we will use JPA to interact with our database data we set up in part 1.
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
August 18, 2010
Creating a RESTful Web Service - Part 1/5
I have been doing a lot of work with data access services recently so I figure it's time to share what I have discovered. Don't be scared off that this series is broken into 5 parts, I will keep them short:
- Part 1 - The Database
- Part 2 - Mapping the Database to JPA Entities
- Part 3 - Mapping JPA entities to XML (using JAXB)
- Part 4 - The RESTful Service
- Part 5 - The Client
In this series of posts we will use a number of standard Java EE technologies to quickly create a RESTful data access service:
- JSR-317 - Java Persistence Architecture (JPA)
- JSR-222 - Java Architecture for XML Binding (JAXB)
- JSR-220 - Enterprise JavaBeans (EJB)
- JSR-311 - The Java API for RESTful Web Services (JAX-RS)
Subscribe to:
Posts (Atom)