cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap
Date Mon, 06 Apr 2009 10:14:12 GMT

    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696026#action_12696026
] 

Sergey Beryozkin commented on CXF-2154:
---------------------------------------

Here's a sample request from a test :

POST /webapp/petstore/pets HTTP/1.1
Accept: text/xml
Content-type: application/x-www-form-urlencoded
Connection: close
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.5.0_12
Host: localhost:9081
Content-Length: 27

status=open&status1=open2

here's a test method :

@POST
    @Path("/pets/")
    @Consumes("application/x-www-form-urlencoded")
    @Produces("text/xml")
    public Response updateStatus(MultivaluedMap<String, String> params) throws Exception
{
        //
    } 

> Cannot get Form values from MultivaluedMap
> ------------------------------------------
>
>                 Key: CXF-2154
>                 URL: https://issues.apache.org/jira/browse/CXF-2154
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2
>         Environment: Windows XP Java 1.6 tomcat
>            Reporter: David people
>
> Hi,
>    I'm trying to get All the form fields from a a form which is posted to the restful
web service.
>     <form method="POST" action="http://localhost:8080/webapp/webservice/customerservice/temp"
>
>              <input type="text" value="hello" name="param1"/>
>              <input type="text" value="hfsello" name="param2"/>
>              <input type="submit"/>
>     </form>
> I have the following method
> @POST
> @Path("/temp")
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> public String temp(MultivaluedMap<String, String> params){
>      System.out.println("Params = "+params);
>      return "<done></done>";
> }
> The output is always empty, the size of the params object is zero.
> The very same method used to work in a previous version of CXF.
> Is there a new way to use MultivaluedMap?
> Thanks...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message