The Source for Java Technology Collaboration
User: Password:



Ryan Heaton's Blog

Ryan Heaton Ryan Heaton is a senior software engineer for FamilySearch.org. Ryan specializes in the design and development of Web services, particularly for the Java platform. He actively contributes to the effort of making Web services easy to develop and publish while maintaining an acceptable level of interoperability. As part of his contribution to this end, Ryan engineered Enunciate, a Web service deployment framework. Ryan is the father of four boys and currently resides in Salt Lake City.



REST Resources for Flash Developers

Posted by stoicflame on March 13, 2009 at 03:14 PM | Permalink | Comments (0)

Over at FamilySearch, I've been involved in supporting Flash application development that consumes a public POX API. It's not a REST API, but like REST, we provide a set of resources that are accessible at a given URI. Up to this point, our Flash developers have been stuck with parsing the resources as XML. It works fine, but it's not without a significant overhead. XML isn't the most efficient data format, nor is it very convenient to work with in ActionScript code.

The "native" data format for flash development is AMF. When ActionScript objects get written to a stream, they are serialized as AMF. When the objects are read from a stream, AMF is the presumed deserialization format. The Enunciate project has provided support for supplying SOAP endpoints as AMF services for quite some time now, but I've only recently added support for AMF REST endpoints.

Here's the wrap-up of the process. As mentioned in the article, if you're already using Enunciate, this process will be significantly simpler. Enunciate already comes with a JAX-RS provider that does the serialization and it will generate your client-side ActionScript classes for you. Not to mention the fact that Enunciate will also generate documentation for your API and neatly package it up, ready to be deployed into your favorite servlet container.

http://docs.codehaus.org/display/ENUNCIATE/AMF+and+REST



Add some sugar to your Web service API

Posted by stoicflame on March 13, 2009 at 03:12 PM | Permalink | Comments (4)

So you've got your JAX-WS or JAX-RS endpoints defined and implemented, and they're compiling, building and running smooth on your server. All is well, right? You've been diligent in documenting and testing your code, and the consumers of your API seem to be happy.

Well, that's just because they don't know what they're missing.

Here's the thing: your Web service API could be so much better. What if you could leverage all that work you've put into your JavaDocs and publish that as documentation for your API? And what if you could provide fully-documented, well-formated, strongly-typed client-side code for your .NET, Java, or ActionScript clients?

With just some enhancements to your build file or your POM, you can produce stuff that looks like this for your Web service API.

Let's say you're using Maven to build your project. Just use the Maven Enunciate Plugin to export your own docs to the target/docs directory:


<plugin>
  <groupId>org.codehaus.enunciate</groupId>
  <artifactId>maven-enunciate-plugin</artifactId>
  <version>1.10</version>
  <executions>
    <execution>
      <goals>
        <goal>docs</goal>
      </goals>
      <configuration>
        <docsDir>${project.build.directory}/docs<docsDir>
      </configuration>
    </execution>
  </executions>
</plugin>

Or if you're using Ant, you can do the same thing with something like this:


<enunciate basedir="src/main/java">
  <include name="**/*.java"/>
  <classpath refid="enunciate.classpath"/>
  <export artifactId="docs" destination="target/docs"/>
</enunciate>

That's it. Try it out. Check out the Enunciate documentation to learn more.

http://enunciate.codehaus.org/



Enunciate 1.10 Released

Posted by stoicflame on March 13, 2009 at 02:40 PM | Permalink | Comments (0)

As of version 1.10, Enunciate will generate elegant client-side C# code and supply an AMF provider for your REST endpoints.

There is also a new Maven plugin that can be used to generate just the user documentation and client-side classes for your JAX-WS and JAX-RS endpoints. If you're using JAX-WS or JAX-RS, you ought to try it out and witness the value-add for yourself.

http://enunciate.codehaus.org



Enunciate 1.9 Released

Posted by stoicflame on January 22, 2009 at 12:05 PM | Permalink | Comments (0)

Enunciate 1.9 provides support for JAX-WS RI and CXF and generates a lightweight JAX-WS client-side library for accessing the endpoints.

http://enunciate.codehaus.org

For more information on how to use CXF with Enunciate:

http://docs.codehaus.org/display/ENUNCIATE/Using+CXF



March 2009
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        


Search this blog:
  

Categories
Community: Java Web Services and XML
Web Services and XML
Archives

March 2009
January 2009
November 2008
May 2008
January 2008
October 2007
September 2007
August 2007
May 2007
April 2007

Recent Entries

REST Resources for Flash Developers

Add some sugar to your Web service API

Enunciate 1.10 Released



Powered by
Movable Type 3.01D


 Feed java.net RSS Feeds