Two issues: 
1. Are there plans to backport this to Restlet 1.1 as well?  It seems a shame 
to move to an unstable Restlet release in order to keep up with other published 
work.
2. In both 1.2 and trunk, ResourceInfo.java generates the ParameterInfo after 
the MethodInfo, but it must be done before, according to to the 2009 WADL RNC.

$ svn diff
Index: ResourceInfo.java
===================================================================
--- ResourceInfo.java (revision 6483)
+++ ResourceInfo.java (working copy)
@@ -342,14 +342,14 @@
                 documentationInfo.writeElement(writer);
             }
 
+            for (final ParameterInfo parameterInfo : getParameters()) {
+                parameterInfo.writeElement(writer);
+            }
+
             for (final MethodInfo methodInfo : getMethods()) {
                 methodInfo.writeElement(writer);
             }
 
-            for (final ParameterInfo parameterInfo : getParameters()) {
-                parameterInfo.writeElement(writer);
-            }
-
             writer.endElement(APP_NAMESPACE, "resource");
         }
     }

Leigh. 
 
________________________________

From: Thierry Boileau [mailto:[email protected]] 
Sent: Wednesday, March 17, 2010 10:22 AM
To: [email protected]
Subject: Re: Issues with WADL extension


Hello Carsten,

you're right, the namespace should be updated. As I've noticed another issue 
regarding the WadlRepresentation, I will fix both of these issues tomorrow.
Thanks for your report.
As a temporary workaround, you can add a package org.restlet.ext.wadl that 
contains the updated stylesheet. You may also need to update the classpath for 
the precedence.

Best regards,
Thierry Boileau



        The reason, why the output is empty, when requesting the HTML version 
of the WADL, seems to be the following:
        
        The stylesheet "/org/restlet/ext/wadl/htmlConvert.xsl", which converts 
the generated WADL, uses the WADL namespace 
"http://research.sun.com/wadl/2006/10"; <http://research.sun.com/wadl/2006/10> .
        
        But the generated WADL has the namespace 
"http://wadl.dev.java.net/2009/02"; <http://wadl.dev.java.net/2009/02>  (see 
WadlRepresentation.APP_NAMESPACE)
        
        So, one of these namespaces has to be changed to the other.
        
        cheers,
        Carsten
        
        ------------------------------------------------------
        
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2460536

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

Reply via email to