On 10/24/2010 11:58 AM, Thierry Boileau wrote:
>
> Hello Leigh,
>
> I think the namespaces should be propagated from the ApplicationInfo
> instance. Could you try to call
> Application#getNamespaces().put("test", "http://example.com");
>
> Best regards,
> Thierry Boileau
>
>
Thierry,
Thank you for the proposed workaround. There might be prefix conflicts
between different resources in the same application but I can put in a
rename step so that each prefix is unique to its namespace URN within an
application.
However, I'm having trouble finding the applicationInfo object from
within WadlServerResource.describeGet(MethodInfo) and related methods.
It looks like I need to have a two-pass algorithm, where
ShadowWadlApplication.describe(ApplicationInfo) invokes a pass on all
methods and determines namespace prefixes, and in a second pass,
describeGet and other methods are called.
It might be simpler if describeGet and related methods could call
representationInfo.addNamespace and the resulting namespace declarations
output as local XML namespace declarations in the representation WADL XML.
Thank you,
Leigh.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2675785