|
|
|||||||||||||||||||||||||||||||||||||||||||||
Ryan Heaton's Blog
REST Resources for Flash DevelopersPosted 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 APIPosted 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:
Or if you're using Ant, you can do the same thing with something like this:
That's it. Try it out. Check out the Enunciate documentation to learn more. http://enunciate.codehaus.org/ Enunciate 1.10 ReleasedPosted 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. Enunciate 1.9 ReleasedPosted 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. For more information on how to use CXF with Enunciate: http://docs.codehaus.org/display/ENUNCIATE/Using+CXF |
March 2009
Search this blog:CategoriesCommunity: Java Web Services and XMLWeb Services and XML Archives
March 2009 Recent EntriesREST Resources for Flash Developers Add some sugar to your Web service API | ||||||||||||||||||||||||||||||||||||||||||||
|
|