You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David people (JIRA)" <ji...@apache.org> on 2009/04/04 16:57:12 UTC

[jira] Created: (CXF-2154) Cannot get Form values from MultivaluedMap

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/actrac/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.

Thanks...

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


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712723#action_12712723 ] 

David people commented on CXF-2154:
-----------------------------------

I've spent some time to resolve the issue I was having.

In my case it was caused by a CAS filter thats used for single sign out..

org.jasig.cas.client.session.SingleSignOutFilter


The filter mapping was set to /* I reduced this so that it does not pick up the webservice urls

Everything is working fine again in my case...

Many thanks for all the help...

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712115#action_12712115 ] 

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

I'll keep it open just a liitle bit longer as there might still be some subtle bug hanging around given that 2 people have seen the problem...What concerns me is that In David's case 

MultivaluedMap<String, String> is not null but empty which means that a Form provider has created it but may be it failed to parse a string properly due to some extra spaces or something like that...

> 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>"+params+"</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.


[jira] Issue Comment Edited: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696969#action_12696969 ] 

David people edited comment on CXF-2154 at 4/8/09 3:03 AM:
-----------------------------------------------------------

File which is used to test the restful web service.
Just attached at the top...

      was (Author: devpl):
    File which is used to test the restful web service.
  
> 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
>         Attachments: testRest.html
>
>
> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696953#action_12696953 ] 

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

> which IE version you're using...

I guess the answer lies somewhere here :-) :

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; iOpus-Web-Automation; .NET CLR 2.0.50727) 



> 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>"+params+"</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.


[jira] Resolved: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2154.
-----------------------------------

    Resolution: Cannot Reproduce

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697018#action_12697018 ] 

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

Thanks, will try it.

or may be you can try the latest 2.2.1-SNAPSHOT ?

As the last resort, please download the CXF 2.2.source

http://www.apache.org/dyn/closer.cgi?path=%2Fcxf%2F2.2%2Fapache-cxf-2.2-src.zip

and try to debug and see why the values are lost...

Please also check no CXF 2.1.x is available on the classpath..., yea, may be there're some classpath issues.



> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697072#action_12697072 ] 

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

by the way, I see

<import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>

do you work with the deprecated CXF HTTP Binding ? if not then remove it - may be it will make a difference :-)

> 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>"+params+"</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.


[jira] Updated: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David people updated CXF-2154:
------------------------------

    Description: 
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>"+params+"</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...

  was:
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...


> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696047#action_12696047 ] 

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

Hmm...

I've added a test which post the above request body through a Socket, as is, I only updated a Connection header and one of the parameters :

POST /petstore/pets HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-ie
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; iOpus-Web-Automation; .NET CLR 2.0.50727)
Host: localhost:8081
Content-Length: 27
Connection: Close
Cache-Control: no-cache

status=open&param2=hfsello 

I can see on the server side :
{status=[open], param2=[hfsello ]}

Can you try to debug may be ?

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696025#action_12696025 ] 

David people commented on CXF-2154:
-----------------------------------

Hi Sergey,
               Thank you for looking at this. 
Sorry to be a pain, but what do I do to get a wire representation of the request, is there something that I can do with system.out to print it out.

Cheers..

> 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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696996#action_12696996 ] 

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

thanks, so I still can't reproduce it, may be because I'm running it against my own test class :

The Request :

POST /testJaxrs/petstore/pets HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/x-shockwave-flash, application/x-silverlight, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
Accept-Language: en-ie
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: localhost:8081
Content-Length: 119
Connection: Keep-Alive
Cache-Control: no-cache

status=open&1docType=1&1countryCode=2&1clientType=3&1action=4&1originals=5&1copies=6&1currency=7&1amount=8&1chamberId=9

Tomcat output :

{status=[open], 1docType=[1], 1countryCode=[2], 1clientType=[3], 1action=[4], 1o
riginals=[5], 1copies=[6], 1currency=[7], 1amount=[8], 1chamberId=[9]}

The test class :

@Path("/petstore/")
public class PetStore {

    public static final String CLOSED = "The Pet Store is closed";

    public PetStore() {
    }

    @POST
    @Path("/pets/")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Produces("text/xml")
    public Response updateStatus(MultivaluedMap<String, String> params) throws Exception {
        System.out.println(params);
        return Response.ok(params.getFirst("status")).build();
    }
}

I only added 'status' to the test form.

Can you please add a sample test class as well, so that I can compile it and try posting to it ?


> 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
>         Attachments: testRest.html
>
>
> 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>"+params+"</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.


[jira] Updated: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David people updated CXF-2154:
------------------------------

    Attachment: testRest.html

File which is used to test the restful web service.

> 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
>         Attachments: testRest.html
>
>
> 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>"+params+"</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.


[jira] Updated: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David people updated CXF-2154:
------------------------------

    Attachment:     (was: testRest.html)

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Chris Westin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700997#action_12700997 ] 

Chris Westin commented on CXF-2154:
-----------------------------------

Hello, I'm seeing something similar.  I'm not using MultivaluedMap.  I have an example that's pretty much the same as the one as the one with the OrderBean on this page:  http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-ConfiguringJAXBprovider .

I'm also finding that the form parameters never make it to my code.  I've tried calling via command-line curl and by using HttpClient PostMethod.

Don't think I have any config problems because I have another method that has @POST @Consumes("application/xml") into the same object (annotated with @XmlElement for JAXB) and that one works.  So, I can POST an XML document, but I can't POST application/x-www-form-urlencoded parameters.

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696951#action_12696951 ] 

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

Can you please attach a sample HTML file with the above form, and tell me which IE version you're using...
That will probably be the best way forward for me to be able to reproduce the problem, thanks


> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696968#action_12696968 ] 

David people commented on CXF-2154:
-----------------------------------

Hi Sergey,
         I'm using IE 7 as you've already figured out.

Version number 7.0.5730.13

I'll see if I can attach the html file I use.. some how :-)



> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702319#action_12702319 ] 

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

Hi Chris, David

I need some help. I did try to reproduce  the issue David raised. Can you please try to come up with a basic test case, simple server code, basic HTTP Client code or indeed CXF client code, with CXF it's straighforward to write a test client code :
Book b = JAXRSClientFactory.create("http://foo:9090/bar", Book.class);
b.postUsingFormParams(1, 2);

or 

WebClient wc = WebClient.create("http://foo:9090/bar");
wc.form(new Form()) 

I actually wrote a client test code which posts the on-the-wire request through the socket directly, to try to match the request as close as possible to the reality...So the test client code can use the sockets if needed

thanks, Sergey

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12706347#action_12706347 ] 

David people commented on CXF-2154:
-----------------------------------

Hi Sergey,
            I havn't had a chance to try removing the jars and my problem is in a fairly large app.
I'm happy for this to be closed, I think we have established in my case that its related to my environment.

Many Thanks...

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715165#action_12715165 ] 

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

Hi David - thanks for confirming it. I'm closing it then...



> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697012#action_12697012 ] 

David people commented on CXF-2154:
-----------------------------------

Ok here is a simple test case..


Here is the Class

package cxf.rest;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;


public class TestRest {
	
	
	    @POST 
	    @Path("/testRest/") 
	    @Consumes(MediaType.APPLICATION_FORM_URLENCODED) 
	    @Produces("text/xml") 
	    public Response updateStatus(MultivaluedMap<String, String> params) throws Exception { 
	        System.out.println(params); 
	        return Response.ok(params.getFirst("status")).build(); 
	    } 
	} 





Here is the Spring config

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:jaxws="http://cxf.apache.org/jaxws"
	xmlns:jaxrs="http://cxf.apache.org/jaxrs"
	xmlns:soap="http://cxf.apache.org/bindings/soap"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	                    http://www.springframework.org/schema/beans/spring-beans.xsd
	                    http://cxf.apache.org/jaxws
	                    http://cxf.apache.org/schemas/jaxws.xsd
	                    http://cxf.apache.org/jaxrs
						http://cxf.apache.org/schemas/jaxrs.xsd">
	
	
	<import resource="classpath:META-INF/cxf/cxf.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
	<import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml"/>
	<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />


            <jaxrs:server id="JaxRS-Server" address="/">
       
	    <jaxrs:serviceBeans>
	         <ref bean="testRest"/>
	    </jaxrs:serviceBeans>
           </jaxrs:server>
    
    
           <bean id="testRest" class="cxf.rest.TestRest">
           </bean>

</beans>



Here is the test html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 </HEAD>

 <BODY>
    <form method="POST" action="http://localhost:8080/webapp/webservice/testRest" >
      <input type="text" value="open" name="status"/> 
      <input type="text" value="testing123" name="test1"/> 
      <input type="submit"/> 

	</form>
 </BODY>
</HTML>




Here is the tomcat output
{}


And here is what displays on IE 7
The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource 'http://localhost:8080/webapp/webservice/testRest'. 


I'm beginning to think this is a classpath problem with a bad jar somewhere....

Many thanks....

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704160#action_12704160 ] 

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

Hi guys - if either of you could attach a test case then it would be most appreciated - I'm keen to close this JIRA :-)

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696036#action_12696036 ] 

David people commented on CXF-2154:
-----------------------------------

Ok got that little tool to work.

Here is the output

POST /actrac/webservice/customerservice/temp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-ie
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; iOpus-Web-Automation; .NET CLR 2.0.50727)
Host: localhost:8081
Content-Length: 27
Connection: Keep-Alive
Cache-Control: no-cache

param1=hello&param2=hfsello




Output on bottom window

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Content-Length: 15
Date: Mon, 06 Apr 2009 10:59:09 GMT

<done>{}</done>






> 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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696057#action_12696057 ] 

David people commented on CXF-2154:
-----------------------------------

I create a little html page, and post the request through that, don't know if that makes a difference.

I've tried everything I could find, with regards the configuration.

Does your example work through spring? I didn't find any example of this in the samples.

I'm not sure what more I can do to debug it, it doesn't give an error, its just that the map does not contain any values.



> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697105#action_12697105 ] 

David people commented on CXF-2154:
-----------------------------------

I took the binding import out, same result, 
I'll try removing all the jars and add them again 1 by 1...

> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696028#action_12696028 ] 

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

This is the utility I've been using for years :
http://www.pocketsoap.com/tcptrace/

but there are many similar ones available.
So if for ex, you have your service listening on 8080, then direct a browser (by modifying a form) to post to 8081, and setup a tcptrace to route from 8081 to 8080


> 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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733030#action_12733030 ] 

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

Please see https://issues.apache.org/jira/browse/CXF-2346

I believe this now has been resolved for good.

cheers, Sergey

> 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>"+params+"</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.


[jira] Issue Comment Edited: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696036#action_12696036 ] 

David people edited comment on CXF-2154 at 4/6/09 4:02 AM:
-----------------------------------------------------------

Ok got that little tool to work.

Here is the output

POST /webapp/webservice/customerservice/temp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-ie
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; iOpus-Web-Automation; .NET CLR 2.0.50727)
Host: localhost:8081
Content-Length: 27
Connection: Keep-Alive
Cache-Control: no-cache

param1=hello&param2=hfsello




Output on bottom window

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Content-Length: 15
Date: Mon, 06 Apr 2009 10:59:09 GMT

<done>{}</done>






      was (Author: devpl):
    Ok got that little tool to work.

Here is the output

POST /actrac/webservice/customerservice/temp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-ie
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; iOpus-Web-Automation; .NET CLR 2.0.50727)
Host: localhost:8081
Content-Length: 27
Connection: Keep-Alive
Cache-Control: no-cache

param1=hello&param2=hfsello




Output on bottom window

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Content-Length: 15
Date: Mon, 06 Apr 2009 10:59:09 GMT

<done>{}</done>





  
> 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>"+params+"</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.


[jira] Commented: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696015#action_12696015 ] 

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

Hi,

We do have system tests with MultivaluedMap so if you could post the wire representation of the request (with all the headers) then it would help


> 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.


[jira] Updated: (CXF-2154) Cannot get Form values from MultivaluedMap

Posted by "David people (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David people updated CXF-2154:
------------------------------

    Description: 
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...

  was:
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/actrac/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.

Thanks...


> 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.