WadlGenerator and ResourceMetadataCollector don't properly process 
DynamicResources.
------------------------------------------------------------------------------------

                 Key: WINK-333
                 URL: https://issues.apache.org/jira/browse/WINK-333
             Project: Wink
          Issue Type: Bug
          Components: Common
    Affects Versions: 1.1.2
         Environment: all
            Reporter: Jim Long


DynamicResources use getPath() to hold metadata, rather than using the @Path 
annotation.
When processing a DynamicResource with WadlGenerator.generate() the resulting 
XML is fine except for the path, which is blank.
I added the following to the beginning of ResourceMetadatCollector.parsePath(), 
and it seems to work.

    if (DynamicResource.class.isAssignableFrom(cls)) {
        try {
            DynamicResource dynRes = (DynamicResource)cls.newInstance();
            String path = dynRes.getPath();
            getMetadata().addPath(path);
            logger.trace("parseClass() returning true for class 
DynamicResource");
            return true;
        } catch (Exception e) {
            // Drop through and look for @Path annotation.
        }
    }


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to