Thursday, October 4, 2012

wadl2java 1.1.3 released

So after a little bit of a pause we now have a new release of the wadl2java client generation tool. This is a wide range of improvements in this release; but the main feature is the new support for generating JAX-RS 2.0 client code.

This generated code is nearly identical to the Jersey 1.x interface so most simple code should compile straight after a swap without too many problems. If the client is making use of ClientResponse these references will have to be replaced with Response; but otherwise the interface will be consistent. I would welcome suggestions as to how I could improve what is generated.

So here is a list of items of changes in the release:
  • WADL-25, a patch to allow the passing in of argument to xjc, as provided by Brian Chapman thanks for that..
  • There is a problem in when there was not response content type, this type of method now returns the relevant Response object.
  • Classes that are @XmlType were being wrapped incorrectly with JAXBElement and the information was being taken from the return class.
  • The Proxy objects are now immutable, modifying any property created a new instance.
  • There is a now a programmatic interface to override the base URI at each level. (Suggested by Luigi Tagliamonte)
  • Fix for Oracle Bug 13804542, generation would fail if inner and outer class names match
  • JAX-RS 2.0 generation support available in all tool modes
  • Fix for Oracle Bug 14534583, where a fault element was being incorrectly upgraded from a '2006 WADL. This was causing problems with the examples SOAPUI were providing.
  • Fix for Oracle Bug 1462282, where the generated exception classes were not actually used in the generated code. All exceptions now extend WebAppilcationException to make migration from 1.x to 2.x easier.
  • Improved method generation, removed "application" from media types, removed duplication when method takes and returns the same type (putApplicationXmlAsApplicationXml -> putXml), moved "As" to correct location when we have a type, removed excessive method combinations where we have symmetrical media types. (eg xml,json->xml,json)
  • Initial work looking at how to support JSON-Schema type generation, non functional
  • Adding functional testing for generated clients as was previously only examining the generated classes. Now they are run for both 1.x and 2.x type clients.
 Thanks again as usual help from Pavel Bucek in getting this software out the door.


3 comments:

Glen Mazza said...

It would be nice if the wadl-dist ("Sample projects that demostrate use of the wadl2java tools to create stubs for the Yahoo News Search Service.") could be updated, as the YNSS has been discontinued since Spring 2011.

Gerard Davison said...
This comment has been removed by the author.
Gerard Davison said...

That is a very good point, I noticed myself after I had performed the release. Do you have any suggestions?

Gerard