On Oct 6, 2009, at 3:47 PM, Ari Heino wrote:
>
>
>
> Paul Sandoz wrote:
>>
>> Hi,
>>
>> Are you supplying any custom WADL generation?
>>
>
> Not sure, I think not (if i've understood WADL generators
> correctly). I'm
> mainly just testing WADL examples found here in user forum and in
> jersey.dev.net site.
>
>
> Paul Sandoz wrote:
>>
>> You might be able to obtain the error by doing the following in a
>> resource class:
>>
>> @Context ResourceConfig resourceConfig;
>>
>> ...
>>
>> WadlGeneratorConfigLoader
>> .loadWadlGeneratorsFromConfig(resourceConfig);
>>
>> JAXBContext.newInstance(wadlGenerator.getRequiredJaxbContextPath());
>>
>> Paul.
>>
>>
>
Sorry, some code got snipped, try:
WadlGenerator wadlGenerator =
WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(resourceConfig);
JAXBContext.newInstance(wadlGenerator.getRequiredJaxbContextPath());
> Tried your suggestion, but since I don't have a handle on that
> wadlGenerator
> object nor knowledge on how to get it, it did not get it working. If
> you
> mean by generator those built time tasks, then no, I don't have
> those at
> all.
>
OK.
Then by default the JAXBContext should be created based on the package
"com.sun.research.ws.wadl" for the JAXB classes generated from XJC and
included in the jersey-server jar.
So maybe you could try:
JAXBContext.newInstance("com.sun.research.ws.wadl");
?
Paul.
> --
> View this message in context: http://n2.nabble.com/WadlResource-stylesheets-for-Wadl-documents-custom-marshalling-tp2454900p3775115.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>