i have a Class A that is used as a result for a JAX-RS method. I want to marshal A into xml in two different ways.
Is there a way to give resteasy two different mappings to use on my class?
Greetings,
Laures
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note: I’m the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.
You could use MOXy for this. Check out my blog post where I map the same object model to two different weather services (Google and Yahoo) by leveraging annotations for one mapping and MOXy’s XML metadata for the second mapping:
Below is an example of using MOXy’s XML metadata in a JAX-RS environment:
For More Information