dev@wadl.java.net

Re: Suggestion of a change in Wadl2Java class

From: Otávio Calaça Xavier <otaviocx_at_gmail.com>
Date: Fri, 15 Jul 2011 12:00:06 -0300

Hello Marc, sorry for this long time without response...

When I run the method processDescription separately, a NullPointerException
is thrown on line 227 of Wadl2Java.java code. This is because the attribute
s2j is instantiated only in the process method. So, I suggested that it be
instantiated in the constructor of the class. This solved the problem for
me.

Bye...
--
Otávio Calaça Xavier
Research - Requisito Tecnologia and UFG
On Thu, Jun 23, 2011 at 5:18 PM, Hadley, Marc J <mhadley_at_mitre.org> wrote:
> On Jun 23, 2011, at 12:08 PM, Otávio Calaça Xavier wrote:
> >
> > I'm a member of a research group associated with the Semantic Web in
> Brazil. My research is related to Semantic Web Services using RESTful.
> >
> > I am developing an implementation for the OWL-S API for RESTful Web
> Services. This API interprets some ontologies that semantically describe Web
> services. However, the semantic description requires the syntactic
> description, in this case provided by WADL.
> >
> > Thus, I'm using the Java implementation for WADL (Wadl2Java) to interpret
> the WADL files. But for this, is not necessary to create Java classes (as
> the method "Wadl2Java.process" does). For this I need only the functionality
> of the method processDescription.
> >
> > However, I noticed that the attribute "s2j" is initialized only in the
> "process" method (before the method "processDescription" is called). Thus, I
> suggest writing the following line in the class constructor:
> > this.s2j = new SchemaCompilerImpl();
> >
> > What do you think?
> >
> Can't you just call processDescription instead of process ? That would skip
> the code generation part without any code re-org - what am I missing ?
>
> Marc.
>
>