users@jersey.java.net

Re: [Jersey] wadl access in Jersey

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 22 Jul 2009 15:44:20 +0200

On Jul 22, 2009, at 3:28 PM, António Mota wrote:

> Of course, WADL does not conform with REST principles, at least
> because
>
> 1) creates a coupling between clients and server, and
> 2) publishes "concrete" URL's, disallowing the principle of
> "Hipermedia as the engine of application state"
>

The WADL produced by Jersey is a form of hypermedia. The WADL
describes capabilities of a resource and the relationships to other
resources. The information is derived via Java reflection from the
resource classes at runtime.

Such WADL has been used by JavaScript clients to dynamically create
test web pages e.g. NetBeans can do this. It all works fine as per the
REST style.

Tighter coupling can occur if a client decides to generate static code
from the WADL. That is something i discourage, but can see why some
developers might want to do that but they should be aware of the
technical restrictions that may ensue.

Paul.

> But hey, don't let that prevent you of using it...
>
> Naresh wrote:
>> Hi Suchitha,
>>
>> Suchitha Koneru (sukoneru) wrote:
>>>
>>> Hello Jersey Users,
>>>
>>> I am new to Jersey and I am trying to understand
>>> the concept of WADL. As per my understanding WADL for Rest is
>>> similar to WSDL for SOAP.
>>> Are wadls generated on the fly similar to wsdls?
>>>
>> Yes. It provides a description of the various resources in your
>> application and is generated on the fly.
>>>
>>> What is the url for accessing wadl from the webapplication?
>> If your application is deployed with name myapplication, the wadl
>> will be available at http://mydomain/myapplication/
>> application.wadl, assuming the url-pattern is "/".
>>>
>>> Could you please provide any pointers in this regard
>>>
>> May be you could have a look at the Jersey helloworld-webapp sample
>> [1] which generates the WADL on the fly. The wadl can be viewed at
>> [2].
>> [1] http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/1.1.1-ea/helloworld-webapp-1.1.1-ea-project.zip
>> [2] http://localhost:8080/helloworld-webapp/application.wadl
>>
>> Hope this helps,
>> Naresh
>>>
>>>
>>> Thank you ,
>>>
>>> Suchitha
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>