cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Mazza (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-3392) Update FormEncodingProvider to support org.apache.cxf.jaxrs.ext.form.Form
Date Thu, 10 Mar 2011 17:12:59 GMT
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

Mime
View raw message