[
https://issues.apache.org/jira/browse/CXF-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13948863#comment-13948863
]
Vjacheslav Borisov commented on CXF-5644:
-----------------------------------------
Server-side transformation works when I annotate method
@XSLTTransform(value="../../stylesheets/testappjava/document.xsl",
mediaTypes = "application/xhtml+xml")
and with provider like this:
@Provider
public class XsiXSLTJaxbProvider extends XSLTJaxbProvider {
@Override
public boolean isWriteable(Class type, Type genericType, Annotation[] anns,
MediaType mt) {
XSLTTransform xslt=AnnotationUtils.getAnnotation(anns,
XSLTTransform.class);
if(xslt!=null){
String xsltUrl =
this.getContext().getUriInfo().resolve(URI.create(xslt.value())).getPath();
HashMap<String, String> outMediaTemplates = new HashMap<>();
for (String mti : xslt.mediaTypes()) {
outMediaTemplates.put(mti, xsltUrl);
}
this.setOutMediaTemplates(outMediaTemplates);
}
return super.isWriteable(type, genericType, anns, mt);
}
}
> Introduce XSLTTransform annotation to support server-side transformations
> -------------------------------------------------------------------------
>
> Key: CXF-5644
> URL: https://issues.apache.org/jira/browse/CXF-5644
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Reporter: Sergey Beryozkin
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)