users@jersey.java.net

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

From: Imran M Yousuf <imran_at_smartitengineering.com>
Date: Mon, 1 Sep 2008 08:26:45 +0600

Hi Martin,

On Sun, Aug 31, 2008 at 9:14 PM, Martin Grotzke
<martin.grotzke_at_freiheit.com> wrote:
> Hi Imran,
>
> On Sun, 2008-08-31 at 20:02 +0600, Imran M Yousuf wrote:
>> On Sun, Aug 31, 2008 at 6:21 PM, Martin Grotzke
>> <martin.grotzke_at_freiheit.com> wrote:
>>
>> Hi Martin,
>>
>> > Hi Imram,
>>
>> Firstly, its actually Imran :).
> sorry for this typo! :)

Not a problem at all :).

>
>>
>> >
>> > On Thu, 2008-08-28 at 12:09 +0600, Imran M Yousuf wrote:
>> >> On Wed, Aug 27, 2008 at 6:10 PM, Martin Grotzke
>> >> <martin.grotzke_at_freiheit.com> wrote:
>> >> > On Wed, 2008-08-27 at 08:45 +0600, Imran M Yousuf wrote:
>> >> >> Hi Martin,
>> >> >>
>> >> >> On Wed, Aug 27, 2008 at 4:36 AM, Martin Grotzke
>> >> >> <martin.grotzke_at_freiheit.com> wrote:
>> >> >> > Hi Imran,
>> >> >> >
>> >> >> > On Mon, 2008-08-25 at 20:09 +0600, Imran M Yousuf wrote:
>> >> >> [snip]
>> >> >> >> >
>> >> >> >> >> 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?
>> >> >> > With xsltproc the xsd files have to be in the same directory as the wadl
>> >> >> > file so that xsd stuff is included in the output (if specified like you
>> >> >> > did in the grammars element). Perhaps you can copy the xsd file to
>> >> >> > appropriate location and add it to the includes...
>> >> >>
>> >> >> The XSD and WADL are both in ./target/classes/ folder thats how I
>> >> >> generated the schema1.xsd. If the path is not correct the wadl
>> >> >> generator usually throws an error :).
>> >> > The xsd file should not be relevant for the wadl generator. What kind of
>> >> > error do you get? Is this s.th. we should/can fix?
>> >> >
>> >> >> As mentioned by Paul I will try
>> >> >> to generate using xsltproc once I get the qname properly set. and then
>> >> >> check again :).
>> >> > Can I help somehow? :)
>> >>
>> >> Sure, I would be grateful if you could attach the XSLT output from xsltproc :).
>> > Here it is, based on the attachments of your email "[Jersey] [RFC/RFH]
>> > Generating WADL and using it with client" (Mon, 25 Aug 2008 10:41:54
>> > +0600) :)
>>
>> Thanks for the HTML, I checked the output and xsltproc and seems to be
>> same as mine. Thanks for the sample.
> This sounds not really satisfied, so I read your postings again and
> noticed that your issue seems to be that there's nothing of the xsd
> included in the transformed html.
>
> I modified your xsd file and wadl file:
> - added namespace declaration to schema1.xsd
> - added qname reference (element + namespace) to the response
> representations
>
> so that now there are parts of the xsd file included in the transformed
> html.
>
> Hope that hels,

This would be very helpful. I will have a look and try to update my
resources, since my schema, wadl are all generated content, I will
have to figure out a way to generate them correctly.

Thanks a lot for the help.

Best regards,

Imran

> cheers,
> Martin
>
>>
>> - Best regards,
>>
>> Imran
>>
>> >
>> > Cheers,
>> > Martin
>> >
>> >
>> >>
>> >> Best regards,
>> >>
>> >> Imran
>> >>
>> >> >
>> >> > Cheers,
>> >> > Martin
>> >> >
>> >> >>
>> >> >> Thanks,
>> >> >>
>> >> >> Imran
>> >> >>
>> >> >> >
>> >> >> > Cheers,
>> >> >> > Martin
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> > --
>> > Martin Grotzke
>> > http://www.javakaffee.de/blog/
>> >
>>
>>
>
>



-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran_at_smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557