0

Hi there I'm using resteasy as my JAX-RS implementation for a project and was wondering how to generate the ajax client from my REST resources.

I found this link but it just documents the ajax client and its usage. No where can I find how to actually generate the javascript.

http://docs.jboss.org/resteasy/docs/2.0.0.GA/userguide/html_single/index.html#d0e3137

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
n4rzul
  • 4,059
  • 7
  • 45
  • 64

2 Answers2

2

Yes, the documentation is somewhat lacking, but the this blog post announcing the release of version 2.0 clarifies it somewhat.

In short, you need to deploy a servlet (actually described in the User Guide). It scans the JAX-RS resources and builds a JavaScript client, which can the be downloaded from the configured URL. I haven't tried it out, but it is what I gathered from the description... :)

tveon
  • 579
  • 5
  • 24
1

A working demo of the RestEasy jav Script client is here..

I tried it out, basically the logic is to find out annotated resources and then build java script objects out of it.

http://howtodoinjava.com/2013/05/29/resteasy-javascriptajax-client-demo/

Rakesh Waghela
  • 2,227
  • 2
  • 26
  • 46