n4rzul
n4rzul

Reputation: 4078

generate javascript for resteasy

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

Upvotes: 0

Views: 1075

Answers (2)

Rakesh Waghela
Rakesh Waghela

Reputation: 2297

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/

Upvotes: 1

tveon
tveon

Reputation: 609

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... :)

Upvotes: 2

Related Questions