Hi,

first of all, congratulations to the RC1 release and thanks for making Restlet 
such a pleasure to work with!

I just migrated from M7 to RC1 and have issues with the WADL features:
I get a NPE when making an OPTIONS request to retrieve the WADL. The problem 
basically seems to be, that 
WadlRepresentation.getSaxSource() returns null in my case.


Here's how it looks like to me:

TransformRepresentation.toSaxSource() calls 
wadlRepresentation.getSaxSource() and this returns null.

In M7, SaxRepresentation.getSaxSource() still returned
 "new SAXSource(new InputSource(getReader()));"
when the 'source' field was not set, but now the null check is not there 
anymore.

And only one WadlRepresentation constructor does set the 'source' field (the 
constructor with the xmlRepresentation param).
I use the constructor with the ApplicationInfo param and so 
wadlRepresentation.getSaxSource() returns null.

As a workaround, I tried setting the sax source manually:
wadlRepresentation.setSaxSource(new SAXSource(new 
InputSource(wadlRepresentation.getStream())));

With this, I don't get the NPE anymore.

But I still don't get the WADL, the response from the request is empty.

Cheers,
Carsten

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2460459

Reply via email to