You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2011/03/10 18:12:59 UTC
[jira] Created: (CXF-3392) Update FormEncodingProvider to support
org.apache.cxf.jaxrs.ext.form.Form
Update FormEncodingProvider to support org.apache.cxf.jaxrs.ext.form.Form
-------------------------------------------------------------------------
Key: CXF-3392
URL: https://issues.apache.org/jira/browse/CXF-3392
Project: CXF
Issue Type: Improvement
Components: JAX-RS
Reporter: Glen Mazza
Priority: Minor
Minor syntactical change, but would allow us to code per-Form object, like Jersey here:
@Produces("application/x-www-form-urlencoded")
@GET
public Form getFormURLEncodedRep(
@PathParam("arg1")String arg1,
@PathParam("arg2")String arg2) {
Form urlProps = new Form();
urlProps.add("representation", "FormURLEncodedRepresentation");
urlProps.add("name", "Master Duke");
urlProps.add("sex", "male");
urlProps.add("arg1", arg1);
urlProps.add("arg2", arg2);
return urlProps;
}
instead of the present MetadataMap (with CXF):
@Produces("application/x-www-form-urlencoded")
@GET
public MultivaluedMap<String, String> getFormURLEncodedRep(
@PathParam("arg1")String arg1,
@PathParam("arg2")String arg2) {
MultivaluedMap<String, String> urlProps = new MetadataMap<String, String>();
urlProps.add("representation", "FormURLEncodedRepresentation");
urlProps.add("name", "Master Duke");
urlProps.add("sex", "male");
urlProps.add("arg1", arg1);
urlProps.add("arg2", arg2);
return urlProps;
}
See conversion note #8 here: http://www.jroller.com/gmazza/entry/jersey_samples_on_cxf
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-3392) Update FormEncodingProvider to support
org.apache.cxf.jaxrs.ext.form.Form
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-3392.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.3.4
2.4
Assignee: Sergey Beryozkin
Example,
proxy.post(new Form().set("a", "b"))
or
return new new Form().set("a", "b")
> Update FormEncodingProvider to support org.apache.cxf.jaxrs.ext.form.Form
> -------------------------------------------------------------------------
>
> Key: CXF-3392
> URL: https://issues.apache.org/jira/browse/CXF-3392
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Reporter: Glen Mazza
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 2.4, 2.3.4
>
>
> Minor syntactical change, but would allow us to code per-Form object, like Jersey here:
> @Produces("application/x-www-form-urlencoded")
> @GET
> public Form getFormURLEncodedRep(
> @PathParam("arg1")String arg1,
> @PathParam("arg2")String arg2) {
> Form urlProps = new Form();
> urlProps.add("representation", "FormURLEncodedRepresentation");
> urlProps.add("name", "Master Duke");
> urlProps.add("sex", "male");
> urlProps.add("arg1", arg1);
> urlProps.add("arg2", arg2);
> return urlProps;
> }
> instead of the present MetadataMap (with CXF):
> @Produces("application/x-www-form-urlencoded")
> @GET
> public MultivaluedMap<String, String> getFormURLEncodedRep(
> @PathParam("arg1")String arg1,
> @PathParam("arg2")String arg2) {
> MultivaluedMap<String, String> urlProps = new MetadataMap<String, String>();
> urlProps.add("representation", "FormURLEncodedRepresentation");
> urlProps.add("name", "Master Duke");
> urlProps.add("sex", "male");
> urlProps.add("arg1", arg1);
> urlProps.add("arg2", arg2);
> return urlProps;
> }
> See conversion note #8 here: http://www.jroller.com/gmazza/entry/jersey_samples_on_cxf
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira