[
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