Java Code Geeks » Blaise Doughan http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Fri, 27 Mar 2015 17:00:16 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 EclipseLink MOXy and the Java API for JSON Processing – Object Model APIshttp://www.javacodegeeks.com/2013/07/eclipselink-moxy-and-the-java-api-for-json-processing-object-model-apis.html http://www.javacodegeeks.com/2013/07/eclipselink-moxy-and-the-java-api-for-json-processing-object-model-apis.html#comments Mon, 29 Jul 2013 19:00:54 +0000 http://www.javacodegeeks.com/?p=15919 The Java API for JSON Processing (JSR-353) is the Java standard for producing and consuming JSON which was introduced as part of Java EE 7.  JSR-353 includes object (DOM like) and stream (StAX like) APIs.  In this post I will demonstrate the initial JSR-353 support we have added to MOXy‘s JSON binding in EclipseLink 2.6.  ...

 

]]>
http://www.javacodegeeks.com/2013/07/eclipselink-moxy-and-the-java-api-for-json-processing-object-model-apis.html/feed/ 0
MOXy’s @XmlVariableNode – JSON Schema Examplehttp://www.javacodegeeks.com/2013/06/moxys-xmlvariablenode-json-schema-example.html http://www.javacodegeeks.com/2013/06/moxys-xmlvariablenode-json-schema-example.html#comments Thu, 20 Jun 2013 07:00:57 +0000 http://www.javacodegeeks.com/?p=14518 We are in the process of adding the ability to generate a JSON Schema from your domain model to EclipseLink MOXy.  To accomplish this we have created a new Variable Node mapping. In this post I will demonstrate the new mapping by mapping a Java model to a JSON Schema. You can try this out ...

 

]]>
http://www.javacodegeeks.com/2013/06/moxys-xmlvariablenode-json-schema-example.html/feed/ 0
MOXy is the New Default JSON-Binding Provider in GlassFish 4http://www.javacodegeeks.com/2013/06/moxy-is-the-new-default-json-binding-provider-in-glassfish-4.html http://www.javacodegeeks.com/2013/06/moxy-is-the-new-default-json-binding-provider-in-glassfish-4.html#comments Fri, 14 Jun 2013 19:00:13 +0000 http://www.javacodegeeks.com/?p=14151 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. RESTful Service  CustomerService Normally a ...

 

]]>
http://www.javacodegeeks.com/2013/06/moxy-is-the-new-default-json-binding-provider-in-glassfish-4.html/feed/ 0
MOXy’s Object Graphs & Dynamic JAXBhttp://www.javacodegeeks.com/2013/04/moxys-object-graphs-dynamic-jaxb.html http://www.javacodegeeks.com/2013/04/moxys-object-graphs-dynamic-jaxb.html#comments Wed, 17 Apr 2013 13:00:15 +0000 http://www.javacodegeeks.com/?p=11302 JAXB (JSR-222) makes it easy for you to convert instances of your domain classes to/from XML.  The EclipseLink MOXy implementation offers an extension called Dynamic JAXB where instead of real classes you have instances of a map like class called DynamicEntity. You can access the data on your DynamicEntity using get and set methods that ...

 

]]>
http://www.javacodegeeks.com/2013/04/moxys-object-graphs-dynamic-jaxb.html/feed/ 1
Introducing EclipseLink JPA-RShttp://www.javacodegeeks.com/2013/04/introducing-eclipselink-jpa-rs.html http://www.javacodegeeks.com/2013/04/introducing-eclipselink-jpa-rs.html#comments Wed, 17 Apr 2013 10:00:50 +0000 http://www.javacodegeeks.com/?p=11300 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 ...

 

]]>
http://www.javacodegeeks.com/2013/04/introducing-eclipselink-jpa-rs.html/feed/ 0
Java API for JSON Processing (JSR-353) – Stream APIshttp://www.javacodegeeks.com/2013/04/java-api-for-json-processing-jsr-353-stream-apis.html http://www.javacodegeeks.com/2013/04/java-api-for-json-processing-jsr-353-stream-apis.html#comments Wed, 10 Apr 2013 13:00:04 +0000 http://www.javacodegeeks.com/?p=11081 Java will soon have a standard set of APIs for processing JSON as part of Java EE 7. This standard is being defined as JSR 353 – Java API for JSON Processing (JSON-P) and it is currently at the Final Approval Ballot. JSON-P offers both object oriented and stream based approaches, in this post I ...

 

]]>
http://www.javacodegeeks.com/2013/04/java-api-for-json-processing-jsr-353-stream-apis.html/feed/ 2
MOXy’s Object Graphs – Input/Output Partial Models to XML & JSONhttp://www.javacodegeeks.com/2013/03/moxys-object-graphs-inputoutput-partial-models-to-xml-json.html http://www.javacodegeeks.com/2013/03/moxys-object-graphs-inputoutput-partial-models-to-xml-json.html#comments Thu, 28 Mar 2013 14:00:08 +0000 http://www.javacodegeeks.com/?p=10513 Suppose you have a domain model that you want to expose as a RESTful service. The problem is you only want to input/output part of your data. Previously you would have created a separate model representing the subset and then have code to move data between the models. In EclipseLink 2.5.0 we have a new ...

 

]]>
http://www.javacodegeeks.com/2013/03/moxys-object-graphs-inputoutput-partial-models-to-xml-json.html/feed/ 0
Binding to JSON & XML – Handling Collectionshttp://www.javacodegeeks.com/2013/03/binding-to-json-xml-handling-collections.html http://www.javacodegeeks.com/2013/03/binding-to-json-xml-handling-collections.html#comments Tue, 19 Mar 2013 14:00:24 +0000 http://www.javacodegeeks.com/?p=10030 One of EclipseLink JAXB (MOXy)‘s strengths is the ability to map an object model to both JSON and XML with a single set of metadata. The one weakness had been that you needed to compromise on the JSON key or XML element for collection properties. I’m happy to say that this issue has been solved ...

 

]]>
http://www.javacodegeeks.com/2013/03/binding-to-json-xml-handling-collections.html/feed/ 2
JAXB and java.util.Maphttp://www.javacodegeeks.com/2013/03/jaxb-and-java-util-map.html http://www.javacodegeeks.com/2013/03/jaxb-and-java-util-map.html#comments Thu, 07 Mar 2013 11:00:29 +0000 http://www.javacodegeeks.com/?p=9483 Is it ironic that it can be difficult to map the java.util.Map class in JAXB (JSR-222)? In this post I will cover some items that will make it much easier. Java Model Below is the Java model that we will use for this example. Customer The Customer class has a property of type Map . ...

 

]]>
http://www.javacodegeeks.com/2013/03/jaxb-and-java-util-map.html/feed/ 0
Leveraging MOXy in your Web Service via JAX-WS Providerhttp://www.javacodegeeks.com/2013/02/leveraging-moxy-in-your-web-service-via-jax-ws-provider.html http://www.javacodegeeks.com/2013/02/leveraging-moxy-in-your-web-service-via-jax-ws-provider.html#comments Mon, 18 Feb 2013 19:45:55 +0000 http://www.javacodegeeks.com/?p=8724 In previous articles I demonstrated how EclipseLink JAXB (MOXy) is directly integrated into the JAX-WS implementations in WebLogic (as of 12.1.1) and in GlassFish (as of 3.1.2). In this post I’ll demonstrate how to leverage MOXy in any application server by using the JAX-WS Provider class. Web Service The Provider mechanism in JAX-WS provides you ...

 

]]>
http://www.javacodegeeks.com/2013/02/leveraging-moxy-in-your-web-service-via-jax-ws-provider.html/feed/ 1