You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dobes Vandermeer (JIRA)" <ji...@apache.org> on 2010/11/11 03:10:13 UTC
[jira] Issue Comment Edited: (CXF-3005) Add support for jsonp in
CXF JAX-RS
[ https://issues.apache.org/jira/browse/CXF-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930894#action_12930894 ]
Dobes Vandermeer edited comment on CXF-3005 at 11/10/10 9:09 PM:
-----------------------------------------------------------------
Note:
the content type for JSONP should be application/javascript, not application/json.
The reason is that browsers might not execute application/json as javascript.
was (Author: dobes_vandermeer):
Note:
the content type for JSONP should be application/javascript, not application/json.
The reason is that browsers might not execute application/json as javascript without errors.
> Add support for jsonp in CXF JAX-RS
> -----------------------------------
>
> Key: CXF-3005
> URL: https://issues.apache.org/jira/browse/CXF-3005
> Project: CXF
> Issue Type: New Feature
> Components: JAX-RS
> Reporter: Josh Holtzman
> Attachments: cxf_jsonp.diff
>
>
> JAX-RS endpoints that produce JSON can be wrapped by a callback to enable JSONP, or JSON with padding. The attached patch adds JSONP interceptors that may be added to a JAXRSServerFactoryBean to support JSONP.
> JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
> factory.getInInterceptors().add(new JsonpInvokeInterceptor());
> factory.getOutInterceptors().add(new JsonpPreStreamInterceptor());
> factory.getOutInterceptors().add(new JsonpPostStreamInterceptor());
> ...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.