|
From: Dmitry <red...@li...> - 2011-01-19 11:34:05
|
Hello!
It seem that RestEASY has no standard Entity Provider for the Source
interface (neither SAXSource, nor JAXBSource).
Here is an example:
@Path("/GetWSDLInfo")
public class GetWSDLInfo
{
@GET
@Produces(MediaType.TEXT_XML)
public Source parse()
{
...
JAXBContext ctx = ...
Marshaller marshaller = ctx.createMarshaller();
return new JAXBSource(marshaller, bean); // bean is a JAXB
annotated Java Bean
}
}
The code works with Tomcat 7 + Jersey
Cheers,
Dmitry
|