Skip to main content

New Article: Rapid Web Services Development with Moose XML

Posted by editor on April 29, 2010 at 5:43 AM PDT

We've just published a new article, Rapid Web Services Development with Moose XML, by Michael Quigley. Moose XML is a framework Michael began working on after having "experienced some of the rough edges in existing XML marshalling solutions when used in web services environments." Michael says:

This article will give you a quick tour of Moose XML. I'll start by showing you the basics of creating a mapping. I'll finish by showing you how this can be plugged into Spring Web Services, creating a rapid web services development stack. We'll create a simple "purchase order" web service, allowing for storage and retrieval of simplified purchase order data.

The article has code snippets that illustrate how to utilize the Moose XML framework to both speed up and simplify the task of developing "contract last" web services (support of "contract first" development approaches is planned for future Moose XML releases). Michael illustrates:

  • Creating the Mapping (between object data and its XML representation)
  • Marshalling and Unmarshalling
  • Spring Web Services Integration with Moose XML
  • Building the Example from the Source Distribution

Early in the article, Michael notes that:

Moose XML's schema generator is what distinguishes it from the other frameworks. The schema generator can generate an XML schema directly from your annotated Java beans.

In his conclusion, Michael states:

There are many tools and frameworks for getting XML data into and out of Java applications. Moose XML tries to smooth some of the rough edges that are typically encountered when prototyping and rapidly developing XML web services. In these scenarios, generating the schema and contract information from code ("contract last") seems to be the least cumbersome methodology.

Take a look at Rapid Web Services Development with Moose XML if you're engaged in developing contract last web services, and you need a framework that will enable you to be more productive. And if your platform includes Spring, Moose XML is ready to assist there as well.

In Java Today, Shai Almog presents Musix On The BlackBerry Device:

I got a demo device from TriPlay to show off Musix running on the blackberry device using the blackberry native LWUIT port. The UI worked pretty smoothly and was relatively easy to port, most of the work in porting was related to networking on the RIM devices which is really complicated. While the menus/UI is in Hebrew the application shows off background downloading with decryption on the fly...

Alexis Moussine-Pouchkine discusses WEB-INF/lib/{*.jar}/META-INF/resources:

Modularity is one of the themes for Java EE 6 and servlet 3.0 fragments one often mentioned as one examples of this (see details here). This blog entry is about a small yet very useful new feature of the servlet 3.0 specification to deal with static content such as images, CSS or JavaScript. Before servlet 3.0, images could be made accessible from the root of the web applications but that meant copying the files to the WAR archive and keeping them up-to-date. This certainly meant a solution tightly coupled with the web application development and packaging. The other option was to place this static content in the docroot of the application server...

Pelegri posted CLI, Roller, Jersey, JavaOne... and More GlassFish News - April 27th, 2010:

Install and Run Apache Roller 4.01 on GlassFish and OpenSolaris: Dave Koelmeyer has posted Detailed Instructions on how to install Apache Roller 4.01 on GlassFish v2.1 using MySQL 5.1 for storage.  He uses OpenSolaris snv_134, the subject of a tea-leaf-reading thread. Slides and Code Samples on Jersey and JAX-RS: The Slides and code from Paul Sandoz's presentation at Presentation at AlpesJug on Jersey, JAX-RS and Atmosphere are now now available.  The actual presentation was in French, but the slides are in English, and the code is... code. Invoke OSGi Service from JAX-WS Endpoint ...

Mitchell Pronschinske presents A Guide to Maven 3 Beta:

In just over six years, Apache Maven has become one of the most coveted tools for project build and reporting management. It's been five years since the release of Maven 2 and now the Maven committers have released the next landmark version of the software. The first beta release of Maven 3, which is now feature complete after 7 public alphas, was released this week. Maven founder and Sonatype CTO Jason van Zyl answered some questions for DZone about Maven 3 earlier this month. Below are the main new feature categories of Maven 3...

In the Weblogs, Calvin Austin talks about the Easiest way to ship buggy applications:

Do you remember the email you got to tell you that your jre had a vulnerability? No? What about the fact that Java 5 is in an end of life phase. Given the time it has taken for Java 7 to appear its has somewhat slowed the normal EOL pace of the Java platforms. You may not know that Java 1.4.2 for business will be supported commercially until April 2018, which is kind of mind-boggling. Thats like offering support for Windows 95 even now. At some point you should move and I would recommend most developers to be at least on Java 6 as its going to be around for a while...

Michael Van Geertruy has posted his first two blogs on His second post presents The Three Phases of FESI research:

FESI is the Free and open source software Enterprise Solutions Institute. We are a research program designed to study tomorrow's internet technologies as a means to teach folks in the local workforce how to use technologies our customers will likely want to implement.  We also perform this research to prepare local engineers with the knowledge and skills to help introduce newer technologies into existing enterprises.  Finally, the integration code we create will be uploaded to and available to everyone under the GPL. To achieve these goals, we will roll out our initial research in three phases: phase one we will complete setting up the research program and introduce members to some of the core technologies we work with, phase two we will construct a web-application using well established technologies, and phase three we will begin replacing the well-established technologies with cutting edge (but proven) technologies...

In the Forums, hyan85 has a question about Metro 2 Support for SpnegoContextToken?: Hello: I am working on web services project, which uses WCF-generated wsdl to create Java clients to call web service provided by our vendor. Unfortunately, the Java client fails. I use metro 2 wsimport utility to create a Java client code and...

In the LWUIT forum, njafelle asks if Font and setDefaultFont doesn't work?: Hi all, I'm Nicolas and I trying to put in the Midlet this line of code: Font.setDefaultFont(Font.createSystemFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL)); but the main problem is that doesn't work and...

In the GlassFish WebTier forum, jweight notes ui:composition with template behaving strangely: I am seeing some strange behavior when trying to convert a JSF 1.2 app in GF2 to JSF 2 in GF3. It worked fine previously. Here is the problem. I have a simple page as follows...

Our Spotlight this week is the NetBeans IDE 6.9 Beta Release:

NetBeans 6.9 Beta introduces the JavaFX Composer, a visual layout
tool for visually building JavaFX GUI applications, similar to the Swing
GUI builder for Java SE applications. Additional highlights include OSGi
interoperability for NetBeans Platform applications; support for JavaFX
SDK 1.3, PHP Zend framework, and Ruby on Rails 3.0; as well as
improvements to the Java Editor, Java Debugger, and issue tracking, and
more. NetBeans 6.9 Beta is available in English, Brazilian Portuguese,
Japanese and Simplified Chinese, as well as in several
community-translated languages. Learn more:

This week's Poll asks What is the most important enhancement in JavaFX 1.3? The poll will be open through Friday.

Our latest Feature Article is Michael Quigley's Rapid Web Services Development with Moose XML, which shows you how Moose XML can simplify the task of prototyping and rapidly developing XML web services. We're also featuring The Match Maker Design Pattern - a New Place for the Actions, by Michael Bar-Sinai, which describes how to add actions to a system without modifying business objects, add objects without changing actions, and still keep things reusable; and HTML5 Server-Push Technologies, Part 2 by Gregor Roth; this two-part series explains the new Server-Sent Events and WebSockets API in HTML5.

Current and upcoming Java Events:

Registered users can submit event listings for the Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.

Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of it will be archived along with other past issues in the Archive.

-- Kevin Farnham

O'Reilly Media
Twitter: @kevin_farnham