users@jersey.java.net

Re: [Jersey] [RFC/RFH] Generating WADL and using it with client

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 26 Aug 2008 09:42:37 +0200

On Aug 25, 2008, at 4:09 PM, Imran M Yousuf wrote:

> Firstly before going into the email thanks a lot for the
> informative reply :).
>
> On Mon, Aug 25, 2008 at 5:43 PM, Paul Sandoz <Paul.Sandoz_at_sun.com>
> wrote:
>> Imran M Yousuf wrote:
>>>
>>> Hi,
>>>
>>> I am fairly new to RESTful WS in terms of using it and as steps of
>>> learning it I am interested in generating WADL and using it for
>>> generating client stubs. Following the generate-wadl sample I
>>> succeeded in producing the wadl file :) but I am not sure whether
>>> its
>>> content are appropriate or not.
>>
>> I do not see any element attribute on the representation
>> referencing an
>> element in the schema. This requires you reference it as follows:
>>
>> @request.representation.qname {http://www.example.com}item
>>
>
> Ah thats what the doclet attribute is for :), I was trying to get hold
> of an document of why this was required :) so just deleted it. Thanks
> for pointer, will work on it.
>
> BTW, is there any document on what other doclet attributes are
> available?
>

Unfortunately not :-( something we would need to do in our copious
amounts of spare time! I realize we can do with some for
documentation, there is always the tension of cranking out new
features and fully documenting them.


>>>
>>> Additionally the schema file seemed to
>>> referred to from the wadl rather than including its content.
>>>
>>
>> Yes, we either need to include the XSD or make sure it can be
>> referenced
>> relative to the base URI. BTW if you generate the application.html
>> it does
>> have XSD embedded but it is making use of xsltproc.
>
> I am not making use of xsltproc instead I am using the
> xml-maven-plugin. I am using the following configuration for the
> transformation. Shouldn't the output be same?
>

I dunno, i am no maven expert, you could compare the two documents.
If you need the HTML produced using xsltproc because you are not
using unix i can send it so you can compare.


<snip>
>>
>> Could you log an issue?
>>

Thanks!


>>
>>> Firstly, I would be grateful if someone could please confirm whether
>>> their content is okey or not.
>>>
>>> Then I tried to create client stub from the WADL file in NetBeans
>>> WebApplication project. But inspecting the JavaScript it shows
>>> that it
>>> did could initialize the location but it did not read the resources
>>> from the WADL. Is this normal?
>>
>> I do not know, i will forward this email to the tooling guys.
>>
>
> Thanks a lot, I hope we get a positive reply on it.
>

Issue logged:

http://www.netbeans.org/issues/show_bug.cgi?id=145040

Paul.